Releases: h3js/h3
Releases · h3js/h3
v1.0.0
v0.8.0
⚠️ Breaking changes
H3 API and exports are updated in order to reduce dependency on Node.js and future possibilities.
- All handlers should be defined with
eventHandler()wrapper otherwise a warning will be shown suggesting this change for you. - h3
appinstance created bycreateAppis not a Node.js listener with(req, res) => {}signuture anymore. You can convert h3 app into a Node.js listener usingtoNodeListener(app). - Compatibility api to support mixed
req.eventandres.eventis dropped. If you had custom utils depending on this, you might need to change them. - Node.js/Express-style middleware with
(req, res, next?) = {}signuture are not longer automatically converted to event handler format. You can convert them using newfromNodeMiddleware((req, res) => {})utility. - Some exported TypeScript interfaces and types are renamed or removed reflecting this change.
🚀 Enhancements
- Add
writeEarlyHintsutility (#184)
🩹 Fixes
- readBody, readRawBody: Use global symbol (#174)
- sendRedirect: Only encode required chars in meta tag (a9b992e)
- writeEarlyHints: Call callback if not supported too (10eab1b)
- router: Make router handler non preemtive by default (#194)
- error: Remove default
statusMessagefrom errors (#195) - router: Parse url using
URLfor pathname (#196)
💅 Refactors
⚠️ Reduce Node.js dependency (#178)
📖 Documentation
- Add
sendStreamto the utils list (d58fad8)
📦 Build
- Add
package.jsonto subpath exports (#186)
❤️ Contributors
- Alexander Lichter
- Christopher King
- Daniel Roe
- Pooya Parsa