@trpc/next 11.0.0-alpha-tmp-02-08-tmp.275 → 11.0.0-alpha-tmp-02-08-tmp.277

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
- "bundleSize": 23023,
3
- "bundleOrigSize": 37217,
4
- "bundleReduction": 38.14,
2
+ "bundleSize": 23036,
3
+ "bundleOrigSize": 37220,
4
+ "bundleReduction": 38.11,
5
5
  "modules": [
6
6
  {
7
7
  "id": "/src/ssrPrepass.ts",
@@ -12,7 +12,7 @@
12
12
  ],
13
13
  "removedExports": [],
14
14
  "dependents": [],
15
- "percent": 21.99,
15
+ "percent": 21.97,
16
16
  "reduction": 13.51
17
17
  },
18
18
  {
@@ -26,38 +26,38 @@
26
26
  ],
27
27
  "removedExports": [],
28
28
  "dependents": [],
29
- "percent": 16.6,
29
+ "percent": 16.59,
30
30
  "reduction": 22.4
31
31
  },
32
32
  {
33
- "id": "/src/app-dir/create-action-hook.tsx",
34
- "size": 3436,
35
- "origSize": 6779,
33
+ "id": "/src/withTRPC.tsx",
34
+ "size": 3448,
35
+ "origSize": 6138,
36
36
  "renderedExports": [
37
- "experimental_serverActionLink",
38
- "experimental_createActionHook"
37
+ "withTRPC"
39
38
  ],
40
39
  "removedExports": [],
41
40
  "dependents": [
42
- "/src/app-dir/client.ts"
41
+ "/src/index.ts",
42
+ "/src/createTRPCNext.tsx"
43
43
  ],
44
- "percent": 14.92,
45
- "reduction": 49.31
44
+ "percent": 14.97,
45
+ "reduction": 43.83
46
46
  },
47
47
  {
48
- "id": "/src/withTRPC.tsx",
49
- "size": 3435,
50
- "origSize": 6135,
48
+ "id": "/src/app-dir/create-action-hook.tsx",
49
+ "size": 3436,
50
+ "origSize": 6779,
51
51
  "renderedExports": [
52
- "withTRPC"
52
+ "experimental_serverActionLink",
53
+ "experimental_createActionHook"
53
54
  ],
54
55
  "removedExports": [],
55
56
  "dependents": [
56
- "/src/index.ts",
57
- "/src/createTRPCNext.tsx"
57
+ "/src/app-dir/client.ts"
58
58
  ],
59
59
  "percent": 14.92,
60
- "reduction": 44.01
60
+ "reduction": 49.31
61
61
  },
62
62
  {
63
63
  "id": "/src/app-dir/links/nextCache.ts",
@@ -68,7 +68,7 @@
68
68
  ],
69
69
  "removedExports": [],
70
70
  "dependents": [],
71
- "percent": 11.17,
71
+ "percent": 11.16,
72
72
  "reduction": 15.54
73
73
  },
74
74
  {
@@ -80,7 +80,7 @@
80
80
  ],
81
81
  "removedExports": [],
82
82
  "dependents": [],
83
- "percent": 5.56,
83
+ "percent": 5.55,
84
84
  "reduction": 32.47
85
85
  },
86
86
  {
@@ -92,7 +92,7 @@
92
92
  ],
93
93
  "removedExports": [],
94
94
  "dependents": [],
95
- "percent": 5.18,
95
+ "percent": 5.17,
96
96
  "reduction": 39.58
97
97
  },
98
98
  {
@@ -140,7 +140,7 @@
140
140
  "/src/app-dir/links/nextHttp.ts",
141
141
  "/src/app-dir/create-action-hook.tsx"
142
142
  ],
143
- "percent": 1.46,
143
+ "percent": 1.45,
144
144
  "reduction": 89.11
145
145
  },
146
146
  {
package/dist/withTRPC.js CHANGED
@@ -58,7 +58,7 @@ function withTRPC(opts) {
58
58
  WithTRPC
59
59
  });
