All notable changes to this project will be documented in this file. See standard-version for commit guidelines.
- fetchWithEvent: Allow customizing fetch impl type (#414)
- Improve
H3Error
(#415)
- Update link to how it works (3dd2376)
- Pooya Parsa (@pi0)
- Daniel Roe daniel@roe.dev
- Med Talhaouy
- proxy: Support
onResponse
callback (#368) - useSession: Support custom session id generator (#390)
event.handled
flag (#410)
- 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)
- Add event as first arg for proxyRequest (3e5f427)
- Pooya Parsa (@pi0)
- 魔王少年 (@maou-shonen)
- Ígor Jacaúna
- Enkot (@enkot)
- Cerino Ligutom III (@zeferinix)
- Sébastien Chopin seb@nuxtjs.com
- getRequestURL: Normalize double slashes (b5d2972)
- getRequestURL: Make
x-forwarded-host
support opt-in (2fce169) - event: Normalize
event.path
(981c89f)
- Add tests for
getRequestURL
(d510483)
- Pooya Parsa (@pi0)
- readRawBody: Resolve cached promise before normalizing buffer (2e472e8)
- Pooya Parsa (@pi0)
- readRawBody: Always return buffer without encoding (19d133d)
- Pooya Parsa (@pi0)
- readBody, readRawBody: Handle raw body as buffer (#366)
- Missing parentheses (#362)
- Update changelog (e199df3)
- Johann Schopplich (@johannschopplich)
- Roger!
- Pooya Parsa (@pi0)
- setResponseStatus: Mark
code
type as optional (#359) - Sanitize utils and sanitize all response code and messages (#358)
- Pooya Parsa (@pi0)
- Daniel Roe daniel@roe.dev
- Sanitize
statusMessage
of disallowed chars (#357)
- Daniel Roe daniel@roe.dev
- Expose
splitCookiesString
utility (#343) getRequestHost
,getRequestProtocol
andgetRequestURL
utils (#351)
- clearSession: Accept partial session config (#328)
- useSession: Add types for
data
property (#346) - fetchWithEvent: Handle undefined
init
(c84c811)
- Replace deprecated methods in test and jsdocs (#341)
- Fix lint error (#342)
- readme: Update badges (7afa753)
- readme: Use correct link (a5e9fcd)
- Update dev dependencies (f0075c7)
- Pooya Parsa (@pi0)
- Sébastien Chopin seb@nuxtjs.com
- 魔王少年 (@mao-shonen)
- Oleg Khalin
- Yuki Tsujimoto
- Zhiyuanzmj
- proxy: Separate multiple cookie headers (#319)
- Update build status badge url (#331)
- Export
MultiPartData
(#332)
- Pooya Parsa pooya@pi0.io
- Enkot taras.batenkov@gmail.com
- Nozomu Ikuta
- Martin Meixger martin@meixger.com
- Divyansh Singh
- Session support improvements (#325)
- Pooya Parsa pyapar@gmail.com
fetchWithEvent
andgetProxyRequestHeaders
utils (#323)
- session: Use upstream
iron-webcrypto
(a4b6f0d)
- proxy: Req can be url too (e13663b)
- session: Session data values can be any pojo passing to
JSON.stringify
(22d116c)
- Pooya Parsa pooya@pi0.io
- Inline
iron-webcrypto
to remove buffer polyfill (c50505b)
- Ignore lib from eslint (ac28a37)
- Pooya Parsa pooya@pi0.io
- Session support (#315)
- setCookie: Override existing
set-cookie
header with same name (#316) - proxy: Add
host
to ignored headers (d4f863f)
- Improvements (#297)
- Replace useCookies with parseCookies in test (#314)
- Pooya Parsa pooya@pi0.io
- Yuki Tsujimoto
- Ryan Frantz ryanleefrantz@gmail.com
- Utils to get and set response status (c8b4d85)
- Add
readMultipartFormData
to parsemultipart/form-data
(#280) - Add
sendNoContent
utility to create a 204 response (#250)
- Add full mit text for multipart util (42cfb99)
- Pooya Parsa pooya@pi0.io
- Tobias Diez code@tobiasdiez.com
- Daniel Roe daniel@roe.dev
- Fix deprecated methods (#238)
- Add section to readme for community packages (#262)
- Update eslint config (0812e81)
- Format with prettier (a0e21c1)
- Fix type issue (a9b3187)
- Fix legacy middleware test (408f3f2)
- Pooya Parsa pooya@pi0.io
- Daniel Roe daniel@roe.dev
- Nozomu Ikuta nick.0508.nick@gmail.com
- Larry Williamson l422y@l422y.com
1.0.1 (2022-11-15)
1.0.0 (2022-11-15)
- drop deprecated util aliases
0.7.17 (2022-08-30)
- sendRedirect: always encode location uri (01476ac)
0.7.16 (2022-08-23)
context
type forCompatibilityRequestProps
(#164) (984a42b)- added missing patch router method (#166) (dff2211)
0.7.15 (2022-08-10)
- createError: preserve original error stack (#161) (8213421)
- don not log errors when
onError
is provided (#162) (ccc9c7e)
0.7.14 (2022-08-08)
- add utilities for http headers (#157) (272f883)
- add utility for router params (#120) (#158) (4b83bdf)
0.7.13 (2022-08-01)
- send 204 response if null is returned from handler (#154) (dbd465f)
- sendRedirect: add refresh meta fallback for static generated responses (#153) (606de3b)
0.7.12 (2022-07-21)
- isError: use
__h3_error__
class property to detect error (968bfee)
0.7.11 (2022-07-21)
0.7.10 (2022-06-17)
0.7.9 (2022-06-10)
- add
H3EventContext
for type augmentation (#124) (5042e92) - createError: support string as error source (#132) (8eb9969)
- handle error cause (#131) (3c3b6bd)
0.7.8 (2022-05-04)
- handle typed
H3Response
(62aebf8)
0.7.7 (2022-05-04)
0.7.6 (2022-04-29)
0.7.5 (2022-04-27)
0.7.4 (2022-04-14)
- handleCacheHeaders: small improvements (4fb9745)
0.7.3 (2022-04-12)
0.7.2 (2022-04-08)
- add generic response type support for eventHandler (6fcdc22)
0.7.1 (2022-04-07)
- router: compatibility matched params (07930bc)
0.7.0 (2022-04-07)
-
move router params to
event.context.params
-
move router params to
event.context.params
(6fe32e2)
0.6.0 (2022-04-06)
- set default path for
setCookie
to/
- set default path for
setCookie
to/
(1bd6a45)
0.5.7 (2022-04-06)
- remove
ServerResponse
fromCompatibilityEvent
possibilities (b285659)
0.5.6 (2022-04-06)
handleCacheHeaders
utility (4a71a3f)
- add
params
to compatiblity layer forreq
(63dd55c)
0.5.5 (2022-04-04)
dynamicEventHandler
(ce98257)
0.5.4 (2022-04-01)
- throw wrapped error with legacy middleware (27e9477)
0.5.3 (2022-03-31)
0.5.2 (2022-03-31)
- add
[h3]
prefix to console error (2f4859c) - improve
writableEnded
guard (ba5084c) - make console error for thrown unkown errors (1552219)
- skip built-in error handler if
onError
provided (2c25aa1)
0.5.1 (2022-03-29)
- expose toNodeHandle and add backward compat with layer as
handle
(54a944c) - support lazy event handlers (333a4ca)
- typecheck handler to be a function (38493eb)
0.5.0 (2022-03-29)
- All
handle
exports and properties are renamed tohandler
with some backward compatibilities. - Legacy handlers are promisified by default
- opt-in using event format using
defineEventHandler
(#74)
- app: use node handler signature (c722091)
- opt-in using event format using
defineEventHandler
(#74) (cdf9b7c)
-
router: req.params compatibility (1d9fca0)
-
use events api for utils with compatibility layer (#75) (2cf0f4b)
0.4.2 (2022-03-16)
- send: add explicit return type (2736b3a)
0.4.1 (2022-03-11)
- allow returning, number and boolean as well (#65) (9a01465)
- use
cookie-es
to avoid esm bundling issues (ceedbbc)
0.4.0 (2022-03-09)
- update repo
0.3.9 (2022-01-18)
0.3.8 (2021-12-04)
0.3.7 (2021-12-01)
- unenv uses
req.body
prop (a31d12f)
0.3.6 (2021-12-01)
- assert method is valid before attempting to read body (92f67f0)
- avoid race-condition for calling useBody on same rew (0633804)
- handle body with falsy values (6236fc2)
0.3.5 (2021-11-24)
- useBody: support
req._body
(0d0cd61)
0.3.4 (2021-11-24)
useMethod
/isMethod
/assertMethod
(c45278d)- add
defineHandle
anddefineMiddleware
type helpers (#47) (8260887)
0.3.3 (2021-10-14)
0.3.2 (2021-10-14)
0.3.1 (2021-09-09)
0.3.0 (2021-07-27)
useAsync
is removed. useuse
instead
- automatically promisify legacyMiddlware with
use
(2805d4c), closes #27 - handle returned errors (closes #28) (991fcff)
0.2.12 (2021-07-02)
- pkg: add exports field (998d872)
0.2.11 (2021-06-23)
0.2.10 (2021-04-21)
- fallback for setImmediate (6cf61f6)
0.2.9 (2021-04-06)
- resolve handle when send was called (fb58e5b)
0.2.8 (2021-03-27)
- app: custom options passed to useAsync (3c328a4)
0.2.7 (2021-03-27)
0.2.6 (2021-03-27)
0.2.5 (2021-02-19)
0.2.4 (2021-01-22)
- always restore req.url for each layer to avoid mutation (aae5787)
0.2.3 (2021-01-20)
- improve internal error handling (b38d450)
0.2.2 (2021-01-20)
0.2.1 (2021-01-12)
0.2.0 (2020-12-15)
- rename useBodyJSON to useBody and unexposed cached value
useCookie
,useCookies
andsetCookie
utilities (088f413), closes #17- appendHeader utility (84be904)
- rename useBodyJSON to useBody and unexposed cached value (d8d39a0)
0.0.15 (2020-12-12)
- don't override internal flag (a5ee318)
- hide 404 error (38fb027)
- preserve error message in console (3002b27)
0.0.14 (2020-12-05)
0.0.13 (2020-12-05)
- enable debug by default (010cdfe)
0.0.12 (2020-11-23)
- correctly expose route and middleware types (#10) (bb6cd4c), closes #11 #11
- ensure correct url is used when used as a sub-app (0e4770a)
- mark app._handle as private to avoid sub-app detection (1439f35)
0.0.11 (2020-11-21)
0.0.10 (2020-11-20)
- rewrite with much sexier API (0d3680e)
0.0.9 (2020-11-20)
- createError (1a80bd9)
- throw 404 only when writableEnded is not set (1c42a07)
0.0.8 (2020-11-19)
- don't log 404 (541ede0)
0.0.7 (2020-11-19)
0.0.6 (2020-11-19)
- add debug option to app (b0891cd)
0.0.5 (2020-11-19)
- expose unsafeHandle (f1245f1)
0.0.4 (2020-11-19)
- rewrite promisify logic (a40aa81)
0.0.3 (2020-11-19)
- improve error util (5504f4e)
0.0.2 (2020-11-19)
- remove dependency on process.env (eb018f5)