0
Fork 0
mirror of https://github.com/TanStack/query.git synced 2026-11-16 22:50:20 +00:00
Commit graph

5,264 commits

Author SHA1 Message Date
Steffen Holanger
2861488ee4
docs(createAsyncStoragePersister): Update documentation to match type (#4900)
* Update documentation to match type

There was a mismatch between the type declaration and the documentation.

* fix formating
2023-01-30 10:20:29 +01:00
Dominik Dorfmeister
7a62494628 chore: only run ci.yml on main branch
because we run a separate pr.yml for PRs and the previous check didn't really work
2023-01-30 09:11:47 +01:00
Dominik Dorfmeister
a9ba13503a chore: fix broken package.json 2023-01-30 08:54:18 +01:00
Dominik Dorfmeister
d37e64ec84 chore: upload code-coverage during build process
by decoupling test running from publishing; we now always run the tests when pushed to main
this should help us get a correct baseline
2023-01-30 08:52:22 +01:00
Tanner Linsley
aa97c2b2f2 release: v4.24.1 2023-01-29 17:20:36 +00:00
Lachlan Collins
1bf0835863
fix(svelte-query): Fix createQueries result type (#4877) v4.24.1
* fix(svelte-query): Fix createQueries result type

* Fix prettier

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2023-01-29 18:15:55 +01:00
Tanner Linsley
1afa0b4a3c release: v4.24.0 2023-01-28 06:55:31 +00:00
Eliya Cohen
13f53470e7
feat(eslint-plugin): support query key factory (#4879) v4.24.0
* add support for queryKeyFactories

* add test

* lint fix

* format

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2023-01-28 07:51:02 +01:00
Eliya Cohen
d4fa2b98cf
feat(eslint-plugin): prefer-object-syntax support useMutation and createMutation (#4893)
* support useMutation and createMutation

* fix tests

* format
2023-01-27 20:05:54 +01:00
Dominik Dorfmeister
9c15b327df
chore: fix ci-v3 2023-01-25 20:37:50 +01:00
Tanner Linsley
9a7f66f986 Update ci-v3.yml 2023-01-25 12:31:45 -07:00
Rendani Gangazhe
9404df4c4c
docs(svelte-query): Correctly type layout data when using prefetchQuery (#4852) 2023-01-25 08:19:10 +01:00
Niko Mendo
68c3e19bca
docs: Fix variable reference issue on sveltekit doc (#4861) 2023-01-25 08:18:49 +01:00
Eric Filion
b9cb5f1464
docs(ssr): add experimental app directory guide (#4568)
* docs(ssr): add experimental app directory guide

* fixup: consistent code formatting

* Revert "docs(ssr): add experimental app directory guide"

This reverts commits:
f6ef0164d6
5c48c7cffe

* [draft]: add experimental app directory guide

* fixup: drop dehydrate options

* fixup: layout.jsx consistent with create-next-app

* fixup: note on using query-core vs react-query

* docs(ssr): remove HydrateOnClient

* docs(ssr): rewrite suspense and server-side fetching section

* docs(ssr): tweaks

* docs(ssr): prettier

* docs: replace query-core imports with react-query imports

Co-authored-by: Fredrik Höglund <fredrik.hoglund@gmail.com>
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2023-01-25 08:18:20 +01:00
Tanner Linsley
53204fead5 release: v4.23.0 2023-01-24 10:58:19 +00:00
Girish Sontakke
f57c8dc15e
feat(client components): add use client directive at the top of files having client components (#4738) v4.23.0
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
Co-authored-by: Fredrik Höglund <fredrik.hoglund@gmail.com>
2023-01-24 11:52:11 +01:00
Dominik Dorfmeister
ea673770c0
docs: add readme.md to react adapter 2023-01-23 16:31:16 +01:00
Joël Kuijper
69a7d72d34
docs: add QueryClient import (#4856) 2023-01-23 13:08:09 +01:00
Qz
4ac7c1a8b6
docs(useMutation): correct docs for mutate function callbacks (#4601)
* docs(useMutation): correct docs for mutate function callbacks

* docs: fix merge conflicts

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2023-01-23 07:57:19 +01:00
Tanner Linsley
81baae3088 release: v4.22.4 2023-01-22 16:01:51 +00:00
Jan
901e826f39
fix(core): do not call mutate callbacks if mutation started after unmount (#4848) v4.22.4
* 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>
2023-01-22 16:56:54 +01:00
Tanner Linsley
bae03c00b4 release: v4.22.3 2023-01-21 14:59:00 +00:00
Lachlan Collins
4f515dec96
fix(svelte-query): Fix createMutation for functions that take no arguments (#4847) v4.22.3
* Update createMutation test function name

* Default TVariables = void

* Fix createMutation test

* Fix prettier
2023-01-21 15:53:42 +01:00
Louis Young
61c3d94a94
docs(useMutation): clarify mutationFn option default (#4837)
* docs(useMutation): clarify `mutationFn` option default

* Make optionality consistent with `useQuery` documentation

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2023-01-20 13:24:26 +01:00
Michal Tecza
ff77512b6c
test: stabilize various tests (#4825)
* test: stabilize various tests

* chore: bump istanbul version
2023-01-15 15:13:13 +01:00
Michal Tecza
365fdf3bb3
chore: fix duplicated example package name (#4823) 2023-01-15 11:17:44 +01:00
Michal Tecza
07f144a284
docs: clarify the documentation on running examples (#4818)
* docs: clarify the documentation on running examples

* docs: use the proper watch command in docs for running examples
2023-01-15 10:44:50 +01:00
Dominik Dorfmeister
532b90ac18
docs: update tkdodos blog (#4820) 2023-01-15 08:26:18 +01:00
Lachlan Collins
86161ca6ec
docs(svelte-query): Add recommended defaults to prefetchQuery setup (#4815)
* Add recommended defaults to prefetch example

* Move SSR docs up in sidebar
2023-01-14 17:25:20 +01:00
Masaki Koyanagi
832d4fb034
docs: fix typo (quey -> query) (#4813) 2023-01-13 15:37:10 +01:00
Lachlan Collins
e33bda3131
chore: Add sandbox.config.json (#4812) 2023-01-13 14:18:36 +01:00
Lachlan Collins
2cd92ef391
docs(svelte-query): Rework SvelteKit setup (#4811)
* 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>
2023-01-13 13:48:19 +01:00
Ben Longo
3a3d871ad8
docs: clarify interaction of query filter predicates with other criteria (#4532)
* docs: clarify interaction of query filter predicates with other criteria

* Update docs/guides/filters.md

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>

* Update docs/guides/filters.md

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2023-01-13 13:45:15 +01:00
Joseph Markus
67723337f3
docs: Update devtools.md with note that mutations are not tracked (#4810)
This can save others some time browsing around trying to get it to work
2023-01-13 13:06:21 +01:00
Lachlan Collins
c05bb9104c
docs(svelte-query): Expand SSR docs (#4809)
* docs(svelte-query): Expand SSR docs

* Expand wording

* Run prettier
2023-01-13 09:08:49 +01:00
Tanner Linsley
2ecf24ddcd release: v4.22.2 2023-01-12 15:48:59 +00:00
Lachlan Collins
65ebe5fe88
refactor(svelte-query): Clean-up type definitions (#4800) v4.22.2
* Simplify types

* Run prettier

* Add reactivity docs, rename example

* This function does not need to be reactive
2023-01-12 16:43:35 +01:00
Tanner Linsley
709ebdd7cb release: v4.22.1 2023-01-11 10:48:10 +00:00
Lachlan Collins
84ba2f1854
fix(svelte-query): Remove dependency on SvelteKit (#4788) v4.22.1
* 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>
2023-01-11 11:42:58 +01:00
ottomated
b40055c672
docs: fix sveltekit SSR link (#4792) 2023-01-11 09:52:11 +01:00
Lachlan Collins
c21095798c
docs(svelte-query): Add SSR and SvelteKit guide (#4786)
* Add SSR docs

* Remove semicolons to match project style
2023-01-10 09:20:54 +01:00
Lachlan Collins
d5126828df
chore: Restructure package scripts (#4779)
* 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>
2023-01-10 08:09:33 +01:00
Lachlan Collins
2e9d2a9b37
docs(svelte-query): Add installation and examples (#4781) 2023-01-09 15:59:48 +01:00
Tanner Linsley
1a750aff41 release: v4.22.0 2023-01-08 19:01:35 +00:00
Manthan Mallikarjun
228b1f0f2b
feat: export default hydration methods for easier extension in dehydrateOptions (#4751) v4.22.0
* export default hydration metods to allow for easier extending

* pretty

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2023-01-08 19:56:12 +01:00
Tanner Linsley
4853ace6e4 release: v4.21.0 2023-01-08 12:22:20 +00:00
Lachlan Collins
d79f2b97d2
chore: Remove incompatible vitest flag from test:ci (#4777) v4.21.0
* Remove coverage flag

Add back again in a simpler script setup

* Allow coverage to run on test:ci
2023-01-08 13:17:23 +01:00
Lachlan Collins
b324a9b877
feat(svelte-query): Svelte Query Adapter for TanStack Query (#4768)
* feat: svelte-query adapter

* add examples

* add @testing-library/svelte and svelte-jester

* add transform for testing svelte components

* re-export @tanstack/core core

* add a few initial test

* delete tests in examples

* use ^ in dependencies

* delete and gitignore .vscode

* rename basic-typescript to basic

* add basic example to ci.json

* remove transform from global preset

* update version

* don't gitignore lib directory in svelte examples

* fix build files location in package.json

* chore: prettier formatting

* add missing state

* chore: fix eslint errors

* add context

* unsubscribe

* add missing export

* use svelte context

* update version

* update examples to use context

* release: v4.14.5

* remove onMount

* add onMount to setQueryClient

* remove unneeded exports

* Add basic svelte docs overview

* Add SvelteKit 1.0 example

Uses the data from the simple example

* Edit nodeResolve settings

* More rollup and babel tweaks

Seems to be working

* Try svelte plugin options

* Separate out svelte config

* Switch to svelte-package

* Reset rollup config

* Output to ./build

* Use vitest in svelte-query

* Fix test imports

* Avoid transpiling TS during typecheck

* Fix vitest command

* More vitest migration work

* Minor fixes to tests

* Rename file to types.d.ts

* Replace setQueryContext with QueryClientProvider

* Replace tabs with spaces for repo consistency

* Update examples to sveltekit 1.0

* Implement Hydrate component

* Add playground example

Rewrite of the react example

* Start adding star-wars example

* Add films and film pages

* Finish star-wars example

* Rename store functions with create prefix

* Add correct favicons

* Reorder some files in svelte-query

* Undo rollup.config.ts changes

* Add new createQuery and createMutation tests

* More descriptive test name

* Misc fixes from feedback

- Max TS 4.7.4
- Move root package.json dependencies
- Use object syntax
- Use test:jest script (for now)
- Remove sveltekit autogenerated files

* Fix pnpm-lock

* Specify svelte-package source, update TS to 4.7.4

* Remove unnecessary packages in examples

* Sync pnpm-lock

* Reset pnpm-lock to upstream

* Run pnpm install

* Remove svelte-query from root tsconfg

Needs to be run from its own svelte-check package... sorry

* Run prettier, remove unused import

* Run prettier on svelte files

Requires prettier-plugin-svelte to run

* Prettier for changed files

* Fix cipublish from svelte-query

* rimraf to remove build/lib/package.json

* Run svelte-kit sync before vitest

* Add files field to package.json

* Add types field to package.json

* Bump svelte-query version to 4.20.0

In case this fixes the CI issue

* Add path alias to vitest

* Update vitest to 0.26

Changes module resolution?

* More CI improvements

* Remove --parallel from pnpm scripts

* Remove unused dependency

* Add eslint settings

Thanks @rivo420

* Add coverage report

Co-authored-by: DeAndre Johnson <dre@phreshr.com>
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>

RELEASE_ALL
2023-01-08 12:28:07 +01:00
Rivo Tüksammel
85ce6db9a8
chore(env): cross platform preinstall CI check. (#4775) 2023-01-07 12:50:08 +01:00
Tanner Linsley
e7e5c96d5b release: v4.20.10 2023-01-05 14:05:21 +00:00