Skip to content

Releases: unjs/h3

v1.8.0-rc.2

02 Aug 12:53
@pi0 pi0
Compare
Choose a tag to compare
v1.8.0-rc.2 Pre-release
Pre-release

compare changes

🚀 Enhancements

  • app: Handle bigint return types (#474)
  • Preserve and make error cause accessable (#479)
  • Platform agnostic serveStatic utility (#480)
  • app: onRequest, onBeforeResponse and onAfterResponse global hooks (#482)
  • plain and web adapters (#483)

🩹 Fixes

  • app: Handle directly node.res.end() returned value (7b18fa0)
  • stream: Improve node.js redable stream check (cdd2680)
  • proxy: Merge overriden headers with different case (#476)
  • readbody: Accept additional options for urlencoded header (#437)
  • app: Throw error when trying to return function or symbol as response (6e58103)
  • app: Use default error handler if onError does not handles reponse (#478)
  • proxyRequest: Only attempt to read body if incoming request can contain body (a26579f)
  • app: Make sure resolved val is also not undefined before calling hooks (cfe397e)

💅 Refactors

  • app: Extract handler returned response handling (#473)
  • event: Always normalize event.method (7585861)
  • Deprecate getMethod to prefer event.method (bc202c0)
  • event: Use sendWebResponse for event.respondWith (#481)

🏡 Chore

  • Remove extra log in tests (06d1bc1)

✅ Tests

  • proxy: Remove external request to speedup (d4f5440)
  • Add evetHandler wrapper (d351ba9)

❤️ Contributors

  • Pooya Parsa (@pi0)

v1.8.0-rc.1

31 Jul 11:45
@pi0 pi0
Compare
Choose a tag to compare
v1.8.0-rc.1 Pre-release
Pre-release

compare changes

🩹 Fixes

❤️ Contributors

  • Pooya Parsa (@pi0)

v1.8.0-rc.0

31 Jul 11:06
@pi0 pi0
Compare
Choose a tag to compare
v1.8.0-rc.0 Pre-release
Pre-release

compare changes

🚀 Enhancements

  • Support web streams (#432)
  • Add event.method and event.headers (#429)
  • Support blob responses (#422)
  • Web responses with streaming support (#436)
  • readBody: Validate requests with application/json content type (#207)
  • event: Support event.url (#455)
  • event: event.body with readable stream (#457)
  • event: event.request getter to access web request (#454)
  • Add readFormData util (#421)
  • proxy: Stream request body with streamRequest option (#374)
  • readValidatedBody and getValidatedQuery utils (#459)
  • Add removeResponseHeader and clearResponseHeaders utils (#427)
  • Add event handler generics for typed request body and query (#417)

🩹 Fixes

  • proxy: Handle responses with no content (#433)
  • Split set-cookie value when handling web responses (#445)
  • defineLazyEventHandler: Infer return type (#442)
  • proxy: Respect fetchOptions.method over incoming request method (#441)
  • Append set-cookie headers in web response (#453)
  • proxy: Avoid decoding request body as utf8 (#440)
  • readMultipartFormData: Handle utf8 encoding for name and filename (#416)
  • event: Do not remove double slashes from query (#462)
  • router: Fallback for method-shadowed routes (#461)
  • proxy: Transparently forward errors when passing ofetch (#466)
  • Keep backward compatibility with event.node.req.url (#471)
  • getRequestPath: Avoid double normalization (0181d33)

💅 Refactors

  • app:: Split return type conditions (#434)
  • Use event.path instead of event.node.req.url for internal utils (#438)
  • Type event.node.req.originalUrl (6c87d87)
  • Alias isEventHandler to isEvent (#452)

📖 Documentation

  • Update link to how it works (3dd2376)
  • Split readme into subsection and document missing helpers (#428)
  • Improve nightly release usage section (#468)

🏡 Chore

  • Add autofix ci (e359f5f)
  • Online stackblitz playground (#451)
  • Add link to example for nested routers (0968902)
  • Setup nightly releases (#467)

✅ Tests

  • proxy: Disable keep alive to run faster (8783ab6)
  • proxy: Avoid consuming body in interceptor (b960a74)
  • Add polyfills to run all tests against node.js 16 (#456)

🤖 CI

  • Use conventional commits for autofix (#470)

❤️ Contributors

v1.7.1

28 Jun 10:58
@pi0 pi0
7b5d4df
Compare
Choose a tag to compare

compare changes

🩹 Fixes

  • fetchWithEvent: Allow customizing fetch impl type (#414)

💅 Refactors

  • Improve H3Error (#415)

📖 Documentation

  • Update link to how it works (3dd2376)

❤️ Contributors

v1.7.0

20 Jun 22:06
@pi0 pi0
23b3f6b
Compare
Choose a tag to compare

compare changes

🚀 Enhancements

  • proxy: Support onResponse callback (#368)
  • useSession: Support custom session id generator (#390)
  • event.handled flag (#410)

🩹 Fixes

  • types: Type for get router parameter utils (#400)
  • proxy: Split cookie headers properly with native node fetch (#408)
  • readRawBody: Handle body as object (#403)
  • router: Send 204 with empty string in preemptive mode instead of 404 (#409)
  • cache, proxy, response: Avoid sending handled events (#411)

📖 Documentation

  • Add event as first arg for proxyRequest (3e5f427)

🏡 Chore

❤️ Contributors

v1.6.6

15 May 10:58
@pi0 pi0
Compare
Choose a tag to compare

compare changes

🩹 Fixes

  • getRequestURL: Normalize double slashes (b5d2972)
  • getRequestURL: Make x-forwarded-host support opt-in (2fce169)
  • event: Normalize event.path (981c89f)

✅ Tests

  • Add tests for getRequestURL (d510483)

❤️ Contributors

v1.6.5

05 May 08:33
@pi0 pi0
Compare
Choose a tag to compare

compare changes

🩹 Fixes

  • readRawBody: Resolve cached promise before normalizing buffer (2e472e8)

🏡 Chore

❤️ Contributors

  • Pooya Parsa (@pi0)

v1.6.4

28 Mar 12:39
@pi0 pi0
Compare
Choose a tag to compare

compare changes

🩹 Fixes

  • readRawBody: Always return buffer without encoding (19d133d)

❤️ Contributors

  • Pooya Parsa (@pi0)

v1.6.3

28 Mar 11:08
@pi0 pi0
2af071b
Compare
Choose a tag to compare

compare changes

🩹 Fixes

  • readBody, readRawBody: Handle raw body as buffer (#366)

📖 Documentation

  • Missing parentheses (#362)

🏡 Chore

❤️ Contributors

v1.6.2

15 Mar 22:19
@pi0 pi0
e885dc1
Compare
Choose a tag to compare

compare changes

🩹 Fixes

  • setResponseStatus: Mark code type as optional (#359)
  • Sanitize utils and sanitize all response code and messages (#358)

❤️ Contributors