@tanstack/svelte-query 5.24.1 → 5.24.5

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.
@@ -1,7 +1,7 @@
1
1
  import { derived, get, readable } from 'svelte/store';
2
2
  import { MutationObserver, notifyManager } from '@tanstack/query-core';
3
3
  import { useQueryClient } from './useQueryClient';
4
- import { isSvelteStore } from './utils';
4
+ import { isSvelteStore, noop } from './utils';
5
5
  export function createMutation(options, queryClient) {
6
6
  const client = useQueryClient(queryClient);
7
7
  const optionsStore = isSvelteStore(options) ? options : readable(options);
@@ -23,4 +23,3 @@ export function createMutation(options, queryClient) {
23
23
  }));
24
24
  return { subscribe };
25
25
  }
26
- function noop() { }
package/dist/utils.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  import type { Readable } from 'svelte/store';
2
2
  import type { StoreOrVal } from './types';
3
3
  export declare function isSvelteStore<T extends object>(obj: StoreOrVal<T>): obj is Readable<T>;
4
+ export declare function noop(): void;
package/dist/utils.js CHANGED
@@ -1,3 +1,4 @@
1
1
  export function isSvelteStore(obj) {
2
2
  return 'subscribe' in obj && typeof obj.subscribe === 'function';
3
3
  }
4
+ export function noop() { }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/svelte-query",
3
- "version": "5.24.1",
3
+ "version": "5.24.5",
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.24.1"
36
+ "@tanstack/query-core": "5.24.5"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@sveltejs/package": "^2.2.6",
@@ -1,7 +1,7 @@
1
1
  import { derived, get, readable } from 'svelte/store'
2
2
  import { MutationObserver, notifyManager } from '@tanstack/query-core'
3
3
  import { useQueryClient } from './useQueryClient'
4
- import { isSvelteStore } from './utils'
4
+ import { isSvelteStore, noop } from './utils'
5
5
  import type {
6
6
  CreateMutateFunction,
7
7
  CreateMutationOptions,
@@ -47,5 +47,3 @@ export function createMutation<
47
47
 
48
48
  return { subscribe }
49
49
  }
50
-
51
- function noop() {}
package/src/utils.ts CHANGED
@@ -6,3 +6,5 @@ export function isSvelteStore<T extends object>(
6
6
  ): obj is Readable<T> {
7
7
  return 'subscribe' in obj && typeof obj.subscribe === 'function'
8
8
  }
9
+
10
+ export function noop() {}