Skip to content

Releases: unjs/h3

v1.11.1

25 Feb 19:43
@pi0 pi0
Compare
Choose a tag to compare

compare changes

🩹 Fixes

  • ws: Resolve pathname for matching (4f211f8)

📖 Documentation

🏡 Chore

❤️ Contributors

  • Pooya Parsa (@pi0)

v1.11.0

25 Feb 18:21
@pi0 pi0
0e930ef
Compare
Choose a tag to compare

compare changes

⭐ Highlights

🚀 Enhancements

  • Add utilities for server-sent events (SSE) (#586)
  • response: Add sendIterable util (#655)
  • Handler resolver (#669)
  • WebSocket support (#671)

🩹 Fixes

  • serveStatic: Ensure etag header is set before sending 304 response (#653)

📖 Documentation

🏡 Chore

❤️ Contributors

v1.10.2

19 Feb 17:15
@pi0 pi0
e38d444
Compare
Choose a tag to compare

compare changes

🩹 Fixes

  • proxy: Ignore incoming accept header (#646)

❤️ Contributors

v1.10.1

25 Jan 22:16
@pi0 pi0
Compare
Choose a tag to compare

compare changes

🩹 Fixes

  • setResponseHeaders: Fix types to allow partial header names (#607)
  • setCookie: Allow cookies with the same name but different options (#606)
  • getRequestWebStream: Reuse buffered body if available (#616)
  • getSession: Use semaphore lock for unseal operation (#612)
  • getRequestIP: Use first address of x-forwarded-for header (#618)
  • Avoid setting default content-type for responses with 304 status (#641)

💅 Refactors

  • Use H3Event.node.res for internal types (#626)

📖 Documentation

  • Fix getRequestHeaders signuture (#613)
  • Fix typo in examples (#631)

✅ Tests

❤️ Contributors

v1.10.0

04 Jan 20:30
@pi0 pi0
6c7cf53
Compare
Choose a tag to compare

compare changes

🚀 Enhancements

  • validate: Provide validate error in data (#594)

🩹 Fixes

  • readRawBody: Check req.rawBody before req.body (#604)

📖 Documentation

  • Add h3-compression to community packages (#524)
  • Add examples (#539)

🌊 Types

  • Add generics to isError and update DataT default generic param (#582)
  • setResponseHeaders: Add autocompletion for header names (#601)

❤️ Contributors

v1.9.0

20 Nov 11:02
@pi0 pi0
Compare
Choose a tag to compare

compare changes

🚀 Enhancements

  • getValidatedRouterParams util (#573)
  • decode option for getRouterParam (#556)
  • getRequestFingerprint util (#564)

🩹 Fixes

  • sendNoContent: Preserve custom status code if already set (#577)

📖 Documentation

  • Add @intlify/h3 to community packages (#559)
  • Improve jsdocs (#574)
  • Add package pronunciation (#569)

🌊 Types

  • Add generics to H3Error data and createError (#566)
  • Support auto complete for HTTP header names in utils (#542)

❤️ Contributors

v1.8.2

26 Sep 17:34
@pi0 pi0
01fab41
Compare
Choose a tag to compare

compare changes

🩹 Fixes

  • getRequestProtocol: Conditionaly check connection?.encrypted (#532)

🏡 Chore

❤️ Contributors

v1.8.1

26 Aug 21:10
@pi0 pi0
Compare
Choose a tag to compare

compare changes

🩹 Fixes

  • Use safe property checks (#521)

💅 Refactors

  • Use native Headers and Response for legacy polyfills (#523)

📖 Documentation

  • Typo for getValidatedQuery (164f68e)

✅ Tests

  • proxy: Add additional test to make sure JSON response is sent as is (#512)

❤️ Contributors

v1.8.0 - Towards the Edge of the Web!

15 Aug 08:54
@pi0 pi0
Compare
Choose a tag to compare

note
Checkout the blog article for release notes and more information.

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)
  • 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)
  • Object-syntax event handlers (#485)
  • event: Add default stringify with method and url for better DX (#493)
  • Support react pipeable streams (#494)
  • router: Expose event.context.matchedRoute (#500)
  • web: Add fromWebHandler (#490)
  • Support fromPlainHandler (bc2ca33)
  • Add getRequestIP util (#503)
  • defineRequestMidleware, defineResponseMiddleware and rename object synctax hooks (#507)

🩹 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 reponse (#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)
  • 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)
  • app: Use response.body instead of initial returned val (0434358)
  • Make request and response types explicit (#489)
  • web: Use null for null body responses (#495)
  • sanitizeStatusCode: Input is optional (67a4132)
  • sendNoContent: Avoid overriding status code if event is already handled (3f6d99e)
  • router: Use default behavior for no-content handling (e3c9f96)

💅 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)
  • 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)
  • app: Use sendNoContent for null handling (a72a4b8)
  • event: Rename event.body to event.rawBody (563313d)
  • Cleanup event interface (#506)

📖 Documentation

  • Update link to how it works (3dd2376)
  • Split readme into subsection and document missing helpers (#428)
  • Improve nightly release usage section (#468)
  • Fix deleteCookie description (#487)
  • Add link to example for nested routers (0968902)
  • Add valibot to community packages (#491)

🏡 Chore

  • Add autofix ci (e359f5f)
  • Online stackblitz playground (#451)
  • Setup nightly releases (#467)
  • Add release-rc script (98d2fa5)

✅ 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)
  • proxy: Remove external request to speedup (d4f5440)
  • Add EvetHandler wrapper (d351ba9)

❤️ Contributors

v1.8.0-rc.3

07 Aug 23:54
@pi0 pi0
Compare
Choose a tag to compare
v1.8.0-rc.3 Pre-release
Pre-release

compare changes

🚀 Enhancements

  • Object-syntax event handlers (#485)
  • event: Add default stringify with method and url for better dx (#493)
  • Support react pipeable streams (#494)

🩹 Fixes

  • app: Use response.body instead of initial returned val (0434358)
  • Make request and response types explicit (#489)
  • web: Use null for null body responses (#495)

📖 Documentation

  • Fix deleteCookie description (#487)

🏡 Chore

  • Update dependencies (21a2c6c)
  • Update playground (7cb2de6)
  • Update listhen (7fc1d8b)
  • Add valibot to community packages (#491)

🎨 Styles

  • Format with prettier v3 (da225b9)

❤️ Contributors