60
60
  } else if (AppOrPage.getInitialProps) {
61
- // Support getInitialProps in wrapped components
61
+ // Allow combining `getServerSideProps` and `getInitialProps`
62
62
  WithTRPC.getInitialProps = async (appOrPageCtx)=>{
63
63
  // Determine if we are wrapping an App component or a Page component.
64
64
  const isApp = !!appOrPageCtx.Component;
package/dist/withTRPC.mjs CHANGED
@@ -56,7 +56,7 @@ function withTRPC(opts) {
56
56
  WithTRPC
57
57
  });
58
58
  } else if (AppOrPage.getInitialProps) {
59
- // Support getInitialProps in wrapped components
59
+ // Allow combining `getServerSideProps` and `getInitialProps`
60
60
  WithTRPC.getInitialProps = async (appOrPageCtx)=>{
61
61
  // Determine if we are wrapping an App component or a Page component.
62
62
  const isApp = !!appOrPageCtx.Component;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trpc/next",
3
- "version": "11.0.0-alpha-tmp-02-08-tmp.275+99017b9ae",
3
+ "version": "11.0.0-alpha-tmp-02-08-tmp.277+014014324",
4
4
  "description": "The tRPC Next.js library",
5
5
  "author": "KATT",
6
6
  "license": "MIT",
@@ -73,9 +73,9 @@
73
73
  ],
74
74
  "peerDependencies": {
75
75
  "@tanstack/react-query": "^5.0.0",
76
- "@trpc/client": "11.0.0-alpha-tmp-02-08-tmp.275+99017b9ae",
77
- "@trpc/react-query": "11.0.0-alpha-tmp-02-08-tmp.275+99017b9ae",
78
- "@trpc/server": "11.0.0-alpha-tmp-02-08-tmp.275+99017b9ae",
76
+ "@trpc/client": "11.0.0-alpha-tmp-02-08-tmp.277+014014324",
77
+ "@trpc/react-query": "11.0.0-alpha-tmp-02-08-tmp.277+014014324",
78
+ "@trpc/server": "11.0.0-alpha-tmp-02-08-tmp.277+014014324",
79
79
  "next": "*",
80
80
  "react": ">=16.8.0",
81
81
  "react-dom": ">=16.8.0"
@@ -90,9 +90,9 @@
90
90
  },
91
91
  "devDependencies": {
92
92
  "@tanstack/react-query": "^5.0.0",
93
- "@trpc/client": "11.0.0-alpha-tmp-02-08-tmp.275+99017b9ae",
94
- "@trpc/react-query": "11.0.0-alpha-tmp-02-08-tmp.275+99017b9ae",
95
- "@trpc/server": "11.0.0-alpha-tmp-02-08-tmp.275+99017b9ae",
93
+ "@trpc/client": "11.0.0-alpha-tmp-02-08-tmp.277+014014324",
94
+ "@trpc/react-query": "11.0.0-alpha-tmp-02-08-tmp.277+014014324",
95
+ "@trpc/server": "11.0.0-alpha-tmp-02-08-tmp.277+014014324",
96
96
  "@types/express": "^4.17.17",
97
97
  "@types/node": "^20.10.0",
98
98
  "@types/react": "^18.2.33",
@@ -112,5 +112,5 @@
112
112
  "funding": [
113
113
  "https://trpc.io/sponsor"
114
114
  ],
115
- "gitHead": "99017b9ae645f34e37d0fa9281b27c02657493eb"
115
+ "gitHead": "0140143249bd8bf3905a14a3f0dec494bae5e826"
116
116
  }
package/src/withTRPC.tsx CHANGED
@@ -157,7 +157,7 @@ export function withTRPC<
157
157
  WithTRPC,
158
158
  });
159
159
  } else if (AppOrPage.getInitialProps) {
160
- // Support getInitialProps in wrapped components
160
+ // Allow combining `getServerSideProps` and `getInitialProps`
161
161
 
162
162
  WithTRPC.getInitialProps = async (appOrPageCtx: AppContextType) => {
163
163
  // Determine if we are wrapping an App component or a Page component.
@@ -177,7 +177,7 @@ export function withTRPC<
177
177
  ...originalPageProps,
178
178
  ...pageProps,
179
179
  };
180
- const getAppTreeProps = (props: Record<string, unknown>) =>
180
+ const getAppTreeProps = (props: Dict<unknown>) =>
181
181
  isApp ? { pageProps: props } : props;
182
182
 
183
183
  return getAppTreeProps(pageProps);