@tanstack/query-core 4.3.4 → 4.3.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.
Files changed (42) hide show
  1. package/build/lib/index.d.ts +1 -1
  2. package/build/lib/index.js +1 -0
  3. package/build/lib/index.js.map +1 -1
  4. package/build/lib/index.mjs +1 -1
  5. package/build/lib/tests/focusManager.test.d.ts +1 -0
  6. package/build/lib/tests/hydration.test.d.ts +1 -0
  7. package/build/lib/tests/infiniteQueryBehavior.test.d.ts +1 -0
  8. package/build/lib/tests/infiniteQueryObserver.test.d.ts +1 -0
  9. package/build/lib/tests/mutationCache.test.d.ts +1 -0
  10. package/build/lib/tests/mutationObserver.test.d.ts +1 -0
  11. package/build/lib/tests/mutations.test.d.ts +1 -0
  12. package/build/lib/tests/notifyManager.test.d.ts +1 -0
  13. package/build/lib/tests/onlineManager.test.d.ts +1 -0
  14. package/build/lib/tests/queriesObserver.test.d.ts +1 -0
  15. package/build/lib/tests/query.test.d.ts +1 -0
  16. package/build/lib/tests/queryCache.test.d.ts +1 -0
  17. package/build/lib/tests/queryClient.test.d.ts +1 -0
  18. package/build/lib/tests/queryObserver.test.d.ts +1 -0
  19. package/build/lib/tests/utils.d.ts +24 -0
  20. package/build/lib/tests/utils.test.d.ts +1 -0
  21. package/build/umd/index.development.js +1 -0
  22. package/build/umd/index.development.js.map +1 -1
  23. package/build/umd/index.production.js +1 -1
  24. package/build/umd/index.production.js.map +1 -1
  25. package/package.json +1 -1
  26. package/src/index.ts +1 -0
  27. package/src/tests/focusManager.test.tsx +1 -1
  28. package/src/tests/hydration.test.tsx +1 -1
  29. package/src/tests/infiniteQueryBehavior.test.tsx +1 -1
  30. package/src/tests/infiniteQueryObserver.test.tsx +1 -1
  31. package/src/tests/mutationCache.test.tsx +1 -6
  32. package/src/tests/mutationObserver.test.tsx +1 -1
  33. package/src/tests/mutations.test.tsx +1 -6
  34. package/src/tests/notifyManager.test.tsx +1 -1
  35. package/src/tests/onlineManager.test.tsx +1 -1
  36. package/src/tests/queriesObserver.test.tsx +1 -6
  37. package/src/tests/query.test.tsx +1 -1
  38. package/src/tests/queryCache.test.tsx +1 -1
  39. package/src/tests/queryClient.test.tsx +1 -6
  40. package/src/tests/queryObserver.test.tsx +1 -1
  41. package/src/tests/utils.test.tsx +1 -1
  42. package/src/tests/utils.ts +78 -0
@@ -9,7 +9,7 @@ export { MutationObserver } from './mutationObserver';
9
9
  export { notifyManager } from './notifyManager';
10
10
  export { focusManager } from './focusManager';
11
11
  export { onlineManager } from './onlineManager';
12
- export { hashQueryKey, isError, parseQueryArgs, parseFilterArgs, parseMutationFilterArgs, parseMutationArgs, } from './utils';
12
+ export { hashQueryKey, isError, isServer, parseQueryArgs, parseFilterArgs, parseMutationFilterArgs, parseMutationArgs, } from './utils';
13
13
  export type { MutationFilters, QueryFilters, Updater } from './utils';
14
14
  export { isCancelledError } from './retryer';
15
15
  export { dehydrate, hydrate } from './hydration';
@@ -32,6 +32,7 @@ exports.focusManager = focusManager.focusManager;
32
32
  exports.onlineManager = onlineManager.onlineManager;
33
33
  exports.hashQueryKey = utils.hashQueryKey;
34
34
  exports.isError = utils.isError;
35
+ exports.isServer = utils.isServer;
35
36
  exports.parseFilterArgs = utils.parseFilterArgs;
36
37
  exports.parseMutationArgs = utils.parseMutationArgs;
37
38
  exports.parseMutationFilterArgs = utils.parseMutationFilterArgs;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -9,6 +9,6 @@ export { MutationObserver } from './mutationObserver.mjs';
9
9
  export { notifyManager } from './notifyManager.mjs';
10
10
  export { focusManager } from './focusManager.mjs';
11
11
  export { onlineManager } from './onlineManager.mjs';
12
- export { hashQueryKey, isError, parseFilterArgs, parseMutationArgs, parseMutationFilterArgs, parseQueryArgs } from './utils.mjs';
12
+ export { hashQueryKey, isError, isServer, parseFilterArgs, parseMutationArgs, parseMutationFilterArgs, parseQueryArgs } from './utils.mjs';
13
13
  export { dehydrate, hydrate } from './hydration.mjs';
14
14
  //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,24 @@
1
+ /// <reference types="jest" />
2
+ /// <reference types="node" />
3
+ import { MutationOptions, QueryClient, QueryClientConfig } from '@tanstack/query-core';
4
+ export declare function createQueryClient(config?: QueryClientConfig): QueryClient;
5
+ export declare function mockVisibilityState(value: DocumentVisibilityState): jest.SpyInstance<DocumentVisibilityState, []>;
6
+ export declare function mockNavigatorOnLine(value: boolean): jest.SpyInstance<boolean, []>;
7
+ export declare const mockLogger: {
8
+ log: jest.Mock<any, any>;
9
+ warn: jest.Mock<any, any>;
10
+ error: jest.Mock<any, any>;
11
+ };
12
+ export declare function queryKey(): Array<string>;
13
+ export declare function sleep(timeout: number): Promise<void>;
14
+ export declare function setActTimeout(fn: () => void, ms?: number): NodeJS.Timeout;
15
+ /**
16
+ * Assert the parameter is of a specific type.
17
+ */
18
+ export declare const expectType: <T>(_: T) => void;
19
+ /**
20
+ * Assert the parameter is not typed as `any`
21
+ */
22
+ export declare const expectTypeNotAny: <T>(_: 0 extends 1 & T ? never : T) => void;
23
+ export declare const executeMutation: (queryClient: QueryClient, options: MutationOptions<any, any, any, any>) => Promise<unknown>;
24
+ export declare function setIsServer(isServer: boolean): () => void;
@@ -0,0 +1 @@
1
+ export {};
@@ -3098,6 +3098,7 @@
3098
3098
  exports.hydrate = hydrate;
3099
3099
  exports.isCancelledError = isCancelledError;
3100
3100
  exports.isError = isError;
3101
+ exports.isServer = isServer;
3101
3102
  exports.notifyManager = notifyManager;
3102
3103
  exports.onlineManager = onlineManager;
3103
3104
  exports.parseFilterArgs = parseFilterArgs;