@trpc/react-query 11.0.0-rc.482 → 11.0.0-rc.485
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,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
"bundleSize":
|
|
3
|
-
"bundleOrigSize":
|
|
4
|
-
"bundleReduction": 52.
|
|
2
|
+
"bundleSize": 34530,
|
|
3
|
+
"bundleOrigSize": 72782,
|
|
4
|
+
"bundleReduction": 52.56,
|
|
5
5
|
"modules": [
|
|
6
6
|
{
|
|
7
7
|
"id": "/src/shared/hooks/createHooksInternal.tsx",
|
|
8
|
-
"size":
|
|
9
|
-
"origSize":
|
|
8
|
+
"size": 13936,
|
|
9
|
+
"origSize": 15882,
|
|
10
10
|
"renderedExports": [
|
|
11
11
|
"createRootHooks"
|
|
12
12
|
],
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"dependents": [
|
|
15
15
|
"/src/createTRPCReact.tsx"
|
|
16
16
|
],
|
|
17
|
-
"percent": 40.
|
|
18
|
-
"reduction": 12.
|
|
17
|
+
"percent": 40.36,
|
|
18
|
+
"reduction": 12.25
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
"id": "/src/utils/createUtilityFunctions.ts",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"/src/createTRPCQueryUtils.tsx",
|
|
30
30
|
"/src/shared/hooks/createHooksInternal.tsx"
|
|
31
31
|
],
|
|
32
|
-
"percent": 13.
|
|
32
|
+
"percent": 13.36,
|
|
33
33
|
"reduction": 2.31
|
|
34
34
|
},
|
|
35
35
|
{
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"dependents": [
|
|
44
44
|
"/src/server/index.ts"
|
|
45
45
|
],
|
|
46
|
-
"percent": 10.
|
|
46
|
+
"percent": 10.1,
|
|
47
47
|
"reduction": 52.58
|
|
48
48
|
},
|
|
49
49
|
{
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"dependents": [
|
|
60
60
|
"/src/shared/index.ts"
|
|
61
61
|
],
|
|
62
|
-
"percent": 9.
|
|
62
|
+
"percent": 9.82,
|
|
63
63
|
"reduction": 72.89
|
|
64
64
|
},
|
|
65
65
|
{
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
],
|
|
72
72
|
"removedExports": [],
|
|
73
73
|
"dependents": [],
|
|
74
|
-
"percent": 9.
|
|
74
|
+
"percent": 9.36,
|
|
75
75
|
"reduction": 39.66
|
|
76
76
|
},
|
|
77
77
|
{
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"/src/shared/proxy/useQueriesProxy.ts",
|
|
94
94
|
"/src/shared/hooks/createHooksInternal.tsx"
|
|
95
95
|
],
|
|
96
|
-
"percent": 7.
|
|
96
|
+
"percent": 7.26,
|
|
97
97
|
"reduction": 40.21
|
|
98
98
|
},
|
|
99
99
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createHooksInternal.d.ts","sourceRoot":"","sources":["../../../src/shared/hooks/createHooksInternal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createHooksInternal.d.ts","sourceRoot":"","sources":["../../../src/shared/hooks/createHooksInternal.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAExD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAC;AAG1E,OAAO,KAAK,EAAY,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAS1E,OAAO,KAAK,EACV,cAAc,EACd,sBAAsB,EACvB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,KAAK,EAAE,sBAAsB,EAAuB,MAAM,UAAU,CAAC;AAC5E,OAAO,KAAK,EACV,YAAY,EACZ,YAAY,EAEZ,2BAA2B,EAC3B,0BAA0B,EAC1B,sBAAsB,EACtB,qBAAqB,EACrB,mBAAmB,EACnB,kBAAkB,EAClB,0BAA0B,E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|
|
183
|
-
const { client } = useContext();
|
|
184
|
-
const queryClient = reactQuery.useQueryClient();
|
|
183
|
+
const { client , queryClient } = useContext();
|
|
185
184
|
const mutationKey = getQueryKey.getMutationKeyInternal(path);
|
|
186
185
|
const defaultOpts = queryClient.defaultMutationOptions(queryClient.getMutationDefaults(mutationKey));
|
|
187
186
|
const hook = reactQuery.useMutation({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useQuery, useSuspenseQuery,
|
|
1
|
+
import { useQuery, useSuspenseQuery, useMutation, skipToken, hashKey, useInfiniteQuery, useSuspenseInfiniteQuery, useQueries, useSuspenseQueries } from '@tanstack/react-query';
|
|
2
2
|
import { createTRPCUntypedClient } from '@trpc/client';
|
|
3
3
|
import { isAsyncIterable } from '@trpc/server/unstable-core-do-not-import';
|
|
4
4
|
import * as React from 'react';
|
|
@@ -159,8 +159,7 @@ import { createUseQueries } from '../proxy/useQueriesProxy.mjs';
|
|
|
159
159
|
];
|
|
160
160
|
}
|
|
161
161
|
function useMutation$1(path, opts) {
|
|
162
|
-
const { client } = useContext();
|
|
163
|
-
const queryClient = useQueryClient();
|
|
162
|
+
const { client , queryClient } = useContext();
|
|
164
163
|
const mutationKey = getMutationKeyInternal(path);
|
|
165
164
|
const defaultOpts = queryClient.defaultMutationOptions(queryClient.getMutationDefaults(mutationKey));
|
|
166
165
|
const hook = useMutation({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trpc/react-query",
|
|
3
|
-
"version": "11.0.0-rc.
|
|
3
|
+
"version": "11.0.0-rc.485+1c1d824cd",
|
|
4
4
|
"description": "The tRPC React library",
|
|
5
5
|
"author": "KATT",
|
|
6
6
|
"license": "MIT",
|
|
@@ -64,15 +64,15 @@
|
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
66
66
|
"@tanstack/react-query": "^5.49.2",
|
|
67
|
-
"@trpc/client": "11.0.0-rc.
|
|
68
|
-
"@trpc/server": "11.0.0-rc.
|
|
67
|
+
"@trpc/client": "11.0.0-rc.485+1c1d824cd",
|
|
68
|
+
"@trpc/server": "11.0.0-rc.485+1c1d824cd",
|
|
69
69
|
"react": ">=18.2.0",
|
|
70
70
|
"react-dom": ">=18.2.0"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
73
|
"@tanstack/react-query": "^5.51.11",
|
|
74
|
-
"@trpc/client": "11.0.0-rc.
|
|
75
|
-
"@trpc/server": "11.0.0-rc.
|
|
74
|
+
"@trpc/client": "11.0.0-rc.485+1c1d824cd",
|
|
75
|
+
"@trpc/server": "11.0.0-rc.485+1c1d824cd",
|
|
76
76
|
"@types/express": "^4.17.17",
|
|
77
77
|
"@types/node": "^20.10.0",
|
|
78
78
|
"@types/react": "^18.3.1",
|
|
@@ -92,5 +92,5 @@
|
|
|
92
92
|
"funding": [
|
|
93
93
|
"https://trpc.io/sponsor"
|
|
94
94
|
],
|
|
95
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "1c1d824cd61bb00bf115c91010147f11fe026154"
|
|
96
96
|
}
|
|
@@ -8,7 +8,6 @@ import {
|
|
|
8
8
|
useSuspenseQuery as __useSuspenseQuery,
|
|
9
9
|
hashKey,
|
|
10
10
|
skipToken,
|
|
11
|
-
useQueryClient,
|
|
12
11
|
} from '@tanstack/react-query';
|
|
13
12
|
import type { TRPCClientErrorLike } from '@trpc/client';
|
|
14
13
|
import { createTRPCUntypedClient } from '@trpc/client';
|
|
@@ -267,8 +266,7 @@ export function createRootHooks<
|
|
|
267
266
|
path: readonly string[],
|
|
268
267
|
opts?: UseTRPCMutationOptions<unknown, TError, unknown, unknown>,
|
|
269
268
|
): UseTRPCMutationResult<unknown, TError, unknown, unknown> {
|
|
270
|
-
const { client } = useContext();
|
|
271
|
-
const queryClient = useQueryClient();
|
|
269
|
+
const { client, queryClient } = useContext();
|
|
272
270
|
|
|
273
271
|
const mutationKey = getMutationKeyInternal(path);
|
|
274
272
|
|