@trpc/react-query 11.0.0-alpha-tmp-app-router-example.367 → 11.0.0-alpha-tmp-app-router-example.369

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
  {
2
2
  "bundleSize": 32108,
3
- "bundleOrigSize": 68254,
4
- "bundleReduction": 52.96,
3
+ "bundleOrigSize": 68273,
4
+ "bundleReduction": 52.97,
5
5
  "modules": [
6
6
  {
7
7
  "id": "/src/shared/hooks/createHooksInternal.tsx",
@@ -65,14 +65,14 @@
65
65
  {
66
66
  "id": "/src/rsc.tsx",
67
67
  "size": 2677,
68
- "origSize": 4814,
68
+ "origSize": 4833,
69
69
  "renderedExports": [
70
70
  "createHydrationHelpers"
71
71
  ],
72
72
  "removedExports": [],
73
73
  "dependents": [],
74
74
  "percent": 8.34,
75
- "reduction": 44.39
75
+ "reduction": 44.61
76
76
  },
77
77
  {
78
78
  "id": "/src/internals/getQueryKey.ts",
package/dist/rsc.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import { type QueryClient } from '@tanstack/react-query';
2
- import { TRPCClientError } from '@trpc/client';
3
- import { inferTransformedProcedureOutput } from '@trpc/server';
4
- import { AnyRootTypes, inferRouterRootTypes, type AnyRouter, type inferProcedureInput, type RouterRecord } from '@trpc/server/unstable-core-do-not-import';
5
- import type { AnyProcedure, inferProcedureOutput, RouterCaller, TypeError } from '@trpc/server/unstable-core-do-not-import';
2
+ import type { TRPCClientError } from '@trpc/client';
3
+ import type { inferTransformedProcedureOutput } from '@trpc/server';
4
+ import { type AnyRouter, type inferProcedureInput, type RouterRecord } from '@trpc/server/unstable-core-do-not-import';
5
+ import type { AnyProcedure, AnyRootTypes, inferProcedureOutput, inferRouterRootTypes, RouterCaller, TypeError } from '@trpc/server/unstable-core-do-not-import';
6
6
  import * as React from 'react';
7
- import { TRPCFetchInfiniteQueryOptions, TRPCFetchQueryOptions } from './shared';
7
+ import type { TRPCFetchInfiniteQueryOptions, TRPCFetchQueryOptions } from './shared';
8
8
  type DecorateProcedure<TRoot extends AnyRootTypes, TProcedure extends AnyProcedure> = {
9
9
  (input: inferProcedureInput<TProcedure>): Promise<inferProcedureOutput<TProcedure>>;
10
10
  prefetch: (input: inferProcedureInput<TProcedure>, opts?: TRPCFetchQueryOptions<inferTransformedProcedureOutput<TRoot, TProcedure>, TRPCClientError<TRoot>>) => Promise<void>;
package/dist/rsc.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"rsc.d.ts","sourceRoot":"","sources":["../src/rsc.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,WAAW,EACjB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,+BAA+B,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,EACL,YAAY,EAEZ,oBAAoB,EAEpB,KAAK,SAAS,EACd,KAAK,mBAAmB,EACxB,KAAK,YAAY,EAClB,MAAM,0CAA0C,CAAC;AAClD,OAAO,KAAK,EACV,YAAY,EACZ,oBAAoB,EACpB,YAAY,EACZ,SAAS,EACV,MAAM,0CAA0C,CAAC;AAClD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,6BAA6B,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAIhF,KAAK,iBAAiB,CACpB,KAAK,SAAS,YAAY,EAC1B,UAAU,SAAS,YAAY,IAC7B;IACF,CAAC,KAAK,EAAE,mBAAmB,CAAC,UAAU,CAAC,GAAG,OAAO,CAC/C,oBAAoB,CAAC,UAAU,CAAC,CACjC,CAAC;IACF,QAAQ,EAAE,CACR,KAAK,EAAE,mBAAmB,CAAC,UAAU,CAAC,EACtC,IAAI,CAAC,EAAE,qBAAqB,CAC1B,+BAA+B,CAAC,KAAK,EAAE,UAAU,CAAC,EAClD,eAAe,CAAC,KAAK,CAAC,CACvB,KACE,OAAO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YAAY,GACvD,iBAAiB,CAAC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,GACvC,OAAO,CAAC,IAAI,CAAC,SAAS,YAAY,GAClC,oBAAoB,CAAC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,GAC1C,KAAK;CACV,CAAC;AAEF,KAAK,MAAM,CAAC,OAAO,SAAS,SAAS,IAAI,UAAU,CACjD,YAAY,CAAC,oBAAoB,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC,CACvE,CAAC;AAEF,wBAAgB,sBAAsB,CAAC,OAAO,SAAS,SAAS,EAC9D,MAAM,EAAE,SAAS,SAAS,OAAO,GAC7B,SAAS,CAAC,6DAA6D,CAAC,GACxE,MAAM,CAAC,OAAO,CAAC,EACnB,cAAc,EAAE,MAAM,WAAW;IAqD/B;;;;;;;;;;;OAWG;;IAEH;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;2BAlDyB;QAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;KAAE;EAqD5D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trpc/react-query",
3
- "version": "11.0.0-alpha-tmp-app-router-example.367+bc87f071f",
3
+ "version": "11.0.0-alpha-tmp-app-router-example.369+840e1867d",
4
4
  "description": "The tRPC React library",
5
5
  "author": "KATT",
6
6
  "license": "MIT",
@@ -63,16 +63,16 @@
63
63
  }
64
64
  },
65
65
  "peerDependencies": {
66
- "@tanstack/react-query": "^5.40.0",
67
- "@trpc/client": "11.0.0-alpha-tmp-app-router-example.367+bc87f071f",
68
- "@trpc/server": "11.0.0-alpha-tmp-app-router-example.367+bc87f071f",
66
+ "@tanstack/react-query": "^5.25.0",
67
+ "@trpc/client": "11.0.0-alpha-tmp-app-router-example.369+840e1867d",
68
+ "@trpc/server": "11.0.0-alpha-tmp-app-router-example.369+840e1867d",
69
69
  "react": ">=18.2.0",
70
70
  "react-dom": ">=18.2.0"
71
71
  },
72
72
  "devDependencies": {
73
73
  "@tanstack/react-query": "^5.40.0",
74
- "@trpc/client": "11.0.0-alpha-tmp-app-router-example.367+bc87f071f",
75
- "@trpc/server": "11.0.0-alpha-tmp-app-router-example.367+bc87f071f",
74
+ "@trpc/client": "11.0.0-alpha-tmp-app-router-example.369+840e1867d",
75
+ "@trpc/server": "11.0.0-alpha-tmp-app-router-example.369+840e1867d",
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": "bc87f071fdececce20027eb8ed6deb422a3523d8"
95
+ "gitHead": "840e1867d43beb0d68bbd9a758c14d8d0233c426"
96
96
  }
package/src/rsc.tsx CHANGED
@@ -3,26 +3,29 @@ import {
3
3
  HydrationBoundary,
4
4
  type QueryClient,
5
5
  } from '@tanstack/react-query';
6
- import { TRPCClientError } from '@trpc/client';
7
- import { inferTransformedProcedureOutput } from '@trpc/server';
6
+ import type { TRPCClientError } from '@trpc/client';
7
+ import type { inferTransformedProcedureOutput } from '@trpc/server';
8
8
  import {
9
- AnyRootTypes,
10
9
  createRecursiveProxy,
11
- inferRouterRootTypes,
12
- Maybe,
13
10
  type AnyRouter,
14
11
  type inferProcedureInput,
15
12
  type RouterRecord,
16
13
  } from '@trpc/server/unstable-core-do-not-import';
17
14
  import type {
18
15
  AnyProcedure,
16
+ AnyRootTypes,
19
17
  inferProcedureOutput,
18
+ inferRouterRootTypes,
19
+ Maybe,
20
20
  RouterCaller,
21
21
  TypeError,
22
22
  } from '@trpc/server/unstable-core-do-not-import';
23
23
  import * as React from 'react';
24
24
  import { getQueryKeyInternal } from './internals/getQueryKey';
25
- import { TRPCFetchInfiniteQueryOptions, TRPCFetchQueryOptions } from './shared';
25
+ import type {
26
+ TRPCFetchInfiniteQueryOptions,
27
+ TRPCFetchQueryOptions,
28
+ } from './shared';
26
29
 
27
30
  const HELPERS = ['prefetch', 'prefetchInfinite'];
28
31
 
@@ -83,7 +86,7 @@ export function createHydrationHelpers<TRouter extends AnyRouter>(
83
86
  const input = args[0];
84
87
  const promise = proc(input);
85
88
 
86
- const helper = path.pop()!;
89
+ const helper = path.pop();
87
90
  if (helper === 'prefetch') {
88
91
  const args1 = args[1] as Maybe<
89
92
  TRPCFetchInfiniteQueryOptions<any, any, any>