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

5,168 commits

Author SHA1 Message Date
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
James
32b04d2ef8
docs(vue-query): fix import path in vue installation docs (#4665)
* Fix VueQueryPlugin import path

* update second import
2022-12-21 10:02:12 +01:00
Damian Osipiuk
3cfd00c27a
docs: vue docs with refs and replacements of react docs (#4656) 2022-12-19 11:14:43 +01:00
xiaoyao
83a6d1b13b
docs: Update Overview.md (#4657)
update overview demo code
2022-12-18 13:14:11 +01:00
Damian Osipiuk
198017b75d
docs: align routing with framework switcher (#4608)
* docs: align routing with framework switcher

Co-authored-by: Aryan Deora <adeora@iu.edu>

* docs: remove angular from docs config

* docs: add doc ref redirect example

Co-authored-by: Aryan Deora <adeora@iu.edu>
2022-12-16 10:25:43 +01:00
Tanner Linsley
2e331bfc7a release: v4.20.5 2022-12-15 22:58:34 +00:00
Alex Kozack
e97c6bce68
refactor(vue-query): replace isRef with unref where possible (#4641) v4.20.5 2022-12-15 23:54:46 +01:00
zognotadog
194a2db83c
docs: update updates-from-mutation-responses.md (#4648)
Missing bracket
2022-12-15 19:24:45 +01:00
Tanner Linsley
4abce31572 release: v4.20.4 2022-12-14 19:01:15 +00:00
Aadesh Chandra
b82f05e302
refactor: disallow implicit returns (#4640) v4.20.4
close TanStack/query/issues/4607
2022-12-14 19:56:06 +01:00
Tanner Linsley
4f9557170d release: v4.20.3 2022-12-14 17:39:38 +00:00
Dominik Dorfmeister
ce1259c720
fix(query-async-storage-persister): support wider range of types (#4639) v4.20.3
* fix(query-async-storage-persister): support wider range of types

interfaces like localforage return a Promise<T> from setItem; we don't really care, as long as it's a Promise

* chore: stabilize test

set a staleTime so that we don't get an additional fetch after the component re-mounts
2022-12-14 14:58:46 +01:00
Tanner Linsley
443b5a8918 release: v4.20.2 2022-12-14 07:32:25 +00:00
Aryan Deora
2e4ca01376
refactor(solid-query): vite-plugin-solid backwards compatibility v4.20.2
RELEASE_ALL
2022-12-14 08:27:11 +01:00
Dominik Dorfmeister
22fbdaf696 chore: stabilize tests 2022-12-14 08:17:10 +01:00
Tanner Linsley
d5501ad017 release: v4.20.1 2022-12-14 07:14:19 +00:00
Eliya Cohen
d261823cc1
fix(eslint-plugin): support rule prefer-object-syntax with multi lines (#4637) v4.20.1
* fix rule prefer-object-syntax with multilines

* simplify
2022-12-14 08:10:28 +01:00
Tanner Linsley
3c9df2028c release: v4.20.0 2022-12-13 19:35:29 +00:00
Damian Osipiuk
57ecd32776
feat(vue-query): allow to pass queryClient directly in useQueries options (#4625) v4.20.0
* feat(vue-query): allow to pass queryClient directly in useQueries options

* chore: fix formatting

* fix: remove deprecation message in production

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2022-12-13 20:30:56 +01:00
Dimitri Mitropoulos
d7275d14f3
chore: remove leftover lerna config (#4632) 2022-12-13 20:05:22 +01:00
Ronald Rey
d2e9d3ea3b
docs(query-cancellation): remove more references to old cancel fn (#4631)
Apparently these were missed in a1050eb0d7.

It is confusing because the [Migration to v4 guide](https://tanstack.com/query/v4/docs/guides/migrating-to-react-query-4#the-cancel-method-on-promises-is-no-longer-supported) 
states that the `cancel` property in promises is no longer supported, but the docs for Query Cancellation seem to imply that it is.

I assume that it is not supported anymore based on the commit linked above, the migration guide and my own testing.
If that is indeed the case, let's clean this up.
2022-12-13 20:04:34 +01:00
Dominik Dorfmeister
2a370abc8c
docs(examples): prefer object syntax for examples (#4621)
* docs: make useQuery use the object syntax

* docs(examples): useTransition doesn't have a timeout option anymore

* docs(examples): prefer object syntax for queryClient methods

* docs(examples): prefer object syntax for solid examples

* docs(examples): prefer object syntax for vue examples

* docs(examples): prefer object syntax for mutation examples
2022-12-11 11:54:49 +01:00
Tanner Linsley
9b21609350 release: v4.19.1 2022-12-03 13:53:23 +00:00
Dominik Dorfmeister
6df7b6f971
fix(query-core): revert isServer check to check for window (#4592) v4.19.1
because document is not defined in react-native
additionally, we can check for `Deno` being available on the window to support the Deno runtime
2022-12-03 14:49:10 +01:00
jmlee2k
5ebc68a1d3
docs(useQuery): remove reference to setQueryData from onSuccess doc (#4585)
onSuccess ISN'T called after setQueryData since
PR #2969
2022-12-02 15:53:56 +01:00
Tanner Linsley
24ac9f9e00 release: v4.19.0 2022-12-01 20:18:31 +00:00
Gaurav Singh
34e0ad239b
feat(query-core): improve environment check to support more server runtimes (#4578) v4.19.0 2022-12-01 21:13:33 +01:00