Releases: h3js/h3
Releases · h3js/h3
Release list
v2.0.1-rc.26
🚀 Enhancements
- resolveDotSegments: Add
mergeSlashesoption (9581407) - session: Default session cookie to
SameSite=Lax(acf8d77) ⚠️ Escape interpolated values in html tagged template (#1459)- readValidatedBody: Support readBody options (#1476)
- Add
onDisposehook (#1488) - defineValidatedHandler: Support async validation (#1491)
- sse: Allow returning EventStream directly from handlers (#1508)
🔥 Performance
- Single-scan fast-path guard for
resolveDotSegments(#1458) - cookie: Avoid quadratic chunked cookie parsing and header rebuilds (#1472)
- middleware: Precompose middleware chains (#1475)
- body-limit: Stream enforcement instead of pre-buffering (#1500)
🩹 Fixes
- resolveDotSegments: Preserve trailing slash on trailing dot segments (ca7de07)
- cookie: Dedup cookies with leading-dot / mixed-case domains (#1462)
- cors: Warn on credentials with null origin (#1464)
- Decode Basic-auth credentials as UTF-8 (#1463)
- proxy: forwardHeaders must not override framing headers (#1467)
- cookie: Cap chunk count in
setChunkedCookie(#1469) - cors: Set single-valued CORS headers instead of appending (#1466)
- auth: Harden basic-auth realm handling and credential timing (#1468)
- validate: Convert malformed JSON to 400 in validated-handler path (#1465)
- base: Collapse leading-slash run in all base-stripping sites (#1471)
- html: Make
raw()trust marker unforgeable and hoist escape map (#1473) - json-rpc: Use
-32600for valid-JSON non-object bodies (#1483) - Only discard prepared headers for error responses (#1486)
- event-stream: Correct stream teardown on close and client disconnect (#1484)
- deprecated: Correct v1 signatures in the compat shim (#1492)
- response: Do not render non-Error throws as successful responses (#1485)
- event: Keep
event.contextandreq.contextas one reference (#1499) - response: Absorb errors thrown in
onResponsehook (4a32c1b) - response: Route synchronous
prepareResponsethrows through the error pipeline (#1503) - response: Keep
content-lengthheader forUint8Arrayresponses (#1504) - response: Strip
HEADbody when merging prepared headers into a mutable Response (#1490) - response: Allow status and headers staged during the first stream chunk (#1512)
💅 Refactors
- request:
⚠️ Makex-forwarded-prototrust opt-in (#1461) - event-stream:
⚠️ Drop autoclose option (#1495) - sse: Promote EventStream to public API, deprecate
createEventStream(#1509)
📖 Documentation
- Security caveats for cors, proxy, redirect, host and static utils (#1470)
- Explain
event.url.pathnamedecoding (3f8b5bc)
🌊 Types
🏡 Chore
- Update srvx to 0.12 (5eb0a01) (release notes)
- Update undocs (ba42947)
❤️ Contributors
- Pooya Parsa (@pi0)
- N0liu (@n0liu)
- G1mn
- Sandro Circi (@sandros94)
- Max (@onmax)
v2.0.1-rc.25
v2.0.1-rc.24
🚀 Enhancements
- Add QUERY method support (#1445)
- Add
requireContentTypeandappendAcceptQueryutils (#1446) - Automatically match GET routes for HEAD requests (#1452)
🩹 Fixes
- json-rpc: Do not leak internal exception messages to clients (ea2f2a3)
- request: Prevent
decode:truefrom reintroducing path separators (cd03d41) - handleCacheHeaders: Correct conditional-request precedence and Cache-Control default (#1454)
📖 Documentation
- Fix typos in response and handler guides (#1444)
- Add QUERY method docs (#1447)
- Remove non-existent sendEventStream from createEventStream example (#1450)
❤️ Contributors
- Pooya Parsa (@pi0)
- Sueun Cho (@sueun-dev)
- Prateek Anand (@bizprat)
- Max (@maxtaran2010)
v2.0.1-rc.23
🚀 Enhancements
- proxy: Support client aborts (#1417)
- ws: Allow optional HTTP handling in
defineWebSocketHandler(#1425) - Export
resolveDotSegmentsas a public path utility (#1428, #1430) - readBody: Support
formdatatype (#1164)
🩹 Fixes
- sanitizeStatusCode: Return default for non-numeric input instead of
NaN(#1420) - auth: Reject Basic credentials with no colon separator (#1393)
- sse: Ignore pushes after stream close (#1411)
- proxy: Ignore incoming accept-encoding header (#1423)
- cache:
handleCacheHeadersignores multi-valueIf-None-Matchheader (#1395) - serve-static: Compare if-modified-since at whole-second precision (#1394)
- request: Parse first entry of comma-list
x-forwarded-protoheader (#1413) - serve-static: Check the response (not request) for an existing content-length (#1391)
- cors: Merge Vary headers when both origin and allow-headers emit vary (#1396)
- writeEarlyHints: Normalize Link key to prevent hanging with Node.js (#1385)
- event: Return 400 for malformed percent-encoded request URLs (#1424)
- mount: Restore pathname on error with try/finally (#1319)
- serve-static: Decode the resolved id before lookup (#1431)
- request: Shadow parsed
_urlinrequestWithURLproxy (d21d93c) - event: Clone URL for pathname normalization instead of mutating shared
_url(a1cf066) - adapters: Sync raw node
req.urlwithevent.urlinfromNodeHandler(#1433)
💅 Refactors
- validate: Drop always-true
if (validate.body)guard in body proxy (#1392)
📖 Documentation
- proxy: Add note about reading body (7eb018e)
- Fix decode function name in router param helpers (#1419)
- session: Note secure cookie limitation over local HTTP (#1409)
- Document the session name option for multiple sessions (#1405)
- Add arkstack framework to community section (#1382)
- ws: Use zero-config crossws server plugin (#1427)
🌊 Types
- Expose
.crosswsondefineWebSocketHandlerreturn type (#1435)
✅ Tests
- Cover zod schema query validation types (#1404)
- Cover cloned pipeable node responses (#1414)
- iron-crypto: Accept getRandomValues length error for invalid salt bits (dae12fe)
- event: Cover shared
\_urlnormalization semantics (4a218a8) - event: Assert
req.urlreflects normalization per runtime (8410ec9)
❤️ Contributors
- Pooya Parsa (@pi0)
- Huseeiin (@huseeiin)
- M.M (@momomuchu)
- Wind (@productdevbook)
- Iain Sproat (@iainsproat)
- Frank Johnston
- Mixelburg (@mixelburg)
- Legacy (@3m1n3nc3)
- Shaurya Singh (@LeSingh1)
- Pupuking723
- Harsh Agarwal
- Aimee (@Aimee1608)
- Alan747271363-art
- Greymoth
- Patrick Wehbe (@patrickwehbe)
- Shawn
- Alexander Kireyev (@chatman-media)
v2.0.1-rc.22
v2.0.1-rc.21
🚀 Enhancements
- Coerce thrown number/string to HTTPError (#1372)
🩹 Fixes
- setCookie: Handle
encodeandstringifyserialize options (#1377) - event-stream: Do not emit unhandled rejection when readable side is canceled (#1376)
- withoutBase: Collapse leading slashes (64acfe6)
📖 Documentation
- Fix typo in error handling (#1364)
❤️ Contributors
- Pooya Parsa (@pi0)
- Max (@onmax)
- Drackin Best (@Drackin)
- Kevin Dyes (@dyeske61283)
- Daniel Roe (@danielroe)
v1.15.11
v2.0.1-rc.20
💅 Refactors
📦 Build
v2.0.1-rc.19
🩹 Fixes
- body: Enforce stream-based body size check regardless of content-length header (708a3aa)
💅 Refactors
- Upgrade cookie-es to v3 (9d244a7)
📖 Documentation
- Remove
await-thenablelint rule and fix invalidawaitusage (#1353)
📦 Build
- Move docs to dist (e87ceca)
❤️ Contributors
- Pooya Parsa (@pi0)
- Nick Spaargaren (@nickspaargaren)
v1.15.10
🩹 Fixes
- Preserve percent-encoded req.url in app event handler (#1355)
❤️ Contributors
- Sergio Azócar (@sergioazoc)