@firtoz/hono-fetcher 2.1.0 → 2.3.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firtoz/hono-fetcher",
3
- "version": "2.1.0",
3
+ "version": "2.3.0",
4
4
  "description": "Type-safe Hono API client with full TypeScript inference for routes, params, and payloads",
5
5
  "main": "./src/index.ts",
6
6
  "module": "./src/index.ts",
@@ -23,7 +23,7 @@
23
23
  "README.md"
24
24
  ],
25
25
  "scripts": {
26
- "typecheck": "tsc --noEmit",
26
+ "typecheck": "tsc --noEmit -p ./tsconfig.json",
27
27
  "lint": "biome check --write src",
28
28
  "lint:ci": "biome ci src",
29
29
  "format": "biome format src --write",
@@ -53,7 +53,7 @@
53
53
  },
54
54
  "peerDependencies": {
55
55
  "@cloudflare/workers-types": "^4.20251008.0",
56
- "hono": "^4.9.10"
56
+ "hono": "^4.10.1"
57
57
  },
58
58
  "engines": {
59
59
  "node": ">=18.0.0"
@@ -122,7 +122,8 @@ export type TypedWebSocketFetcher<T extends Hono> = <
122
122
  export type BaseTypedHonoFetcher<T extends Hono> = {
123
123
  [M in AvailableMethods<T>]: TypedMethodFetcher<T, M>;
124
124
  } & (keyof HonoSchema<T>["get"] extends never
125
- ? {}
125
+ ? // biome-ignore lint/complexity/noBannedTypes: We really do want an empty object if the get method is not available
126
+ {}
126
127
  : { websocket: TypedWebSocketFetcher<T> });
127
128
 
128
129
  const createMethodFetcher = <T extends Hono, M extends HttpMethod>(
@@ -161,8 +162,9 @@ const createMethodFetcher = <T extends Hono, M extends HttpMethod>(
161
162
  body = JSON.stringify(requestAsOptionalFormBody.body) as BodyInit;
162
163
  }
163
164
 
164
- // biome-ignore lint/suspicious/noExplicitAny: Different runtimes have incompatible HeadersInit types
165
- const newHeaders = new Headers(init.headers as any);
165
+ const newHeaders = new Headers(
166
+ init.headers as unknown as ConstructorParameters<typeof Headers>[0],
167
+ );
166
168
 
167
169
  if (body && !requestAsOptionalFormBody.form) {
168
170
  newHeaders.set("Content-Type", "application/json");
@@ -200,8 +202,9 @@ const createWebSocketFetcher = <T extends Hono>(
200
202
  }, finalUrl);
201
203
  }
202
204
 
203
- // biome-ignore lint/suspicious/noExplicitAny: Different runtimes have incompatible HeadersInit types
204
- const newHeaders = new Headers(init.headers as any);
205
+ const newHeaders = new Headers(
206
+ init.headers as unknown as ConstructorParameters<typeof Headers>[0],
207
+ );
205
208
  newHeaders.set("Upgrade", "websocket");
206
209
 
207
210
  try {