From b8804c83be8bcb637a42d497a4a8a8b56a432557 Mon Sep 17 00:00:00 2001 From: Anon-136 Date: Fri, 23 Jan 2026 22:24:43 +0700 Subject: [PATCH 1/2] fix: add ClientRequest with path and base path --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- src/index.ts | 12 ++++++------ src/types.ts | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index 4795dc7..750003e 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ }, "peerDependencies": { "@tanstack/react-query": ">=5.71.5", - "hono": ">=4.10.1" + "hono": ">=4.11.4" }, "devDependencies": { "@changesets/changelog-github": "^0.5.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3cd9604..62e579a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,8 +12,8 @@ importers: specifier: '>=5.71.5' version: 5.90.5(react@19.2.0) hono: - specifier: '>=4.10.1' - version: 4.10.1 + specifier: '>=4.11.4' + version: 4.11.5 devDependencies: '@changesets/changelog-github': specifier: ^0.5.1 @@ -1006,8 +1006,8 @@ packages: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} - hono@4.10.1: - resolution: {integrity: sha512-rpGNOfacO4WEPClfkEt1yfl8cbu10uB1lNpiI33AKoiAHwOS8lV748JiLx4b5ozO/u4qLjIvfpFsPXdY5Qjkmg==} + hono@4.11.5: + resolution: {integrity: sha512-WemPi9/WfyMwZs+ZUXdiwcCh9Y+m7L+8vki9MzDw3jJ+W9Lc+12HGsd368Qc1vZi1xwW8BWMMsnK5efYKPdt4g==} engines: {node: '>=16.9.0'} human-id@4.1.2: @@ -2701,7 +2701,7 @@ snapshots: has-flag@4.0.0: {} - hono@4.10.1: {} + hono@4.11.5: {} human-id@4.1.2: {} diff --git a/src/index.ts b/src/index.ts index a712f0d..8cd9a60 100644 --- a/src/index.ts +++ b/src/index.ts @@ -95,7 +95,7 @@ async function responseParser(response: Response, throwOnError?: boolean): Promi } function useQueryFactory>( - client: Record> + client: Record> ): UseHonoQuery { return (path, method, honoPayload, hookOptions) => { return useQuery( @@ -105,7 +105,7 @@ function useQueryFactory>( } function useSuspenseQueryFactory>( - client: Record> + client: Record> ): UseHonoSuspenseQuery { return (path, method, honoPayload, hookOptions) => { return useSuspenseQuery( @@ -115,7 +115,7 @@ function useSuspenseQueryFactory>( } function queryOptionsFactory>( - client: Record> + client: Record> ): HonoQueryOptions { return (path, method, honoPayload, hookOptions) => { const paths = [...path.toString().split('/').filter(Boolean), method.toString()] @@ -140,7 +140,7 @@ function queryOptionsFactory>( } function suspenseQueryOptionsFactory>( - client: Record> + client: Record> ): HonoSuspenseQueryOptions { return (path, method, honoPayload, hookOptions) => { const paths = [...path.toString().split('/').filter(Boolean), method.toString()] @@ -165,7 +165,7 @@ function suspenseQueryOptionsFactory>( } function useMutationFactory>( - client: Record> + client: Record> ): UseHonoMutation { return ((path, method, honoOptions, hookOptions) => { return useMutation( @@ -175,7 +175,7 @@ function useMutationFactory>( } function mutationOptionsFactory>( - client: Record> + client: Record> ): HonoMutationOptions { return ((path, method, honoOptions, hookOptions) => { const paths = [...path.toString().split('/').filter(Boolean), method.toString()] diff --git a/src/types.ts b/src/types.ts index 2b91596..03b437a 100644 --- a/src/types.ts +++ b/src/types.ts @@ -27,7 +27,7 @@ export type Client = T extends HonoBase ? TSchema extends Record ? TPath extends string - ? { [K in TPath]: ClientRequest } + ? { [K in TPath]: ClientRequest<'/', TPath, TSchema[TPath]> } : never : never : never From 0f2f7b701980168a2f56184ad3cc05f4a9fd118f Mon Sep 17 00:00:00 2001 From: Anon Jindawong <51981658+Anon-136@users.noreply.github.com> Date: Fri, 23 Jan 2026 22:31:09 +0700 Subject: [PATCH 2/2] Fix hono package version in changeset Update hono package to version 4.11.4. --- .changeset/clever-taxis-punch.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/clever-taxis-punch.md diff --git a/.changeset/clever-taxis-punch.md b/.changeset/clever-taxis-punch.md new file mode 100644 index 0000000..27b2df1 --- /dev/null +++ b/.changeset/clever-taxis-punch.md @@ -0,0 +1,5 @@ +--- +"@softnetics/hono-react-query": patch +--- + +fix: update hono@4.11.4