@tanstack/svelte-query 5.60.5 → 5.61.3

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.
@@ -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
- ? () => undefined
29
+ ? noop
30
30
  : observer.subscribe(notifyManager.batchCalls(set));
31
31
  observer.updateResult();
32
32
  return unsubscribe;
@@ -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
- ? () => undefined
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.5",
3
+ "version": "5.61.3",
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,13 +33,13 @@
33
33
  "!src/__tests__"
34
34
  ],
35
35
  "dependencies": {
36
- "@tanstack/query-core": "5.60.5"
36
+ "@tanstack/query-core": "5.60.6"
37
37
  },
38
38
  "devDependencies": {
39
- "@sveltejs/package": "^2.3.2",
40
- "@sveltejs/vite-plugin-svelte": "^3.1.1",
41
- "@testing-library/svelte": "^5.2.1",
42
- "eslint-plugin-svelte": "^2.43.0",
39
+ "@sveltejs/package": "^2.3.7",
40
+ "@sveltejs/vite-plugin-svelte": "^3.1.2",
41
+ "@testing-library/svelte": "^5.2.6",
42
+ "eslint-plugin-svelte": "^2.46.0",
43
43
  "svelte": "^4.2.18",
44
44
  "svelte-check": "^4.0.0"
45
45
  },
@@ -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
- ? () => undefined
69
+ ? noop
70
70
  : observer.subscribe(notifyManager.batchCalls(set))
71
71
  observer.updateResult()
72
72
  return unsubscribe
@@ -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
- ? () => undefined
256
+ ? noop
257
257
  : observer.subscribe(notifyManager.batchCalls(set))
258
258
 
259
259
  return () => unsubscribe()