@tanstack/vue-query 5.107.1 → 5.108.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -3
- package/build/legacy/devtools/devtools.cjs +1 -1
- package/build/legacy/devtools/devtools.cjs.map +1 -1
- package/build/legacy/devtools/devtools.d.cts +1 -1
- package/build/legacy/devtools/devtools.d.ts +1 -1
- package/build/legacy/devtools/devtools.js +1 -1
- package/build/legacy/devtools/devtools.js.map +1 -1
- package/build/legacy/index.cjs +1 -1
- package/build/legacy/index.d.cts +3 -3
- package/build/legacy/index.d.ts +3 -3
- package/build/legacy/index.js +1 -1
- package/build/legacy/{infiniteQueryOptions-BSwO8rvy.d.cts → infiniteQueryOptions-CLfd_vOE.d.cts} +23 -15
- package/build/legacy/infiniteQueryOptions-CLfd_vOE.d.cts.map +1 -0
- package/build/legacy/{infiniteQueryOptions-Bq8UQFvj.d.ts → infiniteQueryOptions-vEnw-JaW.d.ts} +23 -15
- package/build/legacy/infiniteQueryOptions-vEnw-JaW.d.ts.map +1 -0
- package/build/legacy/infiniteQueryOptions.d.cts +1 -1
- package/build/legacy/infiniteQueryOptions.d.ts +1 -1
- package/build/{modern/queryClient-Bgw9hMbf.d.ts → legacy/queryClient-6AWIHAhP.d.ts} +2 -2
- package/build/legacy/{queryClient-Bgw9hMbf.d.ts.map → queryClient-6AWIHAhP.d.ts.map} +1 -1
- package/build/{modern/queryClient-BSSPWSvX.d.cts → legacy/queryClient-yJW8K_VP.d.cts} +2 -2
- package/build/legacy/{queryClient-BSSPWSvX.d.cts.map → queryClient-yJW8K_VP.d.cts.map} +1 -1
- package/build/legacy/queryClient.cjs +1 -1
- package/build/legacy/queryClient.cjs.map +1 -1
- package/build/legacy/queryClient.d.cts +1 -1
- package/build/legacy/queryClient.d.ts +1 -1
- package/build/legacy/queryClient.js +1 -1
- package/build/legacy/queryClient.js.map +1 -1
- package/build/{modern/queryOptions-B-eHjgaY.d.cts → legacy/queryOptions-nndmAASX.d.cts} +17 -14
- package/build/legacy/queryOptions-nndmAASX.d.cts.map +1 -0
- package/build/{modern/queryOptions-D1-foH1W.d.ts → legacy/queryOptions-v0l6M7Eo.d.ts} +17 -14
- package/build/legacy/queryOptions-v0l6M7Eo.d.ts.map +1 -0
- package/build/legacy/queryOptions.cjs.map +1 -1
- package/build/legacy/queryOptions.d.cts +1 -1
- package/build/legacy/queryOptions.d.ts +1 -1
- package/build/legacy/queryOptions.js.map +1 -1
- package/build/legacy/types-u_Tu5Ybs.d.cts.map +1 -1
- package/build/legacy/types-u_Tu5Ybs.d.ts.map +1 -1
- package/build/legacy/useBaseQuery.cjs.map +1 -1
- package/build/legacy/useBaseQuery.d.cts +1 -1
- package/build/legacy/useBaseQuery.d.ts +1 -1
- package/build/legacy/useBaseQuery.js.map +1 -1
- package/build/legacy/useInfiniteQuery.cjs.map +1 -1
- package/build/legacy/useInfiniteQuery.d.cts +1 -1
- package/build/legacy/useInfiniteQuery.d.ts +1 -1
- package/build/legacy/useInfiniteQuery.js.map +1 -1
- package/build/legacy/useIsFetching.cjs.map +1 -1
- package/build/legacy/useIsFetching.d.cts +1 -1
- package/build/legacy/useIsFetching.d.ts +1 -1
- package/build/legacy/useIsFetching.js.map +1 -1
- package/build/legacy/useMutation.cjs.map +1 -1
- package/build/legacy/useMutation.d.cts +1 -1
- package/build/legacy/useMutation.d.ts +1 -1
- package/build/legacy/useMutation.js.map +1 -1
- package/build/legacy/useMutationState.cjs.map +1 -1
- package/build/legacy/useMutationState.d.cts +1 -1
- package/build/legacy/useMutationState.d.ts +1 -1
- package/build/legacy/useMutationState.js.map +1 -1
- package/build/legacy/usePrefetchInfiniteQuery.cjs.map +1 -1
- package/build/legacy/usePrefetchInfiniteQuery.d.cts +1 -1
- package/build/legacy/usePrefetchInfiniteQuery.d.ts +1 -1
- package/build/legacy/usePrefetchInfiniteQuery.js.map +1 -1
- package/build/legacy/usePrefetchQuery.cjs.map +1 -1
- package/build/legacy/usePrefetchQuery.d.cts +1 -1
- package/build/legacy/usePrefetchQuery.d.ts +1 -1
- package/build/legacy/usePrefetchQuery.js.map +1 -1
- package/build/legacy/useQueries.cjs.map +1 -1
- package/build/legacy/useQueries.d.cts +2 -2
- package/build/legacy/useQueries.d.cts.map +1 -1
- package/build/legacy/useQueries.d.ts +2 -2
- package/build/legacy/useQueries.d.ts.map +1 -1
- package/build/legacy/useQueries.js.map +1 -1
- package/build/legacy/useQuery.cjs.map +1 -1
- package/build/legacy/useQuery.d.cts +37 -24
- package/build/legacy/useQuery.d.cts.map +1 -1
- package/build/legacy/useQuery.d.ts +37 -24
- package/build/legacy/useQuery.d.ts.map +1 -1
- package/build/legacy/useQuery.js.map +1 -1
- package/build/legacy/useQueryClient.cjs.map +1 -1
- package/build/legacy/useQueryClient.d.cts +1 -1
- package/build/legacy/useQueryClient.d.cts.map +1 -1
- package/build/legacy/useQueryClient.d.ts +1 -1
- package/build/legacy/useQueryClient.d.ts.map +1 -1
- package/build/legacy/useQueryClient.js.map +1 -1
- package/build/legacy/utils.cjs.map +1 -1
- package/build/legacy/utils.js.map +1 -1
- package/build/legacy/vueQueryPlugin.cjs +1 -1
- package/build/legacy/vueQueryPlugin.cjs.map +1 -1
- package/build/legacy/vueQueryPlugin.d.cts +1 -1
- package/build/legacy/vueQueryPlugin.d.cts.map +1 -1
- package/build/legacy/vueQueryPlugin.d.ts +1 -1
- package/build/legacy/vueQueryPlugin.d.ts.map +1 -1
- package/build/legacy/vueQueryPlugin.js +1 -1
- package/build/legacy/vueQueryPlugin.js.map +1 -1
- package/build/modern/devtools/devtools.cjs +1 -1
- package/build/modern/devtools/devtools.cjs.map +1 -1
- package/build/modern/devtools/devtools.d.cts +1 -1
- package/build/modern/devtools/devtools.d.ts +1 -1
- package/build/modern/devtools/devtools.js +1 -1
- package/build/modern/devtools/devtools.js.map +1 -1
- package/build/modern/index.cjs +1 -1
- package/build/modern/index.d.cts +3 -3
- package/build/modern/index.d.ts +3 -3
- package/build/modern/index.js +1 -1
- package/build/modern/{infiniteQueryOptions-BSwO8rvy.d.cts → infiniteQueryOptions-CLfd_vOE.d.cts} +23 -15
- package/build/modern/infiniteQueryOptions-CLfd_vOE.d.cts.map +1 -0
- package/build/modern/{infiniteQueryOptions-Bq8UQFvj.d.ts → infiniteQueryOptions-vEnw-JaW.d.ts} +23 -15
- package/build/modern/infiniteQueryOptions-vEnw-JaW.d.ts.map +1 -0
- package/build/modern/infiniteQueryOptions.d.cts +1 -1
- package/build/modern/infiniteQueryOptions.d.ts +1 -1
- package/build/{legacy/queryClient-Bgw9hMbf.d.ts → modern/queryClient-6AWIHAhP.d.ts} +2 -2
- package/build/modern/{queryClient-Bgw9hMbf.d.ts.map → queryClient-6AWIHAhP.d.ts.map} +1 -1
- package/build/{legacy/queryClient-BSSPWSvX.d.cts → modern/queryClient-yJW8K_VP.d.cts} +2 -2
- package/build/modern/{queryClient-BSSPWSvX.d.cts.map → queryClient-yJW8K_VP.d.cts.map} +1 -1
- package/build/modern/queryClient.cjs +1 -1
- package/build/modern/queryClient.cjs.map +1 -1
- package/build/modern/queryClient.d.cts +1 -1
- package/build/modern/queryClient.d.ts +1 -1
- package/build/modern/queryClient.js +1 -1
- package/build/modern/queryClient.js.map +1 -1
- package/build/{legacy/queryOptions-B-eHjgaY.d.cts → modern/queryOptions-nndmAASX.d.cts} +17 -14
- package/build/modern/queryOptions-nndmAASX.d.cts.map +1 -0
- package/build/{legacy/queryOptions-D1-foH1W.d.ts → modern/queryOptions-v0l6M7Eo.d.ts} +17 -14
- package/build/modern/queryOptions-v0l6M7Eo.d.ts.map +1 -0
- package/build/modern/queryOptions.cjs.map +1 -1
- package/build/modern/queryOptions.d.cts +1 -1
- package/build/modern/queryOptions.d.ts +1 -1
- package/build/modern/queryOptions.js.map +1 -1
- package/build/modern/types-u_Tu5Ybs.d.cts.map +1 -1
- package/build/modern/types-u_Tu5Ybs.d.ts.map +1 -1
- package/build/modern/useBaseQuery.cjs.map +1 -1
- package/build/modern/useBaseQuery.d.cts +1 -1
- package/build/modern/useBaseQuery.d.ts +1 -1
- package/build/modern/useBaseQuery.js.map +1 -1
- package/build/modern/useInfiniteQuery.cjs.map +1 -1
- package/build/modern/useInfiniteQuery.d.cts +1 -1
- package/build/modern/useInfiniteQuery.d.ts +1 -1
- package/build/modern/useInfiniteQuery.js.map +1 -1
- package/build/modern/useIsFetching.cjs.map +1 -1
- package/build/modern/useIsFetching.d.cts +1 -1
- package/build/modern/useIsFetching.d.ts +1 -1
- package/build/modern/useIsFetching.js.map +1 -1
- package/build/modern/useMutation.cjs.map +1 -1
- package/build/modern/useMutation.d.cts +1 -1
- package/build/modern/useMutation.d.ts +1 -1
- package/build/modern/useMutation.js.map +1 -1
- package/build/modern/useMutationState.cjs.map +1 -1
- package/build/modern/useMutationState.d.cts +1 -1
- package/build/modern/useMutationState.d.ts +1 -1
- package/build/modern/useMutationState.js.map +1 -1
- package/build/modern/usePrefetchInfiniteQuery.cjs.map +1 -1
- package/build/modern/usePrefetchInfiniteQuery.d.cts +1 -1
- package/build/modern/usePrefetchInfiniteQuery.d.ts +1 -1
- package/build/modern/usePrefetchInfiniteQuery.js.map +1 -1
- package/build/modern/usePrefetchQuery.cjs.map +1 -1
- package/build/modern/usePrefetchQuery.d.cts +1 -1
- package/build/modern/usePrefetchQuery.d.ts +1 -1
- package/build/modern/usePrefetchQuery.js.map +1 -1
- package/build/modern/useQueries.cjs.map +1 -1
- package/build/modern/useQueries.d.cts +2 -2
- package/build/modern/useQueries.d.cts.map +1 -1
- package/build/modern/useQueries.d.ts +2 -2
- package/build/modern/useQueries.d.ts.map +1 -1
- package/build/modern/useQueries.js.map +1 -1
- package/build/modern/useQuery.cjs.map +1 -1
- package/build/modern/useQuery.d.cts +37 -24
- package/build/modern/useQuery.d.cts.map +1 -1
- package/build/modern/useQuery.d.ts +37 -24
- package/build/modern/useQuery.d.ts.map +1 -1
- package/build/modern/useQuery.js.map +1 -1
- package/build/modern/useQueryClient.cjs.map +1 -1
- package/build/modern/useQueryClient.d.cts +1 -1
- package/build/modern/useQueryClient.d.cts.map +1 -1
- package/build/modern/useQueryClient.d.ts +1 -1
- package/build/modern/useQueryClient.d.ts.map +1 -1
- package/build/modern/useQueryClient.js.map +1 -1
- package/build/modern/utils.cjs.map +1 -1
- package/build/modern/utils.js.map +1 -1
- package/build/modern/vueQueryPlugin.cjs +1 -1
- package/build/modern/vueQueryPlugin.cjs.map +1 -1
- package/build/modern/vueQueryPlugin.d.cts +1 -1
- package/build/modern/vueQueryPlugin.d.cts.map +1 -1
- package/build/modern/vueQueryPlugin.d.ts +1 -1
- package/build/modern/vueQueryPlugin.d.ts.map +1 -1
- package/build/modern/vueQueryPlugin.js +1 -1
- package/build/modern/vueQueryPlugin.js.map +1 -1
- package/package.json +12 -2
- package/src/devtools/devtools.ts +2 -2
- package/src/index.ts +1 -0
- package/src/queryClient.ts +12 -12
- package/src/queryOptions.ts +23 -20
- package/src/types.ts +2 -0
- package/src/useBaseQuery.ts +3 -3
- package/src/useInfiniteQuery.ts +27 -21
- package/src/useIsFetching.ts +2 -2
- package/src/useMutation.ts +4 -4
- package/src/useMutationState.ts +2 -2
- package/src/usePrefetchInfiniteQuery.ts +1 -1
- package/src/usePrefetchQuery.ts +1 -1
- package/src/useQueries.ts +2 -3
- package/src/useQuery.ts +36 -23
- package/src/useQueryClient.ts +0 -1
- package/src/utils.ts +2 -2
- package/src/vueQueryPlugin.ts +2 -3
- package/build/legacy/infiniteQueryOptions-BSwO8rvy.d.cts.map +0 -1
- package/build/legacy/infiniteQueryOptions-Bq8UQFvj.d.ts.map +0 -1
- package/build/legacy/queryOptions-B-eHjgaY.d.cts.map +0 -1
- package/build/legacy/queryOptions-D1-foH1W.d.ts.map +0 -1
- package/build/modern/infiniteQueryOptions-BSwO8rvy.d.cts.map +0 -1
- package/build/modern/infiniteQueryOptions-Bq8UQFvj.d.ts.map +0 -1
- package/build/modern/queryOptions-B-eHjgaY.d.cts.map +0 -1
- package/build/modern/queryOptions-D1-foH1W.d.ts.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getClientKey } from "./utils.js";
|
|
2
|
-
import { QueryClient as QueryClient$1 } from "./queryClient.js";
|
|
3
2
|
import { setupDevtools } from "./devtools/devtools.js";
|
|
3
|
+
import { QueryClient as QueryClient$1 } from "./queryClient.js";
|
|
4
4
|
import { environmentManager } from "@tanstack/query-core";
|
|
5
5
|
import { isVue2 } from "vue-demi";
|
|
6
6
|
// src/vueQueryPlugin.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vueQueryPlugin.js","names":["QueryClient"],"sources":["../../src/vueQueryPlugin.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"vueQueryPlugin.js","names":["QueryClient"],"sources":["../../src/vueQueryPlugin.ts"],"sourcesContent":["import { environmentManager } from '@tanstack/query-core'\nimport { isVue2 } from 'vue-demi'\nimport { setupDevtools } from './devtools/devtools'\nimport { QueryClient } from './queryClient'\nimport { getClientKey } from './utils'\nimport type { QueryClientConfig } from './types'\n\ntype ClientPersister = (client: QueryClient) => [() => void, Promise<void>]\n\ninterface CommonOptions {\n /** Enables the legacy Vue Devtools v6 plugin panel. Prefer `@tanstack/vue-query-devtools` for Vue 3 apps. */\n enableDevtoolsV6Plugin?: boolean\n /**\n * Distinguishes multiple `QueryClient`s provided in the same app — pass the same key to `useQueryClient` to\n * pick this one. Only needed when installing more than one client.\n */\n queryClientKey?: string\n /**\n * Restores a persisted cache before the app mounts. While it runs, `queryClient.isRestoring` is `true`, which\n * suppresses fetches — see `usePersistQueryClient` in `@tanstack/query-persist-client-core` for building one.\n */\n clientPersister?: ClientPersister\n /** Called once `clientPersister`'s returned promise resolves and the cache has finished restoring. */\n clientPersisterOnSuccess?: (client: QueryClient) => void\n}\n\ninterface ConfigOptions extends CommonOptions {\n /** Options for the `QueryClient` the plugin constructs. Ignored if `queryClient` is also set. */\n queryClientConfig?: QueryClientConfig\n}\n\ninterface ClientOptions extends CommonOptions {\n /** Use your own `QueryClient` instance instead of having the plugin construct one from `queryClientConfig`. */\n queryClient?: QueryClient\n}\n\n/**\n * The options accepted by `VueQueryPlugin`: either a `queryClient` to install, or a `queryClientConfig` for the\n * client the plugin creates, plus the shared options.\n */\nexport type VueQueryPluginOptions = ConfigOptions | ClientOptions\n\n/**\n * Installs a `QueryClient` on the Vue app, making it available to every descendant component through\n * `useQueryClient` — the Vue equivalent of React's `QueryClientProvider`, but wired up as an app-level plugin\n * instead of a wrapping component.\n * @example\n * ```ts\n * import { createApp } from 'vue'\n * import { VueQueryPlugin } from '@tanstack/vue-query'\n *\n * const app = createApp(App)\n * app.use(VueQueryPlugin)\n * ```\n * @example\n * Pass a `queryClient` you constructed yourself — useful for SSR, where you need a fresh `QueryClient` per\n * request, or when the same instance also needs to be used outside of Vue components:\n * ```ts\n * import { QueryClient, VueQueryPlugin } from '@tanstack/vue-query'\n *\n * const queryClient = new QueryClient()\n * app.use(VueQueryPlugin, { queryClient })\n * ```\n * @example\n * Or pass `queryClientConfig` to let the plugin construct the `QueryClient` for you, with your own defaults:\n * ```ts\n * app.use(VueQueryPlugin, {\n * queryClientConfig: {\n * defaultOptions: { queries: { staleTime: 5 * 1000 } },\n * },\n * })\n * ```\n */\nexport const VueQueryPlugin = {\n install: (app: any, options: VueQueryPluginOptions = {}) => {\n const clientKey = getClientKey(options.queryClientKey)\n let client: QueryClient\n\n if ('queryClient' in options && options.queryClient) {\n client = options.queryClient\n } else {\n const clientConfig =\n 'queryClientConfig' in options ? options.queryClientConfig : undefined\n client = new QueryClient(clientConfig)\n }\n\n if (!environmentManager.isServer()) {\n client.mount()\n }\n\n let persisterUnmount = () => {\n // noop\n }\n\n if (options.clientPersister) {\n if (client.isRestoring) {\n client.isRestoring.value = true\n }\n const [unmount, promise] = options.clientPersister(client)\n persisterUnmount = unmount\n promise.then(\n () => {\n if (client.isRestoring) {\n client.isRestoring.value = false\n }\n options.clientPersisterOnSuccess?.(client)\n },\n () => {\n if (client.isRestoring) {\n client.isRestoring.value = false\n }\n },\n )\n }\n\n const cleanup = () => {\n client.unmount()\n persisterUnmount()\n }\n\n if (app.onUnmount) {\n app.onUnmount(cleanup)\n } else {\n const originalUnmount = app.unmount\n app.unmount = function vueQueryUnmount() {\n cleanup()\n originalUnmount()\n }\n }\n\n if (isVue2) {\n app.mixin({\n beforeCreate() {\n // HACK: taken from provide(): https://github.com/vuejs/composition-api/blob/master/src/apis/inject.ts#L30\n if (!this._provided) {\n const provideCache = {}\n Object.defineProperty(this, '_provided', {\n get: () => provideCache,\n set: (v) => Object.assign(provideCache, v),\n })\n }\n\n this._provided[clientKey] = client\n\n if (process.env.NODE_ENV === 'development') {\n if (this === this.$root && options.enableDevtoolsV6Plugin) {\n setupDevtools(this, client)\n }\n }\n },\n })\n } else {\n app.provide(clientKey, client)\n\n if (process.env.NODE_ENV === 'development') {\n if (options.enableDevtoolsV6Plugin) {\n setupDevtools(app, client)\n }\n }\n }\n },\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyEA,MAAa,iBAAiB,EAC5B,UAAU,KAAU,UAAiC,CAAC,MAAM;CAC1D,MAAM,YAAY,aAAa,QAAQ,cAAc;CACrD,IAAI;CAEJ,IAAI,iBAAiB,WAAW,QAAQ,aACtC,SAAS,QAAQ;MACZ;EACL,MAAM,eACJ,uBAAuB,UAAU,QAAQ,oBAAoB,KAAA;EAC/D,SAAS,IAAIA,cAAY,YAAY;CACvC;CAEA,IAAI,CAAC,mBAAmB,SAAS,GAC/B,OAAO,MAAM;CAGf,IAAI,yBAAyB,CAE7B;CAEA,IAAI,QAAQ,iBAAiB;EAC3B,IAAI,OAAO,aACT,OAAO,YAAY,QAAQ;EAE7B,MAAM,CAAC,SAAS,WAAW,QAAQ,gBAAgB,MAAM;EACzD,mBAAmB;EACnB,QAAQ,WACA;GACJ,IAAI,OAAO,aACT,OAAO,YAAY,QAAQ;GAE7B,QAAQ,2BAA2B,MAAM;EAC3C,SACM;GACJ,IAAI,OAAO,aACT,OAAO,YAAY,QAAQ;EAE/B,CACF;CACF;CAEA,MAAM,gBAAgB;EACpB,OAAO,QAAQ;EACf,iBAAiB;CACnB;CAEA,IAAI,IAAI,WACN,IAAI,UAAU,OAAO;MAChB;EACL,MAAM,kBAAkB,IAAI;EAC5B,IAAI,UAAU,SAAS,kBAAkB;GACvC,QAAQ;GACR,gBAAgB;EAClB;CACF;CAEA,IAAI,QACF,IAAI,MAAM,EACR,eAAe;EAEb,IAAI,CAAC,KAAK,WAAW;GACnB,MAAM,eAAe,CAAC;GACtB,OAAO,eAAe,MAAM,aAAa;IACvC,WAAW;IACX,MAAM,MAAM,OAAO,OAAO,cAAc,CAAC;GAC3C,CAAC;EACH;EAEA,KAAK,UAAU,aAAa;EAE5B,IAAI,QAAQ,IAAI,aAAa,eACvB;OAAA,SAAS,KAAK,SAAS,QAAQ,wBACjC,cAAc,MAAM,MAAM;EAAA;CAGhC,EACF,CAAC;MACI;EACL,IAAI,QAAQ,WAAW,MAAM;EAE7B,IAAI,QAAQ,IAAI,aAAa,eACvB;OAAA,QAAQ,wBACV,cAAc,KAAK,MAAM;EAAA;CAG/B;AACF,EACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/vue-query",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.108.0",
|
|
4
4
|
"description": "Hooks for managing, caching and syncing asynchronous and remote data in Vue",
|
|
5
5
|
"author": "Damian Osipiuk",
|
|
6
6
|
"license": "MIT",
|
|
@@ -14,6 +14,16 @@
|
|
|
14
14
|
"type": "github",
|
|
15
15
|
"url": "https://github.com/sponsors/tannerlinsley"
|
|
16
16
|
},
|
|
17
|
+
"nx": {
|
|
18
|
+
"targets": {
|
|
19
|
+
"test:lib": {
|
|
20
|
+
"parallelism": false
|
|
21
|
+
},
|
|
22
|
+
"test:types": {
|
|
23
|
+
"parallelism": false
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
},
|
|
17
27
|
"type": "module",
|
|
18
28
|
"types": "build/legacy/index.d.ts",
|
|
19
29
|
"main": "build/legacy/index.cjs",
|
|
@@ -40,7 +50,7 @@
|
|
|
40
50
|
],
|
|
41
51
|
"dependencies": {
|
|
42
52
|
"@tanstack/match-sorter-utils": "^9.1.2",
|
|
43
|
-
"@tanstack/query-core": "5.
|
|
53
|
+
"@tanstack/query-core": "5.108.0",
|
|
44
54
|
"@vue/devtools-api": "^6.6.3",
|
|
45
55
|
"vue-demi": "^0.14.10"
|
|
46
56
|
},
|
package/src/devtools/devtools.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { setupDevtoolsPlugin } from '@vue/devtools-api'
|
|
2
1
|
import { rankItem } from '@tanstack/match-sorter-utils'
|
|
3
2
|
import { onlineManager } from '@tanstack/query-core'
|
|
3
|
+
import { setupDevtoolsPlugin } from '@vue/devtools-api'
|
|
4
4
|
import {
|
|
5
5
|
getQueryStateLabel,
|
|
6
6
|
getQueryStatusBg,
|
|
7
7
|
getQueryStatusFg,
|
|
8
8
|
sortFns,
|
|
9
9
|
} from './utils'
|
|
10
|
-
import type { CustomInspectorNode } from '@vue/devtools-api'
|
|
11
10
|
import type { Query, QueryCacheNotifyEvent } from '@tanstack/query-core'
|
|
11
|
+
import type { CustomInspectorNode } from '@vue/devtools-api'
|
|
12
12
|
import type { QueryClient } from '../queryClient'
|
|
13
13
|
|
|
14
14
|
const pluginId = 'vue-query'
|
package/src/index.ts
CHANGED
package/src/queryClient.ts
CHANGED
|
@@ -1,17 +1,8 @@
|
|
|
1
|
-
import { nextTick, ref } from 'vue-demi'
|
|
2
1
|
import { QueryClient as QC } from '@tanstack/query-core'
|
|
3
|
-
import {
|
|
4
|
-
import { QueryCache } from './queryCache'
|
|
2
|
+
import { nextTick, ref } from 'vue-demi'
|
|
5
3
|
import { MutationCache } from './mutationCache'
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import type {
|
|
9
|
-
MaybeRef,
|
|
10
|
-
MaybeRefDeep,
|
|
11
|
-
MaybeRefOrGetter,
|
|
12
|
-
NoUnknown,
|
|
13
|
-
QueryClientConfig,
|
|
14
|
-
} from './types'
|
|
4
|
+
import { QueryCache } from './queryCache'
|
|
5
|
+
import { cloneDeepUnref } from './utils'
|
|
15
6
|
import type {
|
|
16
7
|
CancelOptions,
|
|
17
8
|
DefaultError,
|
|
@@ -40,6 +31,15 @@ import type {
|
|
|
40
31
|
SetDataOptions,
|
|
41
32
|
Updater,
|
|
42
33
|
} from '@tanstack/query-core'
|
|
34
|
+
import type { Ref } from 'vue-demi'
|
|
35
|
+
import type { UseQueryOptions } from './queryOptions'
|
|
36
|
+
import type {
|
|
37
|
+
MaybeRef,
|
|
38
|
+
MaybeRefDeep,
|
|
39
|
+
MaybeRefOrGetter,
|
|
40
|
+
NoUnknown,
|
|
41
|
+
QueryClientConfig,
|
|
42
|
+
} from './types'
|
|
43
43
|
|
|
44
44
|
type VueQueryExecutionOptions<TOptions extends { queryKey: unknown }> =
|
|
45
45
|
MaybeRef<{
|
package/src/queryOptions.ts
CHANGED
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
DeepUnwrapRef,
|
|
3
|
-
MaybeRef,
|
|
4
|
-
MaybeRefDeep,
|
|
5
|
-
MaybeRefOrGetter,
|
|
6
|
-
ShallowOption,
|
|
7
|
-
} from './types'
|
|
8
1
|
import type {
|
|
9
2
|
DefaultError,
|
|
10
3
|
InitialDataFunction,
|
|
@@ -14,12 +7,20 @@ import type {
|
|
|
14
7
|
QueryKeyWithDataTag,
|
|
15
8
|
QueryObserverOptions,
|
|
16
9
|
} from '@tanstack/query-core'
|
|
10
|
+
import type {
|
|
11
|
+
DeepUnwrapRef,
|
|
12
|
+
MaybeRef,
|
|
13
|
+
MaybeRefDeep,
|
|
14
|
+
MaybeRefOrGetter,
|
|
15
|
+
ShallowOption,
|
|
16
|
+
} from './types'
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
|
-
* `enabled` for Vue Query. A `ref
|
|
20
|
-
* (`() => ...`) is too: it is called while tracking dependencies. query-core's
|
|
21
|
-
* kept as that callback and is not tracked by Vue — a `ref` read inside it is current
|
|
22
|
-
* and a `ref` change does not by itself call it again.
|
|
19
|
+
* `enabled` for Vue Query. A `ref` or `computed` is reactive, while a plain boolean isn't tracked on its own. A
|
|
20
|
+
* zero-argument getter (`() => ...`) is reactive too: it is called while tracking dependencies. query-core's
|
|
21
|
+
* `(query) => boolean` is kept as that callback and is not tracked by Vue — a `ref` read inside it is current
|
|
22
|
+
* when core calls it, and a `ref` change does not by itself call it again. The two are told apart by the number
|
|
23
|
+
* of declared parameters, so declare `query` as a required parameter.
|
|
23
24
|
*/
|
|
24
25
|
export type VueQueryEnabledOption<
|
|
25
26
|
TQueryFnData,
|
|
@@ -36,7 +37,8 @@ export type VueQueryEnabledOption<
|
|
|
36
37
|
* {@link UseQueryOptions}, which accepts the same options as `ref`s and `computed`s too.
|
|
37
38
|
* @template TQueryFnData - The type your `queryFn` resolves to.
|
|
38
39
|
* @template TError - The type of errors your `queryFn` may throw.
|
|
39
|
-
* @template TData - The type `data` ends up as after `select` runs.
|
|
40
|
+
* @template TData - The type `data` ends up as after `select` runs. Defaults to `TQueryFnData` when no
|
|
41
|
+
* `select` is used.
|
|
40
42
|
* @template TQueryData - The type of data stored in the cache, before `select` runs. Defaults to
|
|
41
43
|
* `TQueryFnData` and can be configured independently of it.
|
|
42
44
|
* @template TQueryKey - The type of your `queryKey`.
|
|
@@ -78,13 +80,13 @@ export type QueryOptions<
|
|
|
78
80
|
type SkipTokenForUseQuery = symbol
|
|
79
81
|
|
|
80
82
|
/**
|
|
81
|
-
* The options accepted by `queryOptions`, `useQuery`, and the other query hooks. `enabled`
|
|
82
|
-
*
|
|
83
|
-
* `(query) => boolean` callback is accepted too and is passed through
|
|
84
|
-
* through a `ref` or a reactive getter for the array itself, or `ref`s and reactive
|
|
85
|
-
* entries. Other options are read once when passed as a plain value, and stay reactive
|
|
86
|
-
* or a `computed`. Only `enabled` and `queryKey` read a function as a getter, so
|
|
87
|
-
* `computed`: a function there is the query function itself.
|
|
83
|
+
* The options accepted by `queryOptions`, `useQuery`, and the other query hooks. `enabled` accepts a `ref`, a
|
|
84
|
+
* plain boolean, or a zero-argument getter (`() => ...`): a `ref` or a getter is tracked, while a plain boolean
|
|
85
|
+
* isn't tracked on its own. query-core's `(query) => boolean` callback is accepted too and is passed through
|
|
86
|
+
* untracked. `queryKey` reacts through a `ref` or a reactive getter for the array itself, or `ref`s and reactive
|
|
87
|
+
* getters as individual entries. Other options are read once when passed as a plain value, and stay reactive
|
|
88
|
+
* when passed as a `ref` or a `computed`. Only `enabled` and `queryKey` read a function as a getter, so
|
|
89
|
+
* `queryFn` reacts through a `computed`: a function there is the query function itself.
|
|
88
90
|
*
|
|
89
91
|
* If you instead pass a getter for the whole options object (`useQuery(() => ({ ... }))`), every option
|
|
90
92
|
* inside it — including `staleTime`, `retry`, and `select` — is re-evaluated whenever the getter's own
|
|
@@ -97,7 +99,8 @@ type SkipTokenForUseQuery = symbol
|
|
|
97
99
|
* re-evaluates.
|
|
98
100
|
* @template TQueryFnData - The type your `queryFn` resolves to.
|
|
99
101
|
* @template TError - The type of errors your `queryFn` may throw.
|
|
100
|
-
* @template TData - The type `data` ends up as after `select` runs.
|
|
102
|
+
* @template TData - The type `data` ends up as after `select` runs. Defaults to `TQueryFnData` when no
|
|
103
|
+
* `select` is used.
|
|
101
104
|
* @template TQueryData - The type of data stored in the cache, before `select` runs. Defaults to
|
|
102
105
|
* `TQueryFnData` and can be configured independently of it.
|
|
103
106
|
* @template TQueryKey - The type of your `queryKey`.
|
package/src/types.ts
CHANGED
|
@@ -13,6 +13,7 @@ import type { ComputedRef, Ref, UnwrapRef } from 'vue-demi'
|
|
|
13
13
|
type Primitive = string | number | boolean | bigint | symbol | undefined | null
|
|
14
14
|
type UnwrapLeaf =
|
|
15
15
|
| Primitive
|
|
16
|
+
// oxlint-disable-next-line typescript/no-unsafe-function-type -- leaves every function-like value, including constructors, unwrapped
|
|
16
17
|
| Function
|
|
17
18
|
| Date
|
|
18
19
|
| Error
|
|
@@ -44,6 +45,7 @@ export type MaybeRefOrGetter<T> = MaybeRef<T> | (() => T)
|
|
|
44
45
|
* object as a whole.
|
|
45
46
|
*/
|
|
46
47
|
export type MaybeRefDeep<T> = MaybeRef<
|
|
48
|
+
// oxlint-disable-next-line typescript/no-unsafe-function-type -- keeps every function-like value, including constructors, as it is
|
|
47
49
|
T extends Function
|
|
48
50
|
? T
|
|
49
51
|
: T extends object
|
package/src/useBaseQuery.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { shouldThrowError } from '@tanstack/query-core'
|
|
1
2
|
import {
|
|
2
3
|
computed,
|
|
3
4
|
getCurrentScope,
|
|
@@ -9,20 +10,19 @@ import {
|
|
|
9
10
|
toRefs,
|
|
10
11
|
watch,
|
|
11
12
|
} from 'vue-demi'
|
|
12
|
-
import { shouldThrowError } from '@tanstack/query-core'
|
|
13
13
|
import { useQueryClient } from './useQueryClient'
|
|
14
14
|
import { cloneDeepUnref, updateState } from './utils'
|
|
15
|
-
import type { Ref } from 'vue-demi'
|
|
16
15
|
import type {
|
|
17
16
|
DefaultedQueryObserverOptions,
|
|
18
17
|
QueryKey,
|
|
19
18
|
QueryObserver,
|
|
20
19
|
QueryObserverResult,
|
|
21
20
|
} from '@tanstack/query-core'
|
|
21
|
+
import type { Ref } from 'vue-demi'
|
|
22
22
|
import type { QueryClient } from './queryClient'
|
|
23
23
|
import type { UseQueryOptions } from './queryOptions'
|
|
24
|
-
import type { UseInfiniteQueryOptions } from './useInfiniteQuery'
|
|
25
24
|
import type { MaybeRefOrGetter } from './types'
|
|
25
|
+
import type { UseInfiniteQueryOptions } from './useInfiniteQuery'
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* Readonly view of a union that stays a union. A single `Readonly<Union>` collapses the members, which
|
package/src/useInfiniteQuery.ts
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import { InfiniteQueryObserver } from '@tanstack/query-core'
|
|
2
2
|
import { useBaseQuery } from './useBaseQuery'
|
|
3
|
-
import type {
|
|
4
|
-
DefinedInitialDataInfiniteOptions,
|
|
5
|
-
UndefinedInitialDataInfiniteOptions,
|
|
6
|
-
} from './infiniteQueryOptions'
|
|
7
|
-
import type { VueQueryEnabledOption } from './queryOptions'
|
|
8
3
|
import type {
|
|
9
4
|
DefaultError,
|
|
10
5
|
DefinedInfiniteQueryObserverResult,
|
|
@@ -14,9 +9,12 @@ import type {
|
|
|
14
9
|
QueryKey,
|
|
15
10
|
QueryObserver,
|
|
16
11
|
} from '@tanstack/query-core'
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
import type {
|
|
13
|
+
DefinedInitialDataInfiniteOptions,
|
|
14
|
+
UndefinedInitialDataInfiniteOptions,
|
|
15
|
+
} from './infiniteQueryOptions'
|
|
16
|
+
import type { QueryClient } from './queryClient'
|
|
17
|
+
import type { VueQueryEnabledOption } from './queryOptions'
|
|
20
18
|
import type {
|
|
21
19
|
DeepUnwrapRef,
|
|
22
20
|
MaybeRef,
|
|
@@ -24,12 +22,17 @@ import type {
|
|
|
24
22
|
MaybeRefOrGetter,
|
|
25
23
|
ShallowOption,
|
|
26
24
|
} from './types'
|
|
27
|
-
import type {
|
|
25
|
+
import type { UseBaseQueryReturnType } from './useBaseQuery'
|
|
28
26
|
|
|
29
27
|
/**
|
|
30
|
-
* The options accepted by `useInfiniteQuery`.
|
|
31
|
-
* `@tanstack/query-core
|
|
32
|
-
* `enabled` a
|
|
28
|
+
* The options accepted by `useInfiniteQuery`. Extends {@link InfiniteQueryObserverOptions} from
|
|
29
|
+
* `@tanstack/query-core` with the `vue-query`-specific `shallow` option. Each option except `shallow` can also
|
|
30
|
+
* be a `ref` (and `enabled` a zero-argument getter or query-core's `(query) => boolean` callback).
|
|
31
|
+
* @template TQueryFnData - The type of a single page, as your `queryFn` resolves it.
|
|
32
|
+
* @template TError - The type of errors your `queryFn` may throw.
|
|
33
|
+
* @template TData - The type `data` ends up as after `select` runs — defaults to `TQueryFnData`.
|
|
34
|
+
* @template TQueryKey - The type of your `queryKey`.
|
|
35
|
+
* @template TPageParam - The type of the parameter passed to `queryFn` to fetch a given page.
|
|
33
36
|
*/
|
|
34
37
|
export type UseInfiniteQueryOptions<
|
|
35
38
|
TQueryFnData = unknown,
|
|
@@ -94,9 +97,10 @@ export type UseInfiniteQueryDefinedReturnType<TData, TError> =
|
|
|
94
97
|
* This overload is selected when `initialData` is known to be defined, so the resulting `data` is never
|
|
95
98
|
* `undefined` (unless a `select` changes `TData` to include `undefined`).
|
|
96
99
|
*
|
|
97
|
-
* `enabled`
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
+
* `enabled` accepts a `ref`, a plain boolean, or a zero-argument getter (`() => ...`): a `ref` or a getter is
|
|
101
|
+
* tracked, while a plain boolean isn't tracked on its own. query-core's `(query) => boolean` callback is
|
|
102
|
+
* accepted too and is passed through untracked. `queryKey` reacts through a `ref` for the array itself, or
|
|
103
|
+
* `ref`s and reactive getters as individual entries — the array itself can't be a bare getter.
|
|
100
104
|
* @param options - The {@link DefinedInitialDataInfiniteOptions} to use — everything you can pass to
|
|
101
105
|
* `useInfiniteQuery`, with `initialData` known to be defined.
|
|
102
106
|
* @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one provided by `VueQueryPlugin`
|
|
@@ -157,9 +161,10 @@ export function useInfiniteQuery<
|
|
|
157
161
|
* The options for `useInfiniteQuery` are identical to `useQuery`, with the addition of
|
|
158
162
|
* `initialPageParam`, `getNextPageParam`, `getPreviousPageParam`, and `maxPages`.
|
|
159
163
|
*
|
|
160
|
-
* `enabled`
|
|
161
|
-
*
|
|
162
|
-
*
|
|
164
|
+
* `enabled` accepts a `ref`, a plain boolean, or a zero-argument getter (`() => ...`): a `ref` or a getter is
|
|
165
|
+
* tracked, while a plain boolean isn't tracked on its own. query-core's `(query) => boolean` callback is
|
|
166
|
+
* accepted too and is passed through untracked. `queryKey` reacts through a `ref` for the array itself, or
|
|
167
|
+
* `ref`s and reactive getters as individual entries — the array itself can't be a bare getter.
|
|
163
168
|
* @param options - The {@link UndefinedInitialDataInfiniteOptions} to use — everything you can pass to
|
|
164
169
|
* `useInfiniteQuery`.
|
|
165
170
|
* @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one provided by `VueQueryPlugin`
|
|
@@ -289,9 +294,10 @@ export function useInfiniteQuery<
|
|
|
289
294
|
* `ref`/reactive object built up conditionally, rather than a plain object literal. Prefer one of the other
|
|
290
295
|
* overloads when possible, since they infer whether `data` can be `undefined` from `initialData` directly.
|
|
291
296
|
*
|
|
292
|
-
* `enabled`
|
|
293
|
-
*
|
|
294
|
-
*
|
|
297
|
+
* `enabled` accepts a `ref`, a plain boolean, or a zero-argument getter (`() => ...`): a `ref` or a getter is
|
|
298
|
+
* tracked, while a plain boolean isn't tracked on its own. query-core's `(query) => boolean` callback is
|
|
299
|
+
* accepted too and is passed through untracked. `queryKey` reacts through a `ref` for the array itself, or
|
|
300
|
+
* `ref`s and reactive getters as individual entries — the array itself can't be a bare getter.
|
|
295
301
|
* @param options - A `ref`, plain value, or reactive getter resolving to the {@link UseInfiniteQueryOptions} to
|
|
296
302
|
* use.
|
|
297
303
|
* @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one provided by `VueQueryPlugin`
|
package/src/useIsFetching.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { getCurrentScope, onScopeDispose, ref, watchEffect } from 'vue-demi'
|
|
2
2
|
import { useQueryClient } from './useQueryClient'
|
|
3
3
|
import { cloneDeepUnref } from './utils'
|
|
4
|
-
import type { Ref } from 'vue-demi'
|
|
5
4
|
import type { QueryFilters } from '@tanstack/query-core'
|
|
6
|
-
import type {
|
|
5
|
+
import type { Ref } from 'vue-demi'
|
|
7
6
|
import type { QueryClient } from './queryClient'
|
|
7
|
+
import type { MaybeRefDeep } from './types'
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* The filters accepted by `useIsFetching`: {@link QueryFilters} as a plain object, a `ref`, or a reactive
|
package/src/useMutation.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MutationObserver, shouldThrowError } from '@tanstack/query-core'
|
|
1
2
|
import {
|
|
2
3
|
computed,
|
|
3
4
|
getCurrentScope,
|
|
@@ -9,18 +10,17 @@ import {
|
|
|
9
10
|
toRefs,
|
|
10
11
|
watch,
|
|
11
12
|
} from 'vue-demi'
|
|
12
|
-
import { MutationObserver, shouldThrowError } from '@tanstack/query-core'
|
|
13
|
-
import { cloneDeepUnref, updateState } from './utils'
|
|
14
13
|
import { useQueryClient } from './useQueryClient'
|
|
15
|
-
import
|
|
14
|
+
import { cloneDeepUnref, updateState } from './utils'
|
|
16
15
|
import type {
|
|
17
16
|
DefaultError,
|
|
18
17
|
DistributiveOmit,
|
|
19
18
|
MutateFunction,
|
|
20
19
|
MutationObserverResult,
|
|
21
20
|
} from '@tanstack/query-core'
|
|
22
|
-
import type {
|
|
21
|
+
import type { ToRefs } from 'vue-demi'
|
|
23
22
|
import type { QueryClient } from './queryClient'
|
|
23
|
+
import type { MaybeRefDeep, MutationOptions } from './types'
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* The {@link MutationObserverResult} properties without `mutate` and `reset`, which `useMutation` replaces with
|
package/src/useMutationState.ts
CHANGED
|
@@ -8,15 +8,15 @@ import {
|
|
|
8
8
|
} from 'vue-demi'
|
|
9
9
|
import { useQueryClient } from './useQueryClient'
|
|
10
10
|
import { cloneDeepUnref } from './utils'
|
|
11
|
-
import type { Ref } from 'vue-demi'
|
|
12
11
|
import type {
|
|
13
12
|
Mutation,
|
|
14
13
|
MutationFilters,
|
|
15
14
|
MutationState,
|
|
16
15
|
} from '@tanstack/query-core'
|
|
16
|
+
import type { Ref } from 'vue-demi'
|
|
17
|
+
import type { MutationCache } from './mutationCache'
|
|
17
18
|
import type { QueryClient } from './queryClient'
|
|
18
19
|
import type { MaybeRefDeep } from './types'
|
|
19
|
-
import type { MutationCache } from './mutationCache'
|
|
20
20
|
|
|
21
21
|
type VueMutationFilters = MaybeRefDeep<MutationFilters>
|
|
22
22
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getCurrentScope, unref, watchEffect } from 'vue-demi'
|
|
2
1
|
import { noop } from '@tanstack/query-core'
|
|
2
|
+
import { getCurrentScope, unref, watchEffect } from 'vue-demi'
|
|
3
3
|
import { useQueryClient } from './useQueryClient'
|
|
4
4
|
import { cloneDeepUnref } from './utils'
|
|
5
5
|
import type {
|
package/src/usePrefetchQuery.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getCurrentScope, unref, watchEffect } from 'vue-demi'
|
|
2
1
|
import { noop } from '@tanstack/query-core'
|
|
2
|
+
import { getCurrentScope, unref, watchEffect } from 'vue-demi'
|
|
3
3
|
import { useQueryClient } from './useQueryClient'
|
|
4
4
|
import { cloneDeepUnref } from './utils'
|
|
5
5
|
import type {
|
package/src/useQueries.ts
CHANGED
|
@@ -9,10 +9,8 @@ import {
|
|
|
9
9
|
unref,
|
|
10
10
|
watch,
|
|
11
11
|
} from 'vue-demi'
|
|
12
|
-
|
|
13
12
|
import { useQueryClient } from './useQueryClient'
|
|
14
13
|
import { cloneDeepUnref } from './utils'
|
|
15
|
-
import type { Ref } from 'vue-demi'
|
|
16
14
|
import type {
|
|
17
15
|
DefaultError,
|
|
18
16
|
DefinedQueryObserverResult,
|
|
@@ -22,8 +20,9 @@ import type {
|
|
|
22
20
|
QueryObserverResult,
|
|
23
21
|
ThrowOnError,
|
|
24
22
|
} from '@tanstack/query-core'
|
|
25
|
-
import type {
|
|
23
|
+
import type { Ref } from 'vue-demi'
|
|
26
24
|
import type { QueryClient } from './queryClient'
|
|
25
|
+
import type { UseQueryOptions } from './queryOptions'
|
|
27
26
|
import type { DeepUnwrapRef, MaybeRefDeep, ShallowOption } from './types'
|
|
28
27
|
|
|
29
28
|
// This defines the `UseQueryOptions` that are accepted in `QueriesOptions` & `GetOptions`.
|
package/src/useQuery.ts
CHANGED
|
@@ -5,14 +5,14 @@ import type {
|
|
|
5
5
|
DefinedQueryObserverResult,
|
|
6
6
|
QueryKey,
|
|
7
7
|
} from '@tanstack/query-core'
|
|
8
|
-
import type { UseBaseQueryReturnType } from './useBaseQuery'
|
|
9
|
-
import type { MaybeRefOrGetter } from './types'
|
|
10
8
|
import type { QueryClient } from './queryClient'
|
|
11
9
|
import type {
|
|
12
10
|
DefinedInitialQueryOptions,
|
|
13
11
|
UndefinedInitialQueryOptions,
|
|
14
12
|
UseQueryOptions,
|
|
15
13
|
} from './queryOptions'
|
|
14
|
+
import type { MaybeRefOrGetter } from './types'
|
|
15
|
+
import type { UseBaseQueryReturnType } from './useBaseQuery'
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* The result of `useQuery` when `initialData` is omitted, may be `undefined`, or is a function that may
|
|
@@ -35,20 +35,24 @@ export type UseQueryDefinedReturnType<TData, TError> = UseBaseQueryReturnType<
|
|
|
35
35
|
>
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
|
-
* This overload is selected when `initialData` is known to be defined, so the resulting `data` is never
|
|
39
|
-
* `undefined` (unless a `select` changes `TData` to include `undefined`).
|
|
38
|
+
* This overload is selected when `initialData` is known to be defined, so the resulting `data` is typed as never
|
|
39
|
+
* `undefined` (unless a `select` changes `TData` to include `undefined`). At runtime, `data` is still `undefined`
|
|
40
|
+
* if `select` throws on its first call.
|
|
40
41
|
*
|
|
41
|
-
* `enabled`
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
42
|
+
* `enabled` accepts a `ref`, a plain boolean, or a zero-argument getter (`() => ...`): a `ref` or a getter is
|
|
43
|
+
* tracked, while a plain boolean isn't tracked on its own. query-core's `(query) => boolean` callback is
|
|
44
|
+
* accepted too and is passed through untracked. `queryKey` reacts through a `ref` or a reactive getter for the
|
|
45
|
+
* array itself, or `ref`s and reactive getters as individual entries. Other options are read once when passed as
|
|
46
|
+
* a plain value, and stay reactive when passed as a `ref` or a `computed`.
|
|
45
47
|
* @param options - The {@link DefinedInitialQueryOptions} to use — everything you can pass to `useQuery`,
|
|
46
48
|
* with `initialData` known to be defined.
|
|
47
49
|
* @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one provided by `VueQueryPlugin`
|
|
48
50
|
* will be used.
|
|
49
|
-
* @returns The current query result, typed so that `
|
|
50
|
-
* `
|
|
51
|
-
* `
|
|
51
|
+
* @returns The current query result, typed so that `status` is `success` or `error` (`status` never resolves
|
|
52
|
+
* to `pending` in this overload's type, since `initialData` guarantees data upfront). `status` is `error` if
|
|
53
|
+
* the query has an error from a fetch that failed after its retries or if `select` threw, and `success`
|
|
54
|
+
* otherwise. `isSuccess`/`isError` are derived boolean `ref`s for convenience. `state` is that result as one
|
|
55
|
+
* readonly reactive object — `state.data`, `state.isPending`, and the rest are plain values.
|
|
52
56
|
* @example
|
|
53
57
|
* ```vue
|
|
54
58
|
* <script setup lang="ts">
|
|
@@ -82,17 +86,20 @@ export function useQuery<
|
|
|
82
86
|
): UseQueryDefinedReturnType<TData, TError>
|
|
83
87
|
|
|
84
88
|
/**
|
|
85
|
-
* `enabled`
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
+
* `enabled` accepts a `ref`, a plain boolean, or a zero-argument getter (`() => ...`): a `ref` or a getter is
|
|
90
|
+
* tracked, while a plain boolean isn't tracked on its own. query-core's `(query) => boolean` callback is
|
|
91
|
+
* accepted too and is passed through untracked. `queryKey` reacts through a `ref` or a reactive getter for the
|
|
92
|
+
* array itself, or `ref`s and reactive getters as individual entries. Other options are read once when passed as
|
|
93
|
+
* a plain value, and stay reactive when passed as a `ref` or a `computed`.
|
|
89
94
|
* @param options - The {@link UndefinedInitialQueryOptions} to use — everything you can pass to `useQuery`.
|
|
90
95
|
* @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one provided by `VueQueryPlugin`
|
|
91
96
|
* will be used.
|
|
92
|
-
* @returns The current query result. `status` is `
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
97
|
+
* @returns The current query result. `status` is `error` if the query has an error from a fetch that failed
|
|
98
|
+
* after its retries or if `select` threw, `success` if the query has cached data (even if `select` returns
|
|
99
|
+
* `undefined`) or data from `placeholderData`, and `pending` otherwise. `isPending`/`isSuccess`/`isError` are
|
|
100
|
+
* derived boolean `ref`s for convenience. `state` is that result as one readonly reactive object —
|
|
101
|
+
* `state.data`, `state.isPending`, and the rest are plain values, and `state.status === 'success'` narrows
|
|
102
|
+
* `state.data` to `TData`.
|
|
96
103
|
* @example
|
|
97
104
|
* A query key built from a reactive `ref` — the query refetches whenever `postId` changes:
|
|
98
105
|
* ```vue
|
|
@@ -246,16 +253,22 @@ export function useQuery<
|
|
|
246
253
|
* `ref`/reactive object built up conditionally, rather than a plain object literal. Prefer one of the other
|
|
247
254
|
* overloads when possible, since they infer whether `data` can be `undefined` from `initialData` directly.
|
|
248
255
|
*
|
|
249
|
-
* `enabled`
|
|
250
|
-
*
|
|
251
|
-
*
|
|
256
|
+
* `enabled` accepts a `ref`, a plain boolean, or a zero-argument getter (`() => ...`): a `ref` or a getter is
|
|
257
|
+
* tracked, while a plain boolean isn't tracked on its own. query-core's `(query) => boolean` callback is
|
|
258
|
+
* accepted too and is passed through untracked. `queryKey` reacts through a `ref` or a reactive getter for the
|
|
259
|
+
* array itself, or `ref`s and reactive getters as individual entries.
|
|
252
260
|
*
|
|
253
261
|
* When `options` itself is a reactive getter, the whole object is re-evaluated on every change to its
|
|
254
262
|
* dependencies, so any option inside it — not just `queryKey` and `enabled` — can change over time.
|
|
255
263
|
* @param options - A `ref`, plain value, or reactive getter resolving to the {@link UseQueryOptions} to use.
|
|
256
264
|
* @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one provided by `VueQueryPlugin`
|
|
257
265
|
* will be used.
|
|
258
|
-
* @returns The current query result
|
|
266
|
+
* @returns The current query result. `status` is `error` if the query has an error from a fetch that failed
|
|
267
|
+
* after its retries or if `select` threw, `success` if the query has cached data (even if `select` returns
|
|
268
|
+
* `undefined`) or data from `placeholderData`, and `pending` otherwise. `isPending`/`isSuccess`/`isError` are
|
|
269
|
+
* derived boolean `ref`s for convenience. `state` is that result as one readonly reactive object —
|
|
270
|
+
* `state.data`, `state.isPending`, and the rest are plain values, and `state.status === 'success'` narrows
|
|
271
|
+
* `state.data` to `TData`.
|
|
259
272
|
* @example
|
|
260
273
|
* Passing a whole-options getter so `staleTime` reacts to a setting stored elsewhere, not just `queryKey`:
|
|
261
274
|
* ```vue
|
package/src/useQueryClient.ts
CHANGED
package/src/utils.ts
CHANGED
|
@@ -127,7 +127,7 @@ export function cloneDeepUnref<T>(
|
|
|
127
127
|
if (unrefGetters && isFunction(val)) {
|
|
128
128
|
// Cast due to older TS versions not allowing calling
|
|
129
129
|
// on certain intersection types.
|
|
130
|
-
return cloneDeepUnref((val as
|
|
130
|
+
return cloneDeepUnref((val as () => any)(), unrefGetters)
|
|
131
131
|
}
|
|
132
132
|
|
|
133
133
|
// Unref refs and continue to recurse into the value.
|
|
@@ -159,7 +159,7 @@ function isPlainObject(value: unknown): value is Record<PropertyKey, unknown> {
|
|
|
159
159
|
* @param value - The value to check.
|
|
160
160
|
* @returns `true` if `value` is a function.
|
|
161
161
|
*/
|
|
162
|
-
function isFunction(value: unknown): value is
|
|
162
|
+
function isFunction(value: unknown): value is (...args: Array<any>) => any {
|
|
163
163
|
return typeof value === 'function'
|
|
164
164
|
}
|
|
165
165
|
|
package/src/vueQueryPlugin.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { isVue2 } from 'vue-demi'
|
|
2
1
|
import { environmentManager } from '@tanstack/query-core'
|
|
3
|
-
|
|
2
|
+
import { isVue2 } from 'vue-demi'
|
|
3
|
+
import { setupDevtools } from './devtools/devtools'
|
|
4
4
|
import { QueryClient } from './queryClient'
|
|
5
5
|
import { getClientKey } from './utils'
|
|
6
|
-
import { setupDevtools } from './devtools/devtools'
|
|
7
6
|
import type { QueryClientConfig } from './types'
|
|
8
7
|
|
|
9
8
|
type ClientPersister = (client: QueryClient) => [() => void, Promise<void>]
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"infiniteQueryOptions-BSwO8rvy.d.cts","names":["QueryClient","QueryClient"],"sources":["../../src/useBaseQuery.ts","../../src/useInfiniteQuery.ts","../../src/infiniteQueryOptions.ts"],"mappings":";;;;;;;;;KA8BK,mBAAmB,KAAK,4BACb,WAAW,IAAI,EAAE;;;;;KAOrB,uBACV,OACA,QACA,UAAU,oBAAoB,OAAO,cAEpC,WAAW,UAAU,8DAIlB,QAAQ,KACR,IAAI,SAAS,SAAS;;;;;;;;;EAU1B,gBAAgB,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+BxB,OAAO,mBAAmB;;KAGvB,uBACH,cACA,QACA,OACA,YACA,kBAAkB,WAAW,UAC7B,wBAEE,gBAAgB,cAAc,QAAQ,OAAO,YAAY,aACzD,wBAAwB,cAAc,QAAQ,OAAO,WAAW;;;;;;;;;iBAUpD,aACd,cACA,QACA,OACA,YACA,kBAAkB,UAClB,YAEA,iBAAiB,eACjB,SAAS,iBACP,uBACE,cACA,QACA,OACA,YACA,WACA,cAGJ,cAAcA,gBACb,uBAAuB,OAAO;;;;;;KClGrB,wBACV,wBACA,SAAS,cACT,QAAQ,cACR,kBAAkB,WAAW,UAC7B,wBACE,YAGE,kBAAkB,6BAChB,cACA,QACA,OACA,WACA,cAED,6BACC,sBACE,cACA,QACA,aAAa,cAAc,aAC3B,cAAc,cAEhB,aACE,6BACE,cACA,QACA,OACA,cAAc,YACd,YACA,gBAEN;;;;;KAOM,2BAA2B,OAAO,UAAU,uBACtD,OACA,QACA,4BAA4B,OAAO;;;;;KAOzB,kCAAkC,OAAO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AAkB,WAAW,UAC7B,sBAEA,SAAS,kCACP,cACA,QACA,OACA,WACA,cAED,kCACD,cACA,QACA,OACA,WACA,cAEA,oBAAoB,WAAW,aAAa,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;iBA0B7C,qBACd,cACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,sBAEA,SAAS,oCACP,cACA,QACA,OACA,WACA,cAED,oCACD,cACA,QACA,OACA,WACA,cAEA,oBAAoB,WAAW,aAAa,eAAe"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"infiniteQueryOptions-Bq8UQFvj.d.ts","names":["QueryClient","QueryClient"],"sources":["../../src/useBaseQuery.ts","../../src/useInfiniteQuery.ts","../../src/infiniteQueryOptions.ts"],"mappings":";;;;;;;;;KA8BK,mBAAmB,KAAK,4BACb,WAAW,IAAI,EAAE;;;;;KAOrB,uBACV,OACA,QACA,UAAU,oBAAoB,OAAO,cAEpC,WAAW,UAAU,8DAIlB,QAAQ,KACR,IAAI,SAAS,SAAS;;;;;;;;;EAU1B,gBAAgB,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+BxB,OAAO,mBAAmB;;KAGvB,uBACH,cACA,QACA,OACA,YACA,kBAAkB,WAAW,UAC7B,wBAEE,gBAAgB,cAAc,QAAQ,OAAO,YAAY,aACzD,wBAAwB,cAAc,QAAQ,OAAO,WAAW;;;;;;;;;iBAUpD,aACd,cACA,QACA,OACA,YACA,kBAAkB,UAClB,YAEA,iBAAiB,eACjB,SAAS,iBACP,uBACE,cACA,QACA,OACA,YACA,WACA,cAGJ,cAAcA,gBACb,uBAAuB,OAAO;;;;;;KClGrB,wBACV,wBACA,SAAS,cACT,QAAQ,cACR,kBAAkB,WAAW,UAC7B,wBACE,YAGE,kBAAkB,6BAChB,cACA,QACA,OACA,WACA,cAED,6BACC,sBACE,cACA,QACA,aAAa,cAAc,aAC3B,cAAc,cAEhB,aACE,6BACE,cACA,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c,sBACtC,kBAAkB,aAAa,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiC1C,qBACd,cACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,sBAEA,SAAS,kCACP,cACA,QACA,OACA,WACA,cAED,kCACD,cACA,QACA,OACA,WACA,cAEA,oBAAoB,WAAW,aAAa,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;iBA0B7C,qBACd,cACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,sBAEA,SAAS,oCACP,cACA,QACA,OACA,WACA,cAED,oCACD,cACA,QACA,OACA,WACA,cAEA,oBAAoB,WAAW,aAAa,eAAe"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"queryOptions-B-eHjgaY.d.cts","names":[],"sources":["../../src/queryOptions.ts"],"mappings":";;;;;;;;KAuBY,sBACV,cACA,QACA,YACA,kBAAkB,YAEhB,wCACA,mBAAmB,cAAc,QAAQ,YAAY;;;;;;;;;;;;KAa7C,aACV,wBACA,SAAS,cACT,QAAQ,cACR,aAAa,cACb,kBAAkB,WAAW,eAG3B,kBAAkB,qBAChB,cACA,QACA,OACA,YACA,aAED,6BACC,sBACE,cACA,QACA,YACA,cAAc,cAEhB,8BACE,iBAAiB,aACjB,qBACE,cACA,QACA,OACA,YACA,cAAc,YACd,eACN;KAGC;;;;;;;;;;;;;;;;;;;;;;;;;;KA2BO,gBACV,wBACA,SAAS,cACT,QAAQ,cACR,aAAa,cACb,kBAAkB,WAAW,YAC3B,YAGE,kBAAkB,qBAChB,cACA,QACA,OACA,YACA,aAED,0CACC,aACE,cACA,QACA,OACA,YACA,WACA,YACF,6BACE,aACI,aACE,cACA,QACA,OACA,YACA,WACA,YACF,wBAEJ,aACE,aACE,cACA,QACA,OACA,YACA,WACA,gBAER;KAGD,yBAAyB;;;;;;;;EAQ5B,0BAEI,oBAAoB,kBAAkB,iBACtC,kBAAkB;;KAGnB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