@tanstack/query-core
Advanced tools
Comparing version 5.27.4 to 5.27.5
@@ -45,11 +45,11 @@ import { | ||
return; | ||
__privateSet(this, _unsubscribeFocus, focusManager.subscribe((focused) => { | ||
__privateSet(this, _unsubscribeFocus, focusManager.subscribe(async (focused) => { | ||
if (focused) { | ||
this.resumePausedMutations(); | ||
await this.resumePausedMutations(); | ||
__privateGet(this, _queryCache).onFocus(); | ||
} | ||
})); | ||
__privateSet(this, _unsubscribeOnline, onlineManager.subscribe((online) => { | ||
__privateSet(this, _unsubscribeOnline, onlineManager.subscribe(async (online) => { | ||
if (online) { | ||
this.resumePausedMutations(); | ||
await this.resumePausedMutations(); | ||
__privateGet(this, _queryCache).onOnline(); | ||
@@ -56,0 +56,0 @@ } |
@@ -37,11 +37,11 @@ // src/queryClient.ts | ||
return; | ||
this.#unsubscribeFocus = focusManager.subscribe((focused) => { | ||
this.#unsubscribeFocus = focusManager.subscribe(async (focused) => { | ||
if (focused) { | ||
this.resumePausedMutations(); | ||
await this.resumePausedMutations(); | ||
this.#queryCache.onFocus(); | ||
} | ||
}); | ||
this.#unsubscribeOnline = onlineManager.subscribe((online) => { | ||
this.#unsubscribeOnline = onlineManager.subscribe(async (online) => { | ||
if (online) { | ||
this.resumePausedMutations(); | ||
await this.resumePausedMutations(); | ||
this.#queryCache.onOnline(); | ||
@@ -48,0 +48,0 @@ } |
{ | ||
"name": "@tanstack/query-core", | ||
"version": "5.27.4", | ||
"version": "5.27.5", | ||
"description": "The framework agnostic core that powers TanStack Query", | ||
@@ -5,0 +5,0 @@ "author": "tannerlinsley", |
@@ -78,11 +78,11 @@ import { | ||
this.#unsubscribeFocus = focusManager.subscribe((focused) => { | ||
this.#unsubscribeFocus = focusManager.subscribe(async (focused) => { | ||
if (focused) { | ||
this.resumePausedMutations() | ||
await this.resumePausedMutations() | ||
this.#queryCache.onFocus() | ||
} | ||
}) | ||
this.#unsubscribeOnline = onlineManager.subscribe((online) => { | ||
this.#unsubscribeOnline = onlineManager.subscribe(async (online) => { | ||
if (online) { | ||
this.resumePausedMutations() | ||
await this.resumePausedMutations() | ||
this.#queryCache.onOnline() | ||
@@ -89,0 +89,0 @@ } |
import { vi } from 'vitest' | ||
import { QueryClient, onlineManager } from '..' | ||
import * as utils from '../utils' | ||
import type { SpyInstance } from 'vitest' | ||
import type { MockInstance } from 'vitest' | ||
import type { MutationOptions, QueryClientConfig } from '..' | ||
@@ -13,3 +13,3 @@ | ||
value: DocumentVisibilityState, | ||
): SpyInstance<[], DocumentVisibilityState> { | ||
): MockInstance<[], DocumentVisibilityState> { | ||
return vi.spyOn(document, 'visibilityState', 'get').mockReturnValue(value) | ||
@@ -20,3 +20,3 @@ } | ||
value: boolean, | ||
): SpyInstance<[], boolean> { | ||
): MockInstance<[], boolean> { | ||
return vi.spyOn(onlineManager, 'isOnline').mockReturnValue(value) | ||
@@ -23,0 +23,0 @@ } |
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
1842167
26187