@tanstack/react-query 4.3.3 → 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.
- package/build/lib/__tests__/Hydrate.test.d.ts +1 -0
- package/build/lib/__tests__/QueryClientProvider.test.d.ts +1 -0
- package/build/lib/__tests__/QueryResetErrorBoundary.test.d.ts +6 -0
- package/build/lib/__tests__/ssr-hydration.test.d.ts +1 -0
- package/build/lib/__tests__/ssr.test.d.ts +4 -0
- package/build/lib/__tests__/suspense.test.d.ts +1 -0
- package/build/lib/__tests__/useInfiniteQuery.test.d.ts +1 -0
- package/build/lib/__tests__/useIsFetching.test.d.ts +1 -0
- package/build/lib/__tests__/useIsMutating.test.d.ts +1 -0
- package/build/lib/__tests__/useMutation.test.d.ts +1 -0
- package/build/lib/__tests__/useQueries.test.d.ts +1 -0
- package/build/lib/__tests__/useQuery.test.d.ts +1 -0
- package/build/lib/__tests__/useQuery.types.test.d.ts +2 -0
- package/build/lib/__tests__/utils.d.ts +31 -0
- package/build/lib/setBatchUpdatesFn.js +1 -1
- package/build/lib/setBatchUpdatesFn.js.map +1 -1
- package/build/umd/index.development.js +1 -0
- package/build/umd/index.development.js.map +1 -1
- package/build/umd/index.production.js +1 -1
- package/build/umd/index.production.js.map +1 -1
- package/package.json +2 -2
- package/src/__tests__/Hydrate.test.tsx +1 -1
- package/src/__tests__/QueryClientProvider.test.tsx +1 -1
- package/src/__tests__/QueryResetErrorBoundary.test.tsx +3 -4
- package/src/__tests__/ssr-hydration.test.tsx +1 -6
- package/src/__tests__/ssr.test.tsx +1 -1
- package/src/__tests__/suspense.test.tsx +5 -6
- package/src/__tests__/useInfiniteQuery.test.tsx +9 -9
- package/src/__tests__/useIsFetching.test.tsx +3 -3
- package/src/__tests__/useIsMutating.test.tsx +3 -4
- package/src/__tests__/useMutation.test.tsx +3 -3
- package/src/__tests__/useQueries.test.tsx +8 -8
- package/src/__tests__/useQuery.test.tsx +12 -11
- package/src/__tests__/utils.tsx +82 -3
|
@@ -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 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/// <reference types="jest" />
|
|
2
|
+
/// <reference types="node" />
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { render } from '@testing-library/react';
|
|
5
|
+
import { QueryClient, ContextOptions, QueryClientConfig, MutationOptions } from '..';
|
|
6
|
+
export declare function renderWithClient(client: QueryClient, ui: React.ReactElement, options?: ContextOptions): ReturnType<typeof render>;
|
|
7
|
+
export declare const Blink: ({ duration, children, }: {
|
|
8
|
+
duration: number;
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
}) => JSX.Element;
|
|
11
|
+
export declare function createQueryClient(config?: QueryClientConfig): QueryClient;
|
|
12
|
+
export declare function mockVisibilityState(value: DocumentVisibilityState): jest.SpyInstance<DocumentVisibilityState, []>;
|
|
13
|
+
export declare function mockNavigatorOnLine(value: boolean): jest.SpyInstance<boolean, []>;
|
|
14
|
+
export declare const mockLogger: {
|
|
15
|
+
log: jest.Mock<any, any>;
|
|
16
|
+
warn: jest.Mock<any, any>;
|
|
17
|
+
error: jest.Mock<any, any>;
|
|
18
|
+
};
|
|
19
|
+
export declare function queryKey(): Array<string>;
|
|
20
|
+
export declare function sleep(timeout: number): Promise<void>;
|
|
21
|
+
export declare function setActTimeout(fn: () => void, ms?: number): NodeJS.Timeout;
|
|
22
|
+
/**
|
|
23
|
+
* Assert the parameter is of a specific type.
|
|
24
|
+
*/
|
|
25
|
+
export declare function expectType<T>(_: T): void;
|
|
26
|
+
/**
|
|
27
|
+
* Assert the parameter is not typed as `any`
|
|
28
|
+
*/
|
|
29
|
+
export declare function expectTypeNotAny<T>(_: 0 extends 1 & T ? never : T): void;
|
|
30
|
+
export declare function executeMutation(queryClient: QueryClient, options: MutationOptions<any, any, any, any>): Promise<unknown>;
|
|
31
|
+
export declare function setIsServer(isServer: boolean): () => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var queryCore = require('@tanstack/query-core');
|
|
4
|
-
var reactBatchedUpdates = require('./reactBatchedUpdates
|
|
4
|
+
var reactBatchedUpdates = require('./reactBatchedUpdates');
|
|
5
5
|
|
|
6
6
|
queryCore.notifyManager.setBatchNotifyFunction(reactBatchedUpdates.unstable_batchedUpdates);
|
|
7
7
|
//# sourceMappingURL=setBatchUpdatesFn.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setBatchUpdatesFn.js","sources":["../../src/setBatchUpdatesFn.ts"],"sourcesContent":["import { notifyManager } from '@tanstack/query-core'\nimport { unstable_batchedUpdates } from './reactBatchedUpdates'\n\nnotifyManager.setBatchNotifyFunction(unstable_batchedUpdates)\n"],"names":["notifyManager","setBatchNotifyFunction","unstable_batchedUpdates"],"mappings":";;;;;AAGAA,
|
|
1
|
+
{"version":3,"file":"setBatchUpdatesFn.js","sources":["../../src/setBatchUpdatesFn.ts"],"sourcesContent":["import { notifyManager } from '@tanstack/query-core'\nimport { unstable_batchedUpdates } from './reactBatchedUpdates'\n\nnotifyManager.setBatchNotifyFunction(unstable_batchedUpdates)\n"],"names":["notifyManager","setBatchNotifyFunction","unstable_batchedUpdates"],"mappings":";;;;;AAGAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAa,CAACC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAd,CAAqCC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAArC,CAAA"}
|
|
@@ -3664,6 +3664,7 @@
|
|
|
3664
3664
|
exports.hydrate = hydrate;
|
|
3665
3665
|
exports.isCancelledError = isCancelledError;
|
|
3666
3666
|
exports.isError = isError;
|
|
3667
|
+
exports.isServer = isServer;
|
|
3667
3668
|
exports.notifyManager = notifyManager;
|
|
3668
3669
|
exports.onlineManager = onlineManager;
|
|
3669
3670
|
exports.parseFilterArgs = parseFilterArgs;
|