Skip to content

v0.8.0

Compare
Choose a tag to compare
@pi0 pi0 released this 15 Oct 12:42
· 452 commits to main since this release

compare changes

⚠️ 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 app instance created by createApp is not a Node.js listener with (req, res) => {} signuture anymore. You can convert h3 app into a Node.js listener using toNodeListener(app).
  • Compatibility api to support mixed req.event and res.event is 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 new fromNodeMiddleware((req, res) => {}) utility.
  • Some exported TypeScript interfaces and types are renamed or removed reflecting this change.

🚀 Enhancements

  • Add writeEarlyHints utility (#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 statusMessage from errors (#195)
  • router: Parse url using URL for pathname (#196)

💅 Refactors

  • ⚠️ Reduce Node.js dependency (#178)

📖 Documentation

  • Add sendStream to the utils list (d58fad8)

📦 Build

  • Add package.json to subpath exports (#186)

❤️ Contributors

  • Alexander Lichter
  • Christopher King
  • Daniel Roe
  • Pooya Parsa