Releases: h3js/h3
Releases · h3js/h3
v1.8.0 - Towards the Edge of the Web!
note
Checkout the blog article for release notes and more information.
🚀 Enhancements
- Support Web Streams (#432)
- Add
event.methodandevent.headers(#429) - Support blob responses (#422)
- Web responses with streaming support (#436)
readBody: Validate requests withapplication/jsoncontent type (#207)- event: Support
event.url(#455) event:event.bodywith readable stream (#457)event:event.requestgetter to access web request (#454)- Add
readFormDatautil (#421) - proxy: Stream request body with
streamRequestoption (#374) readValidatedBodyandgetValidatedQueryutils (#459)- Add
removeResponseHeaderandclearResponseHeadersutils (#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
serveStaticutility (#480) - app:
onRequest,onBeforeResponseandonAfterResponseglobal hooks (#482) plainandwebadapters (#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
getRequestIPutil (#503) defineRequestMidleware,defineResponseMiddlewareand rename object synctax hooks (#507)
🩹 Fixes
- proxy: Handle responses with no content (#433)
- Split
set-cookievalue when handling web responses (#445) - defineLazyEventHandler: Infer return type (#442)
- proxy: Respect
fetchOptions.methodover incoming request method (#441) - Append
set-cookieheaders in web reponse (#453) - proxy: Avoid decoding request body as utf8 (#440)
- readMultipartFormData: Handle utf8 encoding for
nameandfilename(#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
onErrordoes 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.bodyinstead of initial returned val (0434358) - Make request and response types explicit (#489)
- web: Use
nullfor 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.pathinstead ofevent.node.req.urlfor internal utils (#438) - Type
event.node.req.originalUrl(6c87d87) - Alias
isEventHandlertoisEvent(#452) - app: Extract handler returned response handling (#473)
- event: Always normalize
event.method(7585861) - Deprecate
getMethodto preferevent.method(bc202c0) - event: Use
sendWebResponseforevent.respondWith(#481) - app: Use
sendNoContentfor null handling (a72a4b8) event: Renameevent.bodytoevent.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
deleteCookiedescription (#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-rcscript (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
- Pooya Parsa (@pi0)
- Harlan Wilton (@harlan-zw)
- Iain Sproat
- Daniel Roe daniel@roe.dev
- Michel EDIGHOFFER edimitchel@gmail.com
- Conner (@Intevel)
- Heb (@Hebilicious)
- Arkadiusz Sygulski arkadiusz@sygulski.pl
- Zhiyuanzmj
- Ngob ngobenoit@gmail.com
- Emīls Gulbis (@emilsgulbis)
- Tobias Diez code@tobiasdiez.com
- Javad Mnjd (@jd1378)
- Hebilicious (@Hebilicious)
- Valentin Dzhankhotov vushe@yandex.ru
v1.8.0-rc.3
🚀 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
nullfor null body responses (#495)
📖 Documentation
- Fix
deleteCookiedescription (#487)
🏡 Chore
- Update dependencies (21a2c6c)
- Update playground (7cb2de6)
- Update listhen (7fc1d8b)
- Add valibot to community packages (#491)
🎨 Styles
- Format with prettier v3 (da225b9)
❤️ Contributors
- Pooya Parsa (@pi0)
- Daniel Roe daniel@roe.dev
- Michel EDIGHOFFER edimitchel@gmail.com
- Conner (@Intevel)
v1.8.0-rc.2
🚀 Enhancements
- app: Handle bigint return types (#474)
- Preserve and make error cause accessable (#479)
- Platform agnostic
serveStaticutility (#480) - app:
onRequest,onBeforeResponseandonAfterResponseglobal hooks (#482) plainandwebadapters (#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
onErrordoes 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
getMethodto preferevent.method(bc202c0) - event: Use
sendWebResponseforevent.respondWith(#481)
🏡 Chore
- Remove extra log in tests (06d1bc1)
✅ Tests
❤️ Contributors
- Pooya Parsa (@pi0)
v1.8.0-rc.1
v1.8.0-rc.0
🚀 Enhancements
- Support web streams (#432)
- Add
event.methodandevent.headers(#429) - Support blob responses (#422)
- Web responses with streaming support (#436)
- readBody: Validate requests with
application/jsoncontent type (#207) - event: Support
event.url(#455) - event:
event.bodywith readable stream (#457) - event:
event.requestgetter to access web request (#454) - Add
readFormDatautil (#421) - proxy: Stream request body with
streamRequestoption (#374) readValidatedBodyandgetValidatedQueryutils (#459)- Add
removeResponseHeaderandclearResponseHeadersutils (#427) - Add event handler generics for typed request body and query (#417)
🩹 Fixes
- proxy: Handle responses with no content (#433)
- Split
set-cookievalue when handling web responses (#445) - defineLazyEventHandler: Infer return type (#442)
- proxy: Respect
fetchOptions.methodover incoming request method (#441) - Append
set-cookieheaders in web response (#453) - proxy: Avoid decoding request body as utf8 (#440)
- readMultipartFormData: Handle utf8 encoding for
nameandfilename(#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.pathinstead ofevent.node.req.urlfor internal utils (#438) - Type
event.node.req.originalUrl(6c87d87) - Alias
isEventHandlertoisEvent(#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
- Pooya Parsa (@pi0)
- Daniel Roe daniel@roe.dev
- Heb (@Hebilicious)
- Arkadiusz Sygulski arkadiusz@sygulski.pl
- Iain Sproat
- Zhiyuanzmj
- Ngob ngobenoit@gmail.com
- Emīls Gulbis (@emilsgulbis)
- Tobias Diez code@tobiasdiez.com
- Javad Mnjd (@jd1378)
- Hebilicious (@Hebilicious)
- Valentin Dzhankhotov vushe@yandex.ru
v1.7.1
🩹 Fixes
- fetchWithEvent: Allow customizing fetch impl type (#414)
💅 Refactors
- Improve
H3Error(#415)
📖 Documentation
- Update link to how it works (3dd2376)
❤️ Contributors
- Daniel Roe daniel@roe.dev
- Med Talhaouy
v1.7.0
🚀 Enhancements
- proxy: Support
onResponsecallback (#368) - useSession: Support custom session id generator (#390)
event.handledflag (#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
- Pooya Parsa (@pi0)
- 魔王少年 (@maou-shonen)
- Ígor Jacaúna
- Enkot (@enkot)
- Cerino Ligutom III (@zeferinix)
- Sébastien Chopin seb@nuxtjs.com