github honojs/hono v3.0.2

latest releases: v4.6.2, v4.6.1, v4.6.0...
19 months ago

Summary

This is a patch release, but including some new features.

Custom fetch method for Hono Client

Previously, Hono Client could only use the built-in fetch, but now users can specify it.

For example, you can pass the fetch method of Cloudflare Service Bindings.

services = [
  { binding = "AUTH", service = "auth-service" },
]
const client = hc<CreateProfileType>('/', { fetch: c.env.AUTH.fetch });

Allow a pathname argument for app.request

We could only pass a full URL to app.request as an argument, but now we can pass the pathname. This is very useful for testing.

const res = await app.request('/hello')

What's Changed

  • Custom fetch method for Hono Client options by @JonasHiltl in #920
  • feat: allow pathname argument by @hagishi in #921
  • fix(types): app.route with multiple endpoints returns types correctly by @yusukebe in #919
  • Expose HonoRequest Type by @KeKs0r in #918
  • refactor(util): remove using Buffer from encode.ts by @yusukebe in #925
  • fix(validator): clone Request object if json or form by @yusukebe in #926
  • feat(deno): export HonoRequest type in Deno by @yusukebe in #927

New Contributors

Full Changelog: v3.0.1...v3.0.2

Don't miss a new hono release

NewReleases is sending notifications on new releases.