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

5,194 commits

Author SHA1 Message Date
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
Artem Malko
7101bf3c0e
fix(eslint-plugin-query): update eslint-exhaustive-deps rule description (#4760) v4.20.10 2023-01-05 14:34:35 +01:00
Nguyễn Anh Thiện
6ad74411e6
docs(guides refetchOnWindowFocus): more clear instructions for the use (#4759) 2023-01-05 11:06:08 +01:00
Tanner Linsley
d7d98a9789 release: v4.20.9 2023-01-04 08:34:17 +00:00
Scott Kyle
05a61b102d
fix(query-core): allow multiple roots to share same QueryClient (#4636) v4.20.9
* fix(query-core): allow multiple roots to share same QueryClient

If two roots shared the `QueryClient` instance, then it would never unsubscribe from online/focus manager listeners and would also forever receive duplicate events because the unsubscriber functions would get "forgotten".

These issues would be especially noticeable on React Native apps where multiple roots that share the same `QueryClient` are common.

* test(QueryClient): Add test for multiple mounts, single unmount

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2023-01-04 09:29:55 +01:00
Hasan
70ddaa902e
docs: Add reactotron-react-query plugin (#4744) 2023-01-03 18:45:54 +01:00
Tanner Linsley
cf1846e330
Update README.md
All contributors was out of date.
2023-01-03 09:57:32 -07:00
Aryan Deora
17afa9b787
(fix: solid-query): Revert breaking build (#4733)
This is in reference to the breaking build in solid-query.
Because client Context value is never passed into the provider
RELEASE_ALL
2023-01-01 16:50:37 +01:00
allcontributors[bot]
7d3f80386d
add Moshyfawn as a contributor for code (#4731)
* update README.md [skip ci]

* update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-12-30 22:31:37 +01:00
Damian Osipiuk
fa04a1d26b
docs(vue-query): fix vue-query imports in docs, correct section replacements (#4728) 2022-12-30 17:27:17 +01:00
Dominik Dorfmeister
afbd788af5
docs: fix reference to course 2022-12-30 11:13:04 +01:00
Tanner Linsley
934b8941ec release: v4.20.8 2022-12-30 08:37:28 +00:00
Eliya Cohen
243af3ece9
fix(eslint-plugin-query): exhaustive-deps false positives (#4725) v4.20.8 2022-12-30 09:33:31 +01:00
Damian Osipiuk
46fae940e1
docs(vue-query): migrate vue-query docs (#4710)
* docs: vue guides

* docs: vue query docs part 2

* docs: vue-query docs part 3

* docs: vue-query docs part 4

* docs: vue-query api reference

* docs: vue-query examples

* docs: fix TanStack casing
2022-12-29 09:24:43 +01:00
Bram van Leur
55001bfe92
docs(examples): Fix react-router example (#4719)
Use `queryKey` attribute to check for existing data.

Co-authored-by: Bram van Leur <bvanleur@bol.com>
2022-12-29 09:01:37 +01:00
allcontributors[bot]
f7a496fa9d
add Mamoanwar97 as a contributor for code (#4707)
* update README.md [skip ci]

* update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-12-25 19:30:52 +01:00
Tanner Linsley
499d911771 release: v4.20.7 2022-12-25 18:05:05 +00:00
Eliya Cohen
1d7ef5a165
fix(eslint-plugin): allow query key factory style (#4704) v4.20.7
* allow query key factory style

* fix conflict
2022-12-25 16:29:26 +01:00
Tanner Linsley
3c91dbdf3b release: v4.20.6 2022-12-25 12:32:36 +00:00
Eliya Cohen
2e80cf7413
fix(eslint-plugin-query): prefer object syntax should not remove generics (#4703) v4.20.6 2022-12-25 13:28:51 +01:00
Johannes Przymusinski
454482c4d1
docs(vue-query): add example for dependent queries (#4330)
* docs(examples/vue): add example for dependent queries

* docs(examples/vue): don't unwrap authorId in queryKey

* docs(examples/vue): run pnpm i

* chore: apply code formatting
2022-12-23 10:08:18 +01:00