Skip to content

Commit 7f5e0dd

Browse files
authored
Merge pull request #23 from softnetics/anon/update-hono-deps
fix: update hono@4.11.4
2 parents b6cd074 + 0f2f7b7 commit 7f5e0dd

File tree

5 files changed

+18
-13
lines changed

5 files changed

+18
-13
lines changed

.changeset/clever-taxis-punch.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@softnetics/hono-react-query": patch
3+
---
4+
5+
fix: update hono@4.11.4

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
},
2929
"peerDependencies": {
3030
"@tanstack/react-query": ">=5.71.5",
31-
"hono": ">=4.10.1"
31+
"hono": ">=4.11.4"
3232
},
3333
"devDependencies": {
3434
"@changesets/changelog-github": "^0.5.1",

pnpm-lock.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ async function responseParser(response: Response, throwOnError?: boolean): Promi
9595
}
9696

9797
function useQueryFactory<T extends Record<string, any>>(
98-
client: Record<string, ClientRequest<any>>
98+
client: Record<string, ClientRequest<any, any, any>>
9999
): UseHonoQuery<T> {
100100
return (path, method, honoPayload, hookOptions) => {
101101
return useQuery(
@@ -105,7 +105,7 @@ function useQueryFactory<T extends Record<string, any>>(
105105
}
106106

107107
function useSuspenseQueryFactory<T extends Record<string, any>>(
108-
client: Record<string, ClientRequest<any>>
108+
client: Record<string, ClientRequest<any, any, any>>
109109
): UseHonoSuspenseQuery<T> {
110110
return (path, method, honoPayload, hookOptions) => {
111111
return useSuspenseQuery(
@@ -115,7 +115,7 @@ function useSuspenseQueryFactory<T extends Record<string, any>>(
115115
}
116116

117117
function queryOptionsFactory<T extends Record<string, any>>(
118-
client: Record<string, ClientRequest<any>>
118+
client: Record<string, ClientRequest<any, any, any>>
119119
): HonoQueryOptions<T> {
120120
return (path, method, honoPayload, hookOptions) => {
121121
const paths = [...path.toString().split('/').filter(Boolean), method.toString()]
@@ -140,7 +140,7 @@ function queryOptionsFactory<T extends Record<string, any>>(
140140
}
141141

142142
function suspenseQueryOptionsFactory<T extends Record<string, any>>(
143-
client: Record<string, ClientRequest<any>>
143+
client: Record<string, ClientRequest<any, any, any>>
144144
): HonoSuspenseQueryOptions<T> {
145145
return (path, method, honoPayload, hookOptions) => {
146146
const paths = [...path.toString().split('/').filter(Boolean), method.toString()]
@@ -165,7 +165,7 @@ function suspenseQueryOptionsFactory<T extends Record<string, any>>(
165165
}
166166

167167
function useMutationFactory<T extends Record<string, any>>(
168-
client: Record<string, ClientRequest<any>>
168+
client: Record<string, ClientRequest<any, any, any>>
169169
): UseHonoMutation<T> {
170170
return ((path, method, honoOptions, hookOptions) => {
171171
return useMutation(
@@ -175,7 +175,7 @@ function useMutationFactory<T extends Record<string, any>>(
175175
}
176176

177177
function mutationOptionsFactory<T extends Record<string, any>>(
178-
client: Record<string, ClientRequest<any>>
178+
client: Record<string, ClientRequest<any, any, any>>
179179
): HonoMutationOptions<T> {
180180
return ((path, method, honoOptions, hookOptions) => {
181181
const paths = [...path.toString().split('/').filter(Boolean), method.toString()]

src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export type Client<T> =
2727
T extends HonoBase<any, infer TSchema, any>
2828
? TSchema extends Record<infer TPath, Schema>
2929
? TPath extends string
30-
? { [K in TPath]: ClientRequest<TSchema[TPath]> }
30+
? { [K in TPath]: ClientRequest<'/', TPath, TSchema[TPath]> }
3131
: never
3232
: never
3333
: never

0 commit comments

Comments
 (0)