@tanstack/svelte-query 5.60.5 → 5.60.6
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/dist/createBaseQuery.js
CHANGED
|
@@ -2,7 +2,7 @@ import { derived, get, readable } from 'svelte/store';
|
|
|
2
2
|
import { notifyManager } from '@tanstack/query-core';
|
|
3
3
|
import { useIsRestoring } from './useIsRestoring.js';
|
|
4
4
|
import { useQueryClient } from './useQueryClient.js';
|
|
5
|
-
import { isSvelteStore } from './utils.js';
|
|
5
|
+
import { isSvelteStore, noop } from './utils.js';
|
|
6
6
|
export function createBaseQuery(options, Observer, queryClient) {
|
|
7
7
|
/** Load query client */
|
|
8
8
|
const client = useQueryClient(queryClient);
|
|
@@ -26,7 +26,7 @@ export function createBaseQuery(options, Observer, queryClient) {
|
|
|
26
26
|
});
|
|
27
27
|
const result = derived(isRestoring, ($isRestoring, set) => {
|
|
28
28
|
const unsubscribe = $isRestoring
|
|
29
|
-
?
|
|
29
|
+
? noop
|
|
30
30
|
: observer.subscribe(notifyManager.batchCalls(set));
|
|
31
31
|
observer.updateResult();
|
|
32
32
|
return unsubscribe;
|
package/dist/createQueries.js
CHANGED
|
@@ -2,7 +2,7 @@ import { QueriesObserver, notifyManager } from '@tanstack/query-core';
|
|
|
2
2
|
import { derived, get, readable } from 'svelte/store';
|
|
3
3
|
import { useIsRestoring } from './useIsRestoring.js';
|
|
4
4
|
import { useQueryClient } from './useQueryClient.js';
|
|
5
|
-
import { isSvelteStore } from './utils.js';
|
|
5
|
+
import { isSvelteStore, noop } from './utils.js';
|
|
6
6
|
export function createQueries({ queries, ...options }, queryClient) {
|
|
7
7
|
const client = useQueryClient(queryClient);
|
|
8
8
|
const isRestoring = useIsRestoring();
|
|
@@ -25,7 +25,7 @@ export function createQueries({ queries, ...options }, queryClient) {
|
|
|
25
25
|
});
|
|
26
26
|
const result = derived([isRestoring], ([$isRestoring], set) => {
|
|
27
27
|
const unsubscribe = $isRestoring
|
|
28
|
-
?
|
|
28
|
+
? noop
|
|
29
29
|
: observer.subscribe(notifyManager.batchCalls(set));
|
|
30
30
|
return () => unsubscribe();
|
|
31
31
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/svelte-query",
|
|
3
|
-
"version": "5.60.
|
|
3
|
+
"version": "5.60.6",
|
|
4
4
|
"description": "Primitives for managing, caching and syncing asynchronous and remote data in Svelte",
|
|
5
5
|
"author": "Lachlan Collins",
|
|
6
6
|
"license": "MIT",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"!src/__tests__"
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@tanstack/query-core": "5.60.
|
|
36
|
+
"@tanstack/query-core": "5.60.6"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@sveltejs/package": "^2.3.2",
|
package/src/createBaseQuery.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { derived, get, readable } from 'svelte/store'
|
|
|
2
2
|
import { notifyManager } from '@tanstack/query-core'
|
|
3
3
|
import { useIsRestoring } from './useIsRestoring.js'
|
|
4
4
|
import { useQueryClient } from './useQueryClient.js'
|
|
5
|
-
import { isSvelteStore } from './utils.js'
|
|
5
|
+
import { isSvelteStore, noop } from './utils.js'
|
|
6
6
|
import type {
|
|
7
7
|
QueryClient,
|
|
8
8
|
QueryKey,
|
|
@@ -66,7 +66,7 @@ export function createBaseQuery<
|
|
|
66
66
|
QueryObserverResult<TData, TError>
|
|
67
67
|
>(isRestoring, ($isRestoring, set) => {
|
|
68
68
|
const unsubscribe = $isRestoring
|
|
69
|
-
?
|
|
69
|
+
? noop
|
|
70
70
|
: observer.subscribe(notifyManager.batchCalls(set))
|
|
71
71
|
observer.updateResult()
|
|
72
72
|
return unsubscribe
|
package/src/createQueries.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { QueriesObserver, notifyManager } from '@tanstack/query-core'
|
|
|
2
2
|
import { derived, get, readable } from 'svelte/store'
|
|
3
3
|
import { useIsRestoring } from './useIsRestoring.js'
|
|
4
4
|
import { useQueryClient } from './useQueryClient.js'
|
|
5
|
-
import { isSvelteStore } from './utils.js'
|
|
5
|
+
import { isSvelteStore, noop } from './utils.js'
|
|
6
6
|
import type { Readable } from 'svelte/store'
|
|
7
7
|
import type { StoreOrVal } from './types.js'
|
|
8
8
|
import type {
|
|
@@ -253,7 +253,7 @@ export function createQueries<
|
|
|
253
253
|
|
|
254
254
|
const result = derived([isRestoring], ([$isRestoring], set) => {
|
|
255
255
|
const unsubscribe = $isRestoring
|
|
256
|
-
?
|
|
256
|
+
? noop
|
|
257
257
|
: observer.subscribe(notifyManager.batchCalls(set))
|
|
258
258
|
|
|
259
259
|
return () => unsubscribe()
|