Releases: unjs/h3
Releases · unjs/h3
v1.11.1
v1.11.0
⭐ Highlights
- H3 now has a new documentation website (https://h3.unjs.io)
- WebSocket and SSE support added (read more)
🚀 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
- Add basic jsdocs for utils (c8aa150)
- Fix typos (#668, #665, #662, #661, #658)
- examples Add node middleware usage (#663)
- Refine function usages (#667)
- Add jsdoc examples (#672, #673)
🏡 Chore
- Integrate automd (5212f01)
❤️ Contributors
- Pooya Parsa (@pi0)
- Estéban (@Barbapapazes)
- Bram Kamies
- Joshua Sosso (@joshmossas)
- Nozomu Ikuta
- Markthree (@markthree)
- Sacha Stafyniak (@stafyniaksacha)
- Meir Lamdan
- Joshua
- Matej Černý
- Amit Gurbani (@AmitGurbani)
- Neil Richter (@noook)
v1.10.2
v1.10.1
🩹 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
✅ Tests
❤️ Contributors
- Pooya Parsa (@pi0)
- Estéban (@Barbapapazes)
- Michael Brevard yonshi29@gmail.com
- Jaden me@jaden.bio
- Oscar Beaumont (@oscartbeaumont)
- Kamil Kuczmera
- Jonas Thelemann e-mail@jonas-thelemann.de
v1.10.0
🚀 Enhancements
- validate: Provide validate error in
data
(#594)
🩹 Fixes
- readRawBody: Check
req.rawBody
beforereq.body
(#604)
📖 Documentation
🌊 Types
- Add generics to
isError
and updateDataT
default generic param (#582) - setResponseHeaders: Add autocompletion for header names (#601)
❤️ Contributors
- Michael Brevard yonshi29@gmail.com
- Pooya Parsa (@pi0)
- Estéban (@Barbapapazes)
- Gregor Becker (@CodeDredd)
- Bobbie Goede bobbiegoede@gmail.com
- Sébastien Chopin seb@nuxtjs.com
- Damian Głowala (@DamianGlowala)
v1.9.0
🚀 Enhancements
getValidatedRouterParams
util (#573)decode
option forgetRouterParam
(#556)getRequestFingerprint
util (#564)
🩹 Fixes
- sendNoContent: Preserve custom status code if already set (#577)
📖 Documentation
🌊 Types
- Add generics to
H3Error
data andcreateError
(#566) - Support auto complete for HTTP header names in utils (#542)
❤️ Contributors
- Pooya Parsa (@pi0)
- Nandi95
- Horu
- Damian Głowala (@DamianGlowala)
- Nozomu Ikuta
- Alexander Lichter (@manniL)
- Łukasz Wołodkiewicz
- Kazuya Kawaguchi kawakazu80@gmail.com
- Michael Brevard yonshi29@gmail.com
v1.8.2
v1.8.1
🩹 Fixes
- Use safe property checks (#521)
💅 Refactors
- Use native
Headers
andResponse
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
- Pooya Parsa (@pi0)
- Sébastien Chopin (@Atinux)
- Arkadiusz Sygulski arkadiusz@sygulski.pl
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.method
andevent.headers
(#429) - Support blob responses (#422)
- Web responses with streaming support (#436)
readBody
: Validate requests withapplication/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
andgetValidatedQuery
utils (#459)- Add
removeResponseHeader
andclearResponseHeaders
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
andonAfterResponse
global hooks (#482) plain
andweb
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
andfilename
(#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 ofevent.node.req.url
for internal utils (#438) - Type
event.node.req.originalUrl
(6c87d87) - Alias
isEventHandler
toisEvent
(#452) - app: Extract handler returned response handling (#473)
- event: Always normalize
event.method
(7585861) - Deprecate
getMethod
to preferevent.method
(bc202c0) - event: Use
sendWebResponse
forevent.respondWith
(#481) - app: Use
sendNoContent
for null handling (a72a4b8) event: Renameevent.body
toevent.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
- 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
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
- Pooya Parsa (@pi0)
- Daniel Roe daniel@roe.dev
- Michel EDIGHOFFER edimitchel@gmail.com
- Conner (@Intevel)