@tanstack/query-core
Advanced tools
Comparing version 5.51.3 to 5.51.4
@@ -1,3 +0,3 @@ | ||
export { D as DehydrateOptions, x as DehydratedState, H as HydrateOptions, q as defaultShouldDehydrateMutation, p as defaultShouldDehydrateQuery, n as dehydrate, o as hydrate } from './hydration-ByKLEQMr.js'; | ||
export { D as DehydrateOptions, x as DehydratedState, H as HydrateOptions, q as defaultShouldDehydrateMutation, p as defaultShouldDehydrateQuery, n as dehydrate, o as hydrate } from './hydration-B_q3JSpO.js'; | ||
import './removable.js'; | ||
import './subscribable.js'; |
@@ -1,2 +0,2 @@ | ||
export { aT as CancelOptions, C as CancelledError, B as DataTag, y as DefaultError, aS as DefaultOptions, a8 as DefaultedInfiniteQueryObserverOptions, a6 as DefaultedQueryObserverOptions, aA as DefinedInfiniteQueryObserverResult, as as DefinedQueryObserverResult, D as DehydrateOptions, x as DehydratedState, G as Enabled, aa as EnsureQueryDataOptions, ab as FetchInfiniteQueryOptions, ai as FetchNextPageOptions, aj as FetchPreviousPageOptions, a9 as FetchQueryOptions, al as FetchStatus, W as GetNextPageParamFunction, V as GetPreviousPageParamFunction, H as HydrateOptions, X as InfiniteData, au as InfiniteQueryObserverBaseResult, ax as InfiniteQueryObserverLoadingErrorResult, aw as InfiniteQueryObserverLoadingResult, a7 as InfiniteQueryObserverOptions, av as InfiniteQueryObserverPendingResult, ay as InfiniteQueryObserverRefetchErrorResult, aB as InfiniteQueryObserverResult, az as InfiniteQueryObserverSuccessResult, a1 as InfiniteQueryPageParamsOptions, K as InitialDataFunction, a0 as InitialPageParam, ag as InvalidateOptions, ae as InvalidateQueryFilters, aK as MutateFunction, aJ as MutateOptions, v as Mutation, M as MutationCache, d as MutationCacheNotifyEvent, g as MutationFilters, aG as MutationFunction, aC as MutationKey, aF as MutationMeta, e as MutationObserver, aL as MutationObserverBaseResult, aO as MutationObserverErrorResult, aM as MutationObserverIdleResult, aN as MutationObserverLoadingResult, aI as MutationObserverOptions, aQ as MutationObserverResult, aP as MutationObserverSuccessResult, aH as MutationOptions, aE as MutationScope, w as MutationState, aD as MutationStatus, Z as NetworkMode, N as NoInfer, aW as NotifyEvent, aV as NotifyEventType, _ as NotifyOnChangeProps, O as OmitKeyof, a5 as Optional, P as PlaceholderDataFunction, L as QueriesPlaceholderDataFunction, u as Query, Q as QueryCache, a as QueryCacheNotifyEvent, b as QueryClient, aR as QueryClientConfig, j as QueryFilters, E as QueryFunction, J as QueryFunctionContext, z as QueryKey, T as QueryKeyHashFunction, Y as QueryMeta, c as QueryObserver, am as QueryObserverBaseResult, ap as QueryObserverLoadingErrorResult, ao as QueryObserverLoadingResult, a3 as QueryObserverOptions, an as QueryObserverPendingResult, aq as QueryObserverRefetchErrorResult, at as QueryObserverResult, ar as QueryObserverSuccessResult, $ as QueryOptions, I as QueryPersister, t as QueryState, ak as QueryStatus, ad as RefetchOptions, af as RefetchQueryFilters, R as Register, ah as ResetOptions, ac as ResultOptions, aU as SetDataOptions, S as SkipToken, F as StaleTime, a2 as ThrowOnError, U as Updater, a4 as WithRequired, A as dataTagSymbol, q as defaultShouldDehydrateMutation, p as defaultShouldDehydrateQuery, n as dehydrate, h as hashKey, o as hydrate, l as isCancelledError, i as isServer, k as keepPreviousData, f as matchMutation, m as matchQuery, r as replaceEqualDeep, s as skipToken } from './hydration-ByKLEQMr.js'; | ||
export { aT as CancelOptions, C as CancelledError, B as DataTag, y as DefaultError, aS as DefaultOptions, a8 as DefaultedInfiniteQueryObserverOptions, a6 as DefaultedQueryObserverOptions, aA as DefinedInfiniteQueryObserverResult, as as DefinedQueryObserverResult, D as DehydrateOptions, x as DehydratedState, G as Enabled, aa as EnsureQueryDataOptions, ab as FetchInfiniteQueryOptions, ai as FetchNextPageOptions, aj as FetchPreviousPageOptions, a9 as FetchQueryOptions, al as FetchStatus, W as GetNextPageParamFunction, V as GetPreviousPageParamFunction, H as HydrateOptions, X as InfiniteData, au as InfiniteQueryObserverBaseResult, ax as InfiniteQueryObserverLoadingErrorResult, aw as InfiniteQueryObserverLoadingResult, a7 as InfiniteQueryObserverOptions, av as InfiniteQueryObserverPendingResult, ay as InfiniteQueryObserverRefetchErrorResult, aB as InfiniteQueryObserverResult, az as InfiniteQueryObserverSuccessResult, a1 as InfiniteQueryPageParamsOptions, K as InitialDataFunction, a0 as InitialPageParam, ag as InvalidateOptions, ae as InvalidateQueryFilters, aK as MutateFunction, aJ as MutateOptions, v as Mutation, M as MutationCache, d as MutationCacheNotifyEvent, g as MutationFilters, aG as MutationFunction, aC as MutationKey, aF as MutationMeta, e as MutationObserver, aL as MutationObserverBaseResult, aO as MutationObserverErrorResult, aM as MutationObserverIdleResult, aN as MutationObserverLoadingResult, aI as MutationObserverOptions, aQ as MutationObserverResult, aP as MutationObserverSuccessResult, aH as MutationOptions, aE as MutationScope, w as MutationState, aD as MutationStatus, Z as NetworkMode, N as NoInfer, aW as NotifyEvent, aV as NotifyEventType, _ as NotifyOnChangeProps, O as OmitKeyof, a5 as Optional, P as PlaceholderDataFunction, L as QueriesPlaceholderDataFunction, u as Query, Q as QueryCache, a as QueryCacheNotifyEvent, b as QueryClient, aR as QueryClientConfig, j as QueryFilters, E as QueryFunction, J as QueryFunctionContext, z as QueryKey, T as QueryKeyHashFunction, Y as QueryMeta, c as QueryObserver, am as QueryObserverBaseResult, ap as QueryObserverLoadingErrorResult, ao as QueryObserverLoadingResult, a3 as QueryObserverOptions, an as QueryObserverPendingResult, aq as QueryObserverRefetchErrorResult, at as QueryObserverResult, ar as QueryObserverSuccessResult, $ as QueryOptions, I as QueryPersister, t as QueryState, ak as QueryStatus, ad as RefetchOptions, af as RefetchQueryFilters, R as Register, ah as ResetOptions, ac as ResultOptions, aU as SetDataOptions, S as SkipToken, F as StaleTime, a2 as ThrowOnError, U as Updater, a4 as WithRequired, A as dataTagSymbol, q as defaultShouldDehydrateMutation, p as defaultShouldDehydrateQuery, n as dehydrate, h as hashKey, o as hydrate, l as isCancelledError, i as isServer, k as keepPreviousData, f as matchMutation, m as matchQuery, r as replaceEqualDeep, s as skipToken } from './hydration-B_q3JSpO.js'; | ||
export { QueriesObserver, QueriesObserverOptions } from './queriesObserver.js'; | ||
@@ -3,0 +3,0 @@ export { InfiniteQueryObserver } from './infiniteQueryObserver.js'; |
@@ -1,2 +0,2 @@ | ||
import { aX as QueryBehavior, X as InfiniteData, a1 as InfiniteQueryPageParamsOptions } from './hydration-ByKLEQMr.js'; | ||
import { aX as QueryBehavior, X as InfiniteData, a1 as InfiniteQueryPageParamsOptions } from './hydration-B_q3JSpO.js'; | ||
import './removable.js'; | ||
@@ -3,0 +3,0 @@ import './subscribable.js'; |
@@ -101,3 +101,3 @@ import "./chunk-2HYBKCYP.js"; | ||
const lastIndex = pages.length - 1; | ||
return options.getNextPageParam( | ||
return pages.length > 0 ? options.getNextPageParam( | ||
pages[lastIndex], | ||
@@ -107,13 +107,7 @@ pages, | ||
pageParams | ||
); | ||
) : void 0; | ||
} | ||
function getPreviousPageParam(options, { pages, pageParams }) { | ||
var _a; | ||
return (_a = options.getPreviousPageParam) == null ? void 0 : _a.call( | ||
options, | ||
pages[0], | ||
pages, | ||
pageParams[0], | ||
pageParams | ||
); | ||
return pages.length > 0 ? (_a = options.getPreviousPageParam) == null ? void 0 : _a.call(options, pages[0], pages, pageParams[0], pageParams) : void 0; | ||
} | ||
@@ -120,0 +114,0 @@ function hasNextPage(options, data) { |
@@ -1,2 +0,2 @@ | ||
import { y as DefaultError, X as InfiniteData, z as QueryKey, c as QueryObserver, aB as InfiniteQueryObserverResult, aY as ObserverFetchOptions, b as QueryClient, a7 as InfiniteQueryObserverOptions, aZ as NotifyOptions, a8 as DefaultedInfiniteQueryObserverOptions, ai as FetchNextPageOptions, aj as FetchPreviousPageOptions, u as Query } from './hydration-ByKLEQMr.js'; | ||
import { y as DefaultError, X as InfiniteData, z as QueryKey, c as QueryObserver, aB as InfiniteQueryObserverResult, aY as ObserverFetchOptions, b as QueryClient, a7 as InfiniteQueryObserverOptions, aZ as NotifyOptions, a8 as DefaultedInfiniteQueryObserverOptions, ai as FetchNextPageOptions, aj as FetchPreviousPageOptions, u as Query } from './hydration-B_q3JSpO.js'; | ||
import './removable.js'; | ||
@@ -3,0 +3,0 @@ import './subscribable.js'; |
import './removable.js'; | ||
export { bn as Action, v as Mutation, w as MutationState, bo as getDefaultState } from './hydration-ByKLEQMr.js'; | ||
export { bn as Action, v as Mutation, w as MutationState, bo as getDefaultState } from './hydration-B_q3JSpO.js'; | ||
import './subscribable.js'; |
@@ -1,3 +0,3 @@ | ||
export { M as MutationCache, d as MutationCacheNotifyEvent } from './hydration-ByKLEQMr.js'; | ||
export { M as MutationCache, d as MutationCacheNotifyEvent } from './hydration-B_q3JSpO.js'; | ||
import './subscribable.js'; | ||
import './removable.js'; |
import './subscribable.js'; | ||
export { e as MutationObserver } from './hydration-ByKLEQMr.js'; | ||
export { e as MutationObserver } from './hydration-B_q3JSpO.js'; | ||
import './removable.js'; |
@@ -1,2 +0,2 @@ | ||
import { at as QueryObserverResult, b as QueryClient, a3 as QueryObserverOptions, aZ as NotifyOptions, u as Query, z as QueryKey, c as QueryObserver } from './hydration-ByKLEQMr.js'; | ||
import { at as QueryObserverResult, b as QueryClient, a3 as QueryObserverOptions, aZ as NotifyOptions, u as Query, z as QueryKey, c as QueryObserver } from './hydration-B_q3JSpO.js'; | ||
import { Subscribable } from './subscribable.js'; | ||
@@ -3,0 +3,0 @@ import './removable.js'; |
import './removable.js'; | ||
export { b2 as Action, a_ as FetchContext, a$ as FetchDirection, b0 as FetchMeta, b1 as FetchOptions, u as Query, aX as QueryBehavior, t as QueryState, b3 as SetStateOptions, b4 as fetchState } from './hydration-ByKLEQMr.js'; | ||
export { b2 as Action, a_ as FetchContext, a$ as FetchDirection, b0 as FetchMeta, b1 as FetchOptions, u as Query, aX as QueryBehavior, t as QueryState, b3 as SetStateOptions, b4 as fetchState } from './hydration-B_q3JSpO.js'; | ||
import './subscribable.js'; |
@@ -1,3 +0,3 @@ | ||
export { Q as QueryCache, a as QueryCacheNotifyEvent, bm as QueryStore } from './hydration-ByKLEQMr.js'; | ||
export { Q as QueryCache, a as QueryCacheNotifyEvent, bm as QueryStore } from './hydration-B_q3JSpO.js'; | ||
import './subscribable.js'; | ||
import './removable.js'; |
@@ -1,3 +0,3 @@ | ||
export { b as QueryClient } from './hydration-ByKLEQMr.js'; | ||
export { b as QueryClient } from './hydration-B_q3JSpO.js'; | ||
import './removable.js'; | ||
import './subscribable.js'; |
import './subscribable.js'; | ||
export { aZ as NotifyOptions, aY as ObserverFetchOptions, c as QueryObserver } from './hydration-ByKLEQMr.js'; | ||
export { aZ as NotifyOptions, aY as ObserverFetchOptions, c as QueryObserver } from './hydration-B_q3JSpO.js'; | ||
import './removable.js'; |
@@ -1,3 +0,3 @@ | ||
export { C as CancelledError, br as RetryDelayValue, bq as RetryValue, bp as Retryer, bs as canFetch, bt as createRetryer, l as isCancelledError } from './hydration-ByKLEQMr.js'; | ||
export { C as CancelledError, br as RetryDelayValue, bq as RetryValue, bp as Retryer, bs as canFetch, bt as createRetryer, l as isCancelledError } from './hydration-B_q3JSpO.js'; | ||
import './removable.js'; | ||
import './subscribable.js'; |
@@ -1,3 +0,3 @@ | ||
export { aT as CancelOptions, B as DataTag, y as DefaultError, aS as DefaultOptions, a8 as DefaultedInfiniteQueryObserverOptions, a6 as DefaultedQueryObserverOptions, aA as DefinedInfiniteQueryObserverResult, as as DefinedQueryObserverResult, G as Enabled, aa as EnsureQueryDataOptions, ab as FetchInfiniteQueryOptions, ai as FetchNextPageOptions, aj as FetchPreviousPageOptions, a9 as FetchQueryOptions, al as FetchStatus, W as GetNextPageParamFunction, V as GetPreviousPageParamFunction, X as InfiniteData, au as InfiniteQueryObserverBaseResult, ax as InfiniteQueryObserverLoadingErrorResult, aw as InfiniteQueryObserverLoadingResult, a7 as InfiniteQueryObserverOptions, av as InfiniteQueryObserverPendingResult, ay as InfiniteQueryObserverRefetchErrorResult, aB as InfiniteQueryObserverResult, az as InfiniteQueryObserverSuccessResult, a1 as InfiniteQueryPageParamsOptions, K as InitialDataFunction, a0 as InitialPageParam, ag as InvalidateOptions, ae as InvalidateQueryFilters, aK as MutateFunction, aJ as MutateOptions, aG as MutationFunction, aC as MutationKey, aF as MutationMeta, aL as MutationObserverBaseResult, aO as MutationObserverErrorResult, aM as MutationObserverIdleResult, aN as MutationObserverLoadingResult, aI as MutationObserverOptions, aQ as MutationObserverResult, aP as MutationObserverSuccessResult, aH as MutationOptions, aE as MutationScope, aD as MutationStatus, Z as NetworkMode, N as NoInfer, aW as NotifyEvent, aV as NotifyEventType, _ as NotifyOnChangeProps, O as OmitKeyof, a5 as Optional, P as PlaceholderDataFunction, L as QueriesPlaceholderDataFunction, aR as QueryClientConfig, E as QueryFunction, J as QueryFunctionContext, z as QueryKey, T as QueryKeyHashFunction, Y as QueryMeta, am as QueryObserverBaseResult, ap as QueryObserverLoadingErrorResult, ao as QueryObserverLoadingResult, a3 as QueryObserverOptions, an as QueryObserverPendingResult, aq as QueryObserverRefetchErrorResult, at as QueryObserverResult, ar as QueryObserverSuccessResult, $ as QueryOptions, I as QueryPersister, ak as QueryStatus, ad as RefetchOptions, af as RefetchQueryFilters, R as Register, ah as ResetOptions, ac as ResultOptions, aU as SetDataOptions, F as StaleTime, a2 as ThrowOnError, a4 as WithRequired, A as dataTagSymbol } from './hydration-ByKLEQMr.js'; | ||
export { aT as CancelOptions, B as DataTag, y as DefaultError, aS as DefaultOptions, a8 as DefaultedInfiniteQueryObserverOptions, a6 as DefaultedQueryObserverOptions, aA as DefinedInfiniteQueryObserverResult, as as DefinedQueryObserverResult, G as Enabled, aa as EnsureQueryDataOptions, ab as FetchInfiniteQueryOptions, ai as FetchNextPageOptions, aj as FetchPreviousPageOptions, a9 as FetchQueryOptions, al as FetchStatus, W as GetNextPageParamFunction, V as GetPreviousPageParamFunction, X as InfiniteData, au as InfiniteQueryObserverBaseResult, ax as InfiniteQueryObserverLoadingErrorResult, aw as InfiniteQueryObserverLoadingResult, a7 as InfiniteQueryObserverOptions, av as InfiniteQueryObserverPendingResult, ay as InfiniteQueryObserverRefetchErrorResult, aB as InfiniteQueryObserverResult, az as InfiniteQueryObserverSuccessResult, a1 as InfiniteQueryPageParamsOptions, K as InitialDataFunction, a0 as InitialPageParam, ag as InvalidateOptions, ae as InvalidateQueryFilters, aK as MutateFunction, aJ as MutateOptions, aG as MutationFunction, aC as MutationKey, aF as MutationMeta, aL as MutationObserverBaseResult, aO as MutationObserverErrorResult, aM as MutationObserverIdleResult, aN as MutationObserverLoadingResult, aI as MutationObserverOptions, aQ as MutationObserverResult, aP as MutationObserverSuccessResult, aH as MutationOptions, aE as MutationScope, aD as MutationStatus, Z as NetworkMode, N as NoInfer, aW as NotifyEvent, aV as NotifyEventType, _ as NotifyOnChangeProps, O as OmitKeyof, a5 as Optional, P as PlaceholderDataFunction, L as QueriesPlaceholderDataFunction, aR as QueryClientConfig, E as QueryFunction, J as QueryFunctionContext, z as QueryKey, T as QueryKeyHashFunction, Y as QueryMeta, am as QueryObserverBaseResult, ap as QueryObserverLoadingErrorResult, ao as QueryObserverLoadingResult, a3 as QueryObserverOptions, an as QueryObserverPendingResult, aq as QueryObserverRefetchErrorResult, at as QueryObserverResult, ar as QueryObserverSuccessResult, $ as QueryOptions, I as QueryPersister, ak as QueryStatus, ad as RefetchOptions, af as RefetchQueryFilters, R as Register, ah as ResetOptions, ac as ResultOptions, aU as SetDataOptions, F as StaleTime, a2 as ThrowOnError, a4 as WithRequired, A as dataTagSymbol } from './hydration-B_q3JSpO.js'; | ||
import './removable.js'; | ||
import './subscribable.js'; |
@@ -1,3 +0,3 @@ | ||
export { g as MutationFilters, j as QueryFilters, b5 as QueryTypeFilter, S as SkipToken, U as Updater, bj as addToEnd, bk as addToStart, bl as ensureQueryFn, b7 as functionalUpdate, h as hashKey, bc as hashQueryKeyByOptions, bf as isPlainArray, bg as isPlainObject, i as isServer, b8 as isValidTimeout, k as keepPreviousData, f as matchMutation, m as matchQuery, b6 as noop, bd as partialMatchKey, bi as replaceData, r as replaceEqualDeep, bb as resolveEnabled, ba as resolveStaleTime, be as shallowEqualObjects, s as skipToken, bh as sleep, b9 as timeUntilStale } from './hydration-ByKLEQMr.js'; | ||
export { g as MutationFilters, j as QueryFilters, b5 as QueryTypeFilter, S as SkipToken, U as Updater, bj as addToEnd, bk as addToStart, bl as ensureQueryFn, b7 as functionalUpdate, h as hashKey, bc as hashQueryKeyByOptions, bf as isPlainArray, bg as isPlainObject, i as isServer, b8 as isValidTimeout, k as keepPreviousData, f as matchMutation, m as matchQuery, b6 as noop, bd as partialMatchKey, bi as replaceData, r as replaceEqualDeep, bb as resolveEnabled, ba as resolveStaleTime, be as shallowEqualObjects, s as skipToken, bh as sleep, b9 as timeUntilStale } from './hydration-B_q3JSpO.js'; | ||
import './removable.js'; | ||
import './subscribable.js'; |
@@ -173,5 +173,5 @@ import "./chunk-2HYBKCYP.js"; | ||
} | ||
function sleep(ms) { | ||
function sleep(timeout) { | ||
return new Promise((resolve) => { | ||
setTimeout(resolve, ms); | ||
setTimeout(resolve, timeout); | ||
}); | ||
@@ -199,3 +199,3 @@ } | ||
var skipToken = Symbol(); | ||
var ensureQueryFn = (options, fetchOptions) => { | ||
function ensureQueryFn(options, fetchOptions) { | ||
if (process.env.NODE_ENV !== "production") { | ||
@@ -215,3 +215,3 @@ if (options.queryFn === skipToken) { | ||
return options.queryFn; | ||
}; | ||
} | ||
export { | ||
@@ -218,0 +218,0 @@ addToEnd, |
@@ -1,3 +0,3 @@ | ||
export { D as DehydrateOptions, x as DehydratedState, H as HydrateOptions, q as defaultShouldDehydrateMutation, p as defaultShouldDehydrateQuery, n as dehydrate, o as hydrate } from './hydration-ByKLEQMr.js'; | ||
export { D as DehydrateOptions, x as DehydratedState, H as HydrateOptions, q as defaultShouldDehydrateMutation, p as defaultShouldDehydrateQuery, n as dehydrate, o as hydrate } from './hydration-B_q3JSpO.js'; | ||
import './removable.js'; | ||
import './subscribable.js'; |
@@ -1,2 +0,2 @@ | ||
export { aT as CancelOptions, C as CancelledError, B as DataTag, y as DefaultError, aS as DefaultOptions, a8 as DefaultedInfiniteQueryObserverOptions, a6 as DefaultedQueryObserverOptions, aA as DefinedInfiniteQueryObserverResult, as as DefinedQueryObserverResult, D as DehydrateOptions, x as DehydratedState, G as Enabled, aa as EnsureQueryDataOptions, ab as FetchInfiniteQueryOptions, ai as FetchNextPageOptions, aj as FetchPreviousPageOptions, a9 as FetchQueryOptions, al as FetchStatus, W as GetNextPageParamFunction, V as GetPreviousPageParamFunction, H as HydrateOptions, X as InfiniteData, au as InfiniteQueryObserverBaseResult, ax as InfiniteQueryObserverLoadingErrorResult, aw as InfiniteQueryObserverLoadingResult, a7 as InfiniteQueryObserverOptions, av as InfiniteQueryObserverPendingResult, ay as InfiniteQueryObserverRefetchErrorResult, aB as InfiniteQueryObserverResult, az as InfiniteQueryObserverSuccessResult, a1 as InfiniteQueryPageParamsOptions, K as InitialDataFunction, a0 as InitialPageParam, ag as InvalidateOptions, ae as InvalidateQueryFilters, aK as MutateFunction, aJ as MutateOptions, v as Mutation, M as MutationCache, d as MutationCacheNotifyEvent, g as MutationFilters, aG as MutationFunction, aC as MutationKey, aF as MutationMeta, e as MutationObserver, aL as MutationObserverBaseResult, aO as MutationObserverErrorResult, aM as MutationObserverIdleResult, aN as MutationObserverLoadingResult, aI as MutationObserverOptions, aQ as MutationObserverResult, aP as MutationObserverSuccessResult, aH as MutationOptions, aE as MutationScope, w as MutationState, aD as MutationStatus, Z as NetworkMode, N as NoInfer, aW as NotifyEvent, aV as NotifyEventType, _ as NotifyOnChangeProps, O as OmitKeyof, a5 as Optional, P as PlaceholderDataFunction, L as QueriesPlaceholderDataFunction, u as Query, Q as QueryCache, a as QueryCacheNotifyEvent, b as QueryClient, aR as QueryClientConfig, j as QueryFilters, E as QueryFunction, J as QueryFunctionContext, z as QueryKey, T as QueryKeyHashFunction, Y as QueryMeta, c as QueryObserver, am as QueryObserverBaseResult, ap as QueryObserverLoadingErrorResult, ao as QueryObserverLoadingResult, a3 as QueryObserverOptions, an as QueryObserverPendingResult, aq as QueryObserverRefetchErrorResult, at as QueryObserverResult, ar as QueryObserverSuccessResult, $ as QueryOptions, I as QueryPersister, t as QueryState, ak as QueryStatus, ad as RefetchOptions, af as RefetchQueryFilters, R as Register, ah as ResetOptions, ac as ResultOptions, aU as SetDataOptions, S as SkipToken, F as StaleTime, a2 as ThrowOnError, U as Updater, a4 as WithRequired, A as dataTagSymbol, q as defaultShouldDehydrateMutation, p as defaultShouldDehydrateQuery, n as dehydrate, h as hashKey, o as hydrate, l as isCancelledError, i as isServer, k as keepPreviousData, f as matchMutation, m as matchQuery, r as replaceEqualDeep, s as skipToken } from './hydration-ByKLEQMr.js'; | ||
export { aT as CancelOptions, C as CancelledError, B as DataTag, y as DefaultError, aS as DefaultOptions, a8 as DefaultedInfiniteQueryObserverOptions, a6 as DefaultedQueryObserverOptions, aA as DefinedInfiniteQueryObserverResult, as as DefinedQueryObserverResult, D as DehydrateOptions, x as DehydratedState, G as Enabled, aa as EnsureQueryDataOptions, ab as FetchInfiniteQueryOptions, ai as FetchNextPageOptions, aj as FetchPreviousPageOptions, a9 as FetchQueryOptions, al as FetchStatus, W as GetNextPageParamFunction, V as GetPreviousPageParamFunction, H as HydrateOptions, X as InfiniteData, au as InfiniteQueryObserverBaseResult, ax as InfiniteQueryObserverLoadingErrorResult, aw as InfiniteQueryObserverLoadingResult, a7 as InfiniteQueryObserverOptions, av as InfiniteQueryObserverPendingResult, ay as InfiniteQueryObserverRefetchErrorResult, aB as InfiniteQueryObserverResult, az as InfiniteQueryObserverSuccessResult, a1 as InfiniteQueryPageParamsOptions, K as InitialDataFunction, a0 as InitialPageParam, ag as InvalidateOptions, ae as InvalidateQueryFilters, aK as MutateFunction, aJ as MutateOptions, v as Mutation, M as MutationCache, d as MutationCacheNotifyEvent, g as MutationFilters, aG as MutationFunction, aC as MutationKey, aF as MutationMeta, e as MutationObserver, aL as MutationObserverBaseResult, aO as MutationObserverErrorResult, aM as MutationObserverIdleResult, aN as MutationObserverLoadingResult, aI as MutationObserverOptions, aQ as MutationObserverResult, aP as MutationObserverSuccessResult, aH as MutationOptions, aE as MutationScope, w as MutationState, aD as MutationStatus, Z as NetworkMode, N as NoInfer, aW as NotifyEvent, aV as NotifyEventType, _ as NotifyOnChangeProps, O as OmitKeyof, a5 as Optional, P as PlaceholderDataFunction, L as QueriesPlaceholderDataFunction, u as Query, Q as QueryCache, a as QueryCacheNotifyEvent, b as QueryClient, aR as QueryClientConfig, j as QueryFilters, E as QueryFunction, J as QueryFunctionContext, z as QueryKey, T as QueryKeyHashFunction, Y as QueryMeta, c as QueryObserver, am as QueryObserverBaseResult, ap as QueryObserverLoadingErrorResult, ao as QueryObserverLoadingResult, a3 as QueryObserverOptions, an as QueryObserverPendingResult, aq as QueryObserverRefetchErrorResult, at as QueryObserverResult, ar as QueryObserverSuccessResult, $ as QueryOptions, I as QueryPersister, t as QueryState, ak as QueryStatus, ad as RefetchOptions, af as RefetchQueryFilters, R as Register, ah as ResetOptions, ac as ResultOptions, aU as SetDataOptions, S as SkipToken, F as StaleTime, a2 as ThrowOnError, U as Updater, a4 as WithRequired, A as dataTagSymbol, q as defaultShouldDehydrateMutation, p as defaultShouldDehydrateQuery, n as dehydrate, h as hashKey, o as hydrate, l as isCancelledError, i as isServer, k as keepPreviousData, f as matchMutation, m as matchQuery, r as replaceEqualDeep, s as skipToken } from './hydration-B_q3JSpO.js'; | ||
export { QueriesObserver, QueriesObserverOptions } from './queriesObserver.js'; | ||
@@ -3,0 +3,0 @@ export { InfiniteQueryObserver } from './infiniteQueryObserver.js'; |
@@ -1,2 +0,2 @@ | ||
import { aX as QueryBehavior, X as InfiniteData, a1 as InfiniteQueryPageParamsOptions } from './hydration-ByKLEQMr.js'; | ||
import { aX as QueryBehavior, X as InfiniteData, a1 as InfiniteQueryPageParamsOptions } from './hydration-B_q3JSpO.js'; | ||
import './removable.js'; | ||
@@ -3,0 +3,0 @@ import './subscribable.js'; |
@@ -96,3 +96,3 @@ // src/infiniteQueryBehavior.ts | ||
const lastIndex = pages.length - 1; | ||
return options.getNextPageParam( | ||
return pages.length > 0 ? options.getNextPageParam( | ||
pages[lastIndex], | ||
@@ -102,11 +102,6 @@ pages, | ||
pageParams | ||
); | ||
) : void 0; | ||
} | ||
function getPreviousPageParam(options, { pages, pageParams }) { | ||
return options.getPreviousPageParam?.( | ||
pages[0], | ||
pages, | ||
pageParams[0], | ||
pageParams | ||
); | ||
return pages.length > 0 ? options.getPreviousPageParam?.(pages[0], pages, pageParams[0], pageParams) : void 0; | ||
} | ||
@@ -113,0 +108,0 @@ function hasNextPage(options, data) { |
@@ -1,2 +0,2 @@ | ||
import { y as DefaultError, X as InfiniteData, z as QueryKey, c as QueryObserver, aB as InfiniteQueryObserverResult, aY as ObserverFetchOptions, b as QueryClient, a7 as InfiniteQueryObserverOptions, aZ as NotifyOptions, a8 as DefaultedInfiniteQueryObserverOptions, ai as FetchNextPageOptions, aj as FetchPreviousPageOptions, u as Query } from './hydration-ByKLEQMr.js'; | ||
import { y as DefaultError, X as InfiniteData, z as QueryKey, c as QueryObserver, aB as InfiniteQueryObserverResult, aY as ObserverFetchOptions, b as QueryClient, a7 as InfiniteQueryObserverOptions, aZ as NotifyOptions, a8 as DefaultedInfiniteQueryObserverOptions, ai as FetchNextPageOptions, aj as FetchPreviousPageOptions, u as Query } from './hydration-B_q3JSpO.js'; | ||
import './removable.js'; | ||
@@ -3,0 +3,0 @@ import './subscribable.js'; |
import './removable.js'; | ||
export { bn as Action, v as Mutation, w as MutationState, bo as getDefaultState } from './hydration-ByKLEQMr.js'; | ||
export { bn as Action, v as Mutation, w as MutationState, bo as getDefaultState } from './hydration-B_q3JSpO.js'; | ||
import './subscribable.js'; |
@@ -1,3 +0,3 @@ | ||
export { M as MutationCache, d as MutationCacheNotifyEvent } from './hydration-ByKLEQMr.js'; | ||
export { M as MutationCache, d as MutationCacheNotifyEvent } from './hydration-B_q3JSpO.js'; | ||
import './subscribable.js'; | ||
import './removable.js'; |
import './subscribable.js'; | ||
export { e as MutationObserver } from './hydration-ByKLEQMr.js'; | ||
export { e as MutationObserver } from './hydration-B_q3JSpO.js'; | ||
import './removable.js'; |
@@ -1,2 +0,2 @@ | ||
import { at as QueryObserverResult, b as QueryClient, a3 as QueryObserverOptions, aZ as NotifyOptions, u as Query, z as QueryKey, c as QueryObserver } from './hydration-ByKLEQMr.js'; | ||
import { at as QueryObserverResult, b as QueryClient, a3 as QueryObserverOptions, aZ as NotifyOptions, u as Query, z as QueryKey, c as QueryObserver } from './hydration-B_q3JSpO.js'; | ||
import { Subscribable } from './subscribable.js'; | ||
@@ -3,0 +3,0 @@ import './removable.js'; |
import './removable.js'; | ||
export { b2 as Action, a_ as FetchContext, a$ as FetchDirection, b0 as FetchMeta, b1 as FetchOptions, u as Query, aX as QueryBehavior, t as QueryState, b3 as SetStateOptions, b4 as fetchState } from './hydration-ByKLEQMr.js'; | ||
export { b2 as Action, a_ as FetchContext, a$ as FetchDirection, b0 as FetchMeta, b1 as FetchOptions, u as Query, aX as QueryBehavior, t as QueryState, b3 as SetStateOptions, b4 as fetchState } from './hydration-B_q3JSpO.js'; | ||
import './subscribable.js'; |
@@ -1,3 +0,3 @@ | ||
export { Q as QueryCache, a as QueryCacheNotifyEvent, bm as QueryStore } from './hydration-ByKLEQMr.js'; | ||
export { Q as QueryCache, a as QueryCacheNotifyEvent, bm as QueryStore } from './hydration-B_q3JSpO.js'; | ||
import './subscribable.js'; | ||
import './removable.js'; |
@@ -1,3 +0,3 @@ | ||
export { b as QueryClient } from './hydration-ByKLEQMr.js'; | ||
export { b as QueryClient } from './hydration-B_q3JSpO.js'; | ||
import './removable.js'; | ||
import './subscribable.js'; |
import './subscribable.js'; | ||
export { aZ as NotifyOptions, aY as ObserverFetchOptions, c as QueryObserver } from './hydration-ByKLEQMr.js'; | ||
export { aZ as NotifyOptions, aY as ObserverFetchOptions, c as QueryObserver } from './hydration-B_q3JSpO.js'; | ||
import './removable.js'; |
@@ -1,3 +0,3 @@ | ||
export { C as CancelledError, br as RetryDelayValue, bq as RetryValue, bp as Retryer, bs as canFetch, bt as createRetryer, l as isCancelledError } from './hydration-ByKLEQMr.js'; | ||
export { C as CancelledError, br as RetryDelayValue, bq as RetryValue, bp as Retryer, bs as canFetch, bt as createRetryer, l as isCancelledError } from './hydration-B_q3JSpO.js'; | ||
import './removable.js'; | ||
import './subscribable.js'; |
@@ -1,3 +0,3 @@ | ||
export { aT as CancelOptions, B as DataTag, y as DefaultError, aS as DefaultOptions, a8 as DefaultedInfiniteQueryObserverOptions, a6 as DefaultedQueryObserverOptions, aA as DefinedInfiniteQueryObserverResult, as as DefinedQueryObserverResult, G as Enabled, aa as EnsureQueryDataOptions, ab as FetchInfiniteQueryOptions, ai as FetchNextPageOptions, aj as FetchPreviousPageOptions, a9 as FetchQueryOptions, al as FetchStatus, W as GetNextPageParamFunction, V as GetPreviousPageParamFunction, X as InfiniteData, au as InfiniteQueryObserverBaseResult, ax as InfiniteQueryObserverLoadingErrorResult, aw as InfiniteQueryObserverLoadingResult, a7 as InfiniteQueryObserverOptions, av as InfiniteQueryObserverPendingResult, ay as InfiniteQueryObserverRefetchErrorResult, aB as InfiniteQueryObserverResult, az as InfiniteQueryObserverSuccessResult, a1 as InfiniteQueryPageParamsOptions, K as InitialDataFunction, a0 as InitialPageParam, ag as InvalidateOptions, ae as InvalidateQueryFilters, aK as MutateFunction, aJ as MutateOptions, aG as MutationFunction, aC as MutationKey, aF as MutationMeta, aL as MutationObserverBaseResult, aO as MutationObserverErrorResult, aM as MutationObserverIdleResult, aN as MutationObserverLoadingResult, aI as MutationObserverOptions, aQ as MutationObserverResult, aP as MutationObserverSuccessResult, aH as MutationOptions, aE as MutationScope, aD as MutationStatus, Z as NetworkMode, N as NoInfer, aW as NotifyEvent, aV as NotifyEventType, _ as NotifyOnChangeProps, O as OmitKeyof, a5 as Optional, P as PlaceholderDataFunction, L as QueriesPlaceholderDataFunction, aR as QueryClientConfig, E as QueryFunction, J as QueryFunctionContext, z as QueryKey, T as QueryKeyHashFunction, Y as QueryMeta, am as QueryObserverBaseResult, ap as QueryObserverLoadingErrorResult, ao as QueryObserverLoadingResult, a3 as QueryObserverOptions, an as QueryObserverPendingResult, aq as QueryObserverRefetchErrorResult, at as QueryObserverResult, ar as QueryObserverSuccessResult, $ as QueryOptions, I as QueryPersister, ak as QueryStatus, ad as RefetchOptions, af as RefetchQueryFilters, R as Register, ah as ResetOptions, ac as ResultOptions, aU as SetDataOptions, F as StaleTime, a2 as ThrowOnError, a4 as WithRequired, A as dataTagSymbol } from './hydration-ByKLEQMr.js'; | ||
export { aT as CancelOptions, B as DataTag, y as DefaultError, aS as DefaultOptions, a8 as DefaultedInfiniteQueryObserverOptions, a6 as DefaultedQueryObserverOptions, aA as DefinedInfiniteQueryObserverResult, as as DefinedQueryObserverResult, G as Enabled, aa as EnsureQueryDataOptions, ab as FetchInfiniteQueryOptions, ai as FetchNextPageOptions, aj as FetchPreviousPageOptions, a9 as FetchQueryOptions, al as FetchStatus, W as GetNextPageParamFunction, V as GetPreviousPageParamFunction, X as InfiniteData, au as InfiniteQueryObserverBaseResult, ax as InfiniteQueryObserverLoadingErrorResult, aw as InfiniteQueryObserverLoadingResult, a7 as InfiniteQueryObserverOptions, av as InfiniteQueryObserverPendingResult, ay as InfiniteQueryObserverRefetchErrorResult, aB as InfiniteQueryObserverResult, az as InfiniteQueryObserverSuccessResult, a1 as InfiniteQueryPageParamsOptions, K as InitialDataFunction, a0 as InitialPageParam, ag as InvalidateOptions, ae as InvalidateQueryFilters, aK as MutateFunction, aJ as MutateOptions, aG as MutationFunction, aC as MutationKey, aF as MutationMeta, aL as MutationObserverBaseResult, aO as MutationObserverErrorResult, aM as MutationObserverIdleResult, aN as MutationObserverLoadingResult, aI as MutationObserverOptions, aQ as MutationObserverResult, aP as MutationObserverSuccessResult, aH as MutationOptions, aE as MutationScope, aD as MutationStatus, Z as NetworkMode, N as NoInfer, aW as NotifyEvent, aV as NotifyEventType, _ as NotifyOnChangeProps, O as OmitKeyof, a5 as Optional, P as PlaceholderDataFunction, L as QueriesPlaceholderDataFunction, aR as QueryClientConfig, E as QueryFunction, J as QueryFunctionContext, z as QueryKey, T as QueryKeyHashFunction, Y as QueryMeta, am as QueryObserverBaseResult, ap as QueryObserverLoadingErrorResult, ao as QueryObserverLoadingResult, a3 as QueryObserverOptions, an as QueryObserverPendingResult, aq as QueryObserverRefetchErrorResult, at as QueryObserverResult, ar as QueryObserverSuccessResult, $ as QueryOptions, I as QueryPersister, ak as QueryStatus, ad as RefetchOptions, af as RefetchQueryFilters, R as Register, ah as ResetOptions, ac as ResultOptions, aU as SetDataOptions, F as StaleTime, a2 as ThrowOnError, a4 as WithRequired, A as dataTagSymbol } from './hydration-B_q3JSpO.js'; | ||
import './removable.js'; | ||
import './subscribable.js'; |
@@ -1,3 +0,3 @@ | ||
export { g as MutationFilters, j as QueryFilters, b5 as QueryTypeFilter, S as SkipToken, U as Updater, bj as addToEnd, bk as addToStart, bl as ensureQueryFn, b7 as functionalUpdate, h as hashKey, bc as hashQueryKeyByOptions, bf as isPlainArray, bg as isPlainObject, i as isServer, b8 as isValidTimeout, k as keepPreviousData, f as matchMutation, m as matchQuery, b6 as noop, bd as partialMatchKey, bi as replaceData, r as replaceEqualDeep, bb as resolveEnabled, ba as resolveStaleTime, be as shallowEqualObjects, s as skipToken, bh as sleep, b9 as timeUntilStale } from './hydration-ByKLEQMr.js'; | ||
export { g as MutationFilters, j as QueryFilters, b5 as QueryTypeFilter, S as SkipToken, U as Updater, bj as addToEnd, bk as addToStart, bl as ensureQueryFn, b7 as functionalUpdate, h as hashKey, bc as hashQueryKeyByOptions, bf as isPlainArray, bg as isPlainObject, i as isServer, b8 as isValidTimeout, k as keepPreviousData, f as matchMutation, m as matchQuery, b6 as noop, bd as partialMatchKey, bi as replaceData, r as replaceEqualDeep, bb as resolveEnabled, ba as resolveStaleTime, be as shallowEqualObjects, s as skipToken, bh as sleep, b9 as timeUntilStale } from './hydration-B_q3JSpO.js'; | ||
import './removable.js'; | ||
import './subscribable.js'; |
@@ -171,5 +171,5 @@ // src/utils.ts | ||
} | ||
function sleep(ms) { | ||
function sleep(timeout) { | ||
return new Promise((resolve) => { | ||
setTimeout(resolve, ms); | ||
setTimeout(resolve, timeout); | ||
}); | ||
@@ -197,3 +197,3 @@ } | ||
var skipToken = Symbol(); | ||
var ensureQueryFn = (options, fetchOptions) => { | ||
function ensureQueryFn(options, fetchOptions) { | ||
if (process.env.NODE_ENV !== "production") { | ||
@@ -213,3 +213,3 @@ if (options.queryFn === skipToken) { | ||
return options.queryFn; | ||
}; | ||
} | ||
export { | ||
@@ -216,0 +216,0 @@ addToEnd, |
{ | ||
"name": "@tanstack/query-core", | ||
"version": "5.51.3", | ||
"version": "5.51.4", | ||
"description": "The framework agnostic core that powers TanStack Query", | ||
@@ -5,0 +5,0 @@ "author": "tannerlinsley", |
@@ -35,7 +35,7 @@ import { vi } from 'vitest' | ||
export const executeMutation = <TVariables>( | ||
export function executeMutation<TVariables>( | ||
queryClient: QueryClient, | ||
options: MutationOptions<any, any, TVariables, any>, | ||
variables: TVariables, | ||
) => { | ||
) { | ||
return queryClient | ||
@@ -42,0 +42,0 @@ .getMutationCache() |
@@ -136,8 +136,10 @@ import { addToEnd, addToStart, ensureQueryFn } from './utils' | ||
const lastIndex = pages.length - 1 | ||
return options.getNextPageParam( | ||
pages[lastIndex], | ||
pages, | ||
pageParams[lastIndex], | ||
pageParams, | ||
) | ||
return pages.length > 0 | ||
? options.getNextPageParam( | ||
pages[lastIndex], | ||
pages, | ||
pageParams[lastIndex], | ||
pageParams, | ||
) | ||
: undefined | ||
} | ||
@@ -149,8 +151,5 @@ | ||
): unknown | undefined { | ||
return options.getPreviousPageParam?.( | ||
pages[0], | ||
pages, | ||
pageParams[0], | ||
pageParams, | ||
) | ||
return pages.length > 0 | ||
? options.getPreviousPageParam?.(pages[0], pages, pageParams[0], pageParams) | ||
: undefined | ||
} | ||
@@ -157,0 +156,0 @@ |
@@ -343,5 +343,5 @@ import type { | ||
export function sleep(ms: number): Promise<void> { | ||
export function sleep(timeout: number): Promise<void> { | ||
return new Promise((resolve) => { | ||
setTimeout(resolve, ms) | ||
setTimeout(resolve, timeout) | ||
}) | ||
@@ -382,3 +382,3 @@ } | ||
export const ensureQueryFn = < | ||
export function ensureQueryFn< | ||
TQueryFnData = unknown, | ||
@@ -392,3 +392,3 @@ TQueryKey extends QueryKey = QueryKey, | ||
fetchOptions?: FetchOptions<TQueryFnData>, | ||
): QueryFunction<TQueryFnData, TQueryKey> => { | ||
): QueryFunction<TQueryFnData, TQueryKey> { | ||
if (process.env.NODE_ENV !== 'production') { | ||
@@ -395,0 +395,0 @@ if (options.queryFn === skipToken) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2016531
28662