Skip to content

v0.3.21

Latest

Choose a tag to compare

@xusd320 xusd320 released this 03 Sep 11:19
69b2722

Features

  • Add app.createComponent() so an external React root can own the complete Application router, query, and wrapper tree, with AbortSignal disposal support. (#124)
  • Add withMiddlewares(handler, middlewares) for explicit HTTP method policies, preserving Hono context and validation input types. Import it and RouteHandlerFn from @evjs/ev/api. (#133)

Fixes

  • Honor explicit HEAD handlers and their middleware, retain GET fallback, and preserve bodyless HEAD responses when composing handlers again.
  • Preserve composed-handler error handling across application mounts and cloned Hono applications.
  • Report invalid resolved middleware exports with their source module and array index before server startup.

Breaking changes and migration

  • src/apis/**/middleware.* is ordinary source and is no longer automatically discovered or inherited. Explicitly import and compose every required policy with each target HTTP method. This includes authentication previously provided by directory inheritance.
  • Put policies that must also cover automatic OPTIONS and 405 responses in the global src/middlewares/middleware.* entry.
  • Import MiddlewareHandler, MiddlewareChain, requestLogger, RequestLoggerOptions, and RequestLogEntry from @evjs/ev/middleware. Request, cookie, and server-function error helpers remain in @evjs/ev/server-context. Standalone @evjs/server imports are unchanged.
  • Upgrade installed @evjs/* packages together to 0.3.21.

Full changelog