Socket
Socket
Sign inDemoInstall

h3

Package Overview
Dependencies
14
Maintainers
1
Versions
96
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install
Previous1345
10Next

1.8.0-rc.2

Diff

Changelog

Source

v1.8.0-rc.2

compare changes

🚀 Enhancements

  • app: Handle bigint return types (#474)
  • Preserve and make error cause accessible (#479)
  • Platform agnostic serveStatic utility (#480)
  • app: onRequest, onBeforeResponse and onAfterResponse global hooks (#482)
  • plain and web adapters (#483)

🩹 Fixes

  • app: Handle directly node.res.end() returned value (7b18fa0)
  • stream: Improve node.js readable stream check (cdd2680)
  • proxy: Merge overridden 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 response (#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)

💅 Refactors

  • app: Extract handler returned response handling (#473)
  • event: Always normalize event.method (7585861)
  • Deprecate getMethod to prefer event.method (bc202c0)
  • event: Use sendWebResponse for event.respondWith (#481)

🏡 Chore

  • Remove extra log in tests (06d1bc1)

✅ Tests

  • proxy: Remove external request to speedup (d4f5440)
  • Add evetHandler wrapper (d351ba9)

❤️ Contributors

pi0
published 1.8.0-rc.1 •

Changelog

Source

v1.8.0-rc.1

compare changes

🩹 Fixes

🏡 Chore

❤️ Contributors

pi0
published 1.8.0-rc.0 •

Changelog

Source

v1.8.0-rc.0

compare changes

🚀 Enhancements

  • Support web streams (#432)
  • Add event.method and event.headers (#429)
  • Support blob responses (#422)
  • Web responses with streaming support (#436)
  • readBody: Validate requests with application/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 and getValidatedQuery utils (#459)
  • Add removeResponseHeader and clearResponseHeaders utils (#427)
  • Add event handler generics for typed request body and query (#417)

🩹 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 response (#453)
  • proxy: Avoid decoding request body as utf8 (#440)
  • readMultipartFormData: Handle utf8 encoding for name and filename (#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)

💅 Refactors

  • app:: Split return type conditions (#434)
  • Use event.path instead of event.node.req.url for internal utils (#438)
  • Type event.node.req.originalUrl (6c87d87)
  • Alias isEventHandler to isEvent (#452)

📖 Documentation

  • Update link to how it works (3dd2376)
  • Split readme into subsection and document missing helpers (#428)
  • Improve nightly release usage section (#468)

🏡 Chore

  • Ignore eslint warning (4c609b2)
  • release: V1.7.1 (7273ab4)
  • Add autofix ci (e359f5f)
  • Online stackblitz playground (#451)
  • Add link to example for nested routers (0968902)
  • Setup nightly releases (#467)

✅ 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)

🤖 CI

  • Use conventional commits for autofix (#470)

❤️ Contributors

pi0
published 1.7.1 •

Changelog

Source

v1.7.1

compare changes

🩹 Fixes

  • fetchWithEvent: Allow customizing fetch impl type (#414)

💅 Refactors

  • Improve H3Error (#415)

📖 Documentation

  • Update link to how it works (3dd2376)

🏡 Chore

❤️ Contributors

pi0
published 1.7.0 •

Changelog

Source

v1.7.0

compare changes

🚀 Enhancements

  • proxy: Support onResponse callback (#368)
  • useSession: Support custom session id generator (#390)
  • event.handled flag (#410)

🩹 Fixes

  • 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)

📖 Documentation

  • Add event as first arg for proxyRequest (3e5f427)

🏡 Chore

❤️ Contributors

pi0
published 1.6.6 •

Changelog

Source

v1.6.6

compare changes

🩹 Fixes

  • getRequestURL: Normalize double slashes (b5d2972)
  • getRequestURL: Make x-forwarded-host support opt-in (2fce169)
  • event: Normalize event.path (981c89f)

🏡 Chore

✅ Tests

  • Add tests for getRequestURL (d510483)

❤️ Contributors

pi0
published 1.6.5 •

Changelog

Source

v1.6.5

compare changes

🩹 Fixes

  • readRawBody: Resolve cached promise before normalizing buffer (2e472e8)

🏡 Chore

❤️ Contributors

pi0
published 1.6.4 •

Changelog

Source

v1.6.4

compare changes

🩹 Fixes

  • readRawBody: Always return buffer without encoding (19d133d)

❤️ Contributors

pi0
published 1.6.3 •

Changelog

Source

v1.6.3

compare changes

🩹 Fixes

  • readBody, readRawBody: Handle raw body as buffer (#366)

📖 Documentation

  • Missing parentheses (#362)

🏡 Chore

❤️ Contributors

pi0
published 1.6.2 •

Changelog

Source

v1.6.2

compare changes

🩹 Fixes

  • setResponseStatus: Mark code type as optional (#359)
  • Sanitize utils and sanitize all response code and messages (#358)

❤️ Contributors

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc