Skip to content

v0.2.3

Compare
Choose a tag to compare
@rawnly rawnly released this 18 Oct 22:28
· 9 commits to main since this release
9dbd371

What's Changed

New api and breaking changes:

  1. Is now available a beforeAll callback that is executed before the request reaches any middleware. It is available both globally and per hostname.

  2. The signature of the handler has changed to use the response generated by the beforeAll callback

declare type Handler = <T>(request: NextRequestWithParams<T>, response: NextResponse, event: NextFetchEvent) => NextResponse
  1. Renamed inecjtor to context
  2. Added a response factory in the options to improve compatibility with other middlewares

Changes

  • feat: added beforeAll middleware and renamed injector to context
  • docs: changelog
  • fix: fixed context and response factory
  • docs: updated docs + example
  • chore: updated versions
  • docs: copy readme to package folder
  • docs: readme update

Full Changelog: v0.2.1...0.2.3