Skip to content
Myr

docs: update the migration guide for releasing v4 (#2159)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Yusuke Wada · committed by GitHub · parent 651c497 · Browse files · 1 file+38 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+38 added−0 removed

  • other:+38 added−0 removed

1 file+38 added−0 removed

modified:docs/MIGRATION.md+38 added
1# Migration Guide23## v3.12.x to v4.0.045There are some breaking changes.67### Removal of deprecated features89- AWS Lambda Adapter - `LambdaFunctionUrlRequestContext` is obsolete. Use `ApiGatewayRequestContextV2` instead.10- Next.js Adapter - `hono/nextjs` is obsolete. Use `hono/vercel` instead.11- Context - `c.jsonT()` is obsolete. Use `c.json()` instead.12- Context - `c.stream()` and `c.streamText()` are obsolete. Use `stream()` and `streamText()` in `hono/streaming` instead.13- Context - `c.env()` is obsolete. Use `getRuntimeKey()` in `hono/adapter` instead.14- Hono - `app.showRoutes()` is obsolete. Use `showRoutes()` in `hono/dev` instead.15- Hono - `app.routerName` is obsolete. Use `getRouterName()` in `hono/dev` instead.16- Hono - `app.head()` is no longer used. `app.get()` implicitly handles the HEAD method.17- Hono - `app.handleEvent()` is obsolete. Use `app.fetch()` instead.18- HonoRequest - `req.cookie()` is obsolete. Use `getCookie()` in `hono/cookie` instead.19- HonoRequest - `headers()`, `body()`, `bodyUsed()`, `integrity()`, `keepalive()`, `referrer()`, and `signal()` are obsolete. Use the methods in `req.raw` such as `req.raw.headers()`.2021### `serveStatic` in Cloudflare Workers Adapter requires `manifest`2223If you use the Cloudflare Workers adapter's `serve-static`, you should specify the `manifest` option.2425```ts26import manifest from '__STATIC_CONTENT_MANIFEST'2728// ...2930app.use('/static/*', serveStatic({ root: './assets', manifest }))31```3233### Others3435- The default value of `docType` option in JSX Renderer Middleware is now `true`.36- `FC` in `hono/jsx` does not pass `children`. Use `PropsWithChildren`.37- Some Mime Types are removed https://github.com/honojs/hono/pull/2119.38- Types for chaining routes with middleware matter: https://github.com/honojs/hono/pull/2046.39- Types for the validator matter: https://github.com/honojs/hono/pull/2130.4041## v2.7.8 to v3.0.04243There are some breaking changes.44In addition to the following, type mismatches may occur.
233 unmodified lines