@trpc/react-query 10.4.0 → 10.4.2
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/dist/{createHooksInternal-bdcaf04e.mjs → createHooksInternal-808efaa7.mjs} +1 -1
- package/dist/{createHooksInternal-b419b655.js → createHooksInternal-d9b9c414.js} +1 -1
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/dist/shared/index.js +1 -1
- package/dist/shared/index.mjs +1 -1
- package/package.json +6 -6
- package/src/createTRPCReact.tsx +1 -1
|
@@ -365,7 +365,7 @@ function getClientArgs(pathAndInput, opts) {
|
|
|
365
365
|
}
|
|
366
366
|
function useInfiniteQuery$1(pathAndInput, opts) {
|
|
367
367
|
const [path, input] = pathAndInput;
|
|
368
|
-
const { client , ssrState , prefetchInfiniteQuery , queryClient , abortOnUnmount
|
|
368
|
+
const { client , ssrState , prefetchInfiniteQuery , queryClient , abortOnUnmount } = useContext();
|
|
369
369
|
if (typeof window === 'undefined' && ssrState === 'prepass' && opts?.trpc?.ssr !== false && opts?.enabled !== false && !queryClient.getQueryCache().find(getArrayQueryKey(pathAndInput, 'infinite'))) {
|
|
370
370
|
void prefetchInfiniteQuery(pathAndInput, opts);
|
|
371
371
|
}
|
|
@@ -371,7 +371,7 @@ function getClientArgs(pathAndInput, opts) {
|
|
|
371
371
|
}
|
|
372
372
|
function useInfiniteQuery(pathAndInput, opts) {
|
|
373
373
|
const [path, input] = pathAndInput;
|
|
374
|
-
const { client , ssrState , prefetchInfiniteQuery , queryClient , abortOnUnmount
|
|
374
|
+
const { client , ssrState , prefetchInfiniteQuery , queryClient , abortOnUnmount } = useContext();
|
|
375
375
|
if (typeof window === 'undefined' && ssrState === 'prepass' && opts?.trpc?.ssr !== false && opts?.enabled !== false && !queryClient.getQueryCache().find(getArrayQueryKey.getArrayQueryKey(pathAndInput, 'infinite'))) {
|
|
376
376
|
void prefetchInfiniteQuery(pathAndInput, opts);
|
|
377
377
|
}
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var client = require('@trpc/client');
|
|
6
6
|
var shared = require('@trpc/server/shared');
|
|
7
7
|
var React = require('react');
|
|
8
|
-
var createHooksInternal = require('./createHooksInternal-
|
|
8
|
+
var createHooksInternal = require('./createHooksInternal-d9b9c414.js');
|
|
9
9
|
require('@tanstack/react-query');
|
|
10
10
|
require('./getArrayQueryKey-24927615.js');
|
|
11
11
|
|
|
@@ -24,7 +24,7 @@ require('./getArrayQueryKey-24927615.js');
|
|
|
24
24
|
]);
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
-
if (key
|
|
27
|
+
if (trpc.hasOwnProperty(key)) {
|
|
28
28
|
return trpc[key];
|
|
29
29
|
}
|
|
30
30
|
return createHooksInternal.createReactProxyDecoration(key, trpc);
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from '@trpc/client';
|
|
2
2
|
import { createFlatProxy } from '@trpc/server/shared';
|
|
3
3
|
import { useMemo } from 'react';
|
|
4
|
-
import { c as createHooksInternal, a as createReactQueryUtilsProxy, b as createReactProxyDecoration } from './createHooksInternal-
|
|
4
|
+
import { c as createHooksInternal, a as createReactQueryUtilsProxy, b as createReactProxyDecoration } from './createHooksInternal-808efaa7.mjs';
|
|
5
5
|
import '@tanstack/react-query';
|
|
6
6
|
import './getArrayQueryKey-c6f6badf.mjs';
|
|
7
7
|
|
|
@@ -20,7 +20,7 @@ import './getArrayQueryKey-c6f6badf.mjs';
|
|
|
20
20
|
]);
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
|
-
if (key
|
|
23
|
+
if (trpc.hasOwnProperty(key)) {
|
|
24
24
|
return trpc[key];
|
|
25
25
|
}
|
|
26
26
|
return createReactProxyDecoration(key, trpc);
|
package/dist/shared/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var createHooksInternal = require('../createHooksInternal-
|
|
5
|
+
var createHooksInternal = require('../createHooksInternal-d9b9c414.js');
|
|
6
6
|
var queryClient = require('../queryClient-358a9a75.js');
|
|
7
7
|
require('@trpc/server/shared');
|
|
8
8
|
require('@trpc/client');
|
package/dist/shared/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { c as createHooksInternal, b as createReactProxyDecoration, a as createReactQueryUtilsProxy } from '../createHooksInternal-
|
|
1
|
+
export { c as createHooksInternal, b as createReactProxyDecoration, a as createReactQueryUtilsProxy } from '../createHooksInternal-808efaa7.mjs';
|
|
2
2
|
export { g as getQueryClient } from '../queryClient-4d766c0c.mjs';
|
|
3
3
|
import '@trpc/server/shared';
|
|
4
4
|
import '@trpc/client';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trpc/react-query",
|
|
3
|
-
"version": "10.4.
|
|
3
|
+
"version": "10.4.2",
|
|
4
4
|
"description": "tRPC React lib",
|
|
5
5
|
"author": "KATT",
|
|
6
6
|
"license": "MIT",
|
|
@@ -54,15 +54,15 @@
|
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"@tanstack/react-query": "^4.3.8",
|
|
57
|
-
"@trpc/client": "10.4.
|
|
58
|
-
"@trpc/server": "10.4.
|
|
57
|
+
"@trpc/client": "10.4.2",
|
|
58
|
+
"@trpc/server": "10.4.2",
|
|
59
59
|
"react": ">=16.8.0",
|
|
60
60
|
"react-dom": ">=16.8.0"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@tanstack/react-query": "^4.3.8",
|
|
64
|
-
"@trpc/client": "10.4.
|
|
65
|
-
"@trpc/server": "10.4.
|
|
64
|
+
"@trpc/client": "10.4.2",
|
|
65
|
+
"@trpc/server": "10.4.2",
|
|
66
66
|
"@types/express": "^4.17.12",
|
|
67
67
|
"@types/node": "^18.7.20",
|
|
68
68
|
"express": "^4.17.1",
|
|
@@ -76,5 +76,5 @@
|
|
|
76
76
|
"publishConfig": {
|
|
77
77
|
"access": "public"
|
|
78
78
|
},
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "74ad50732ff49dde7fb023ffc325e458c6b48324"
|
|
80
80
|
}
|