Skip to content

Releases: kartikk221/hyper-express

6.2.1

28 May 20:33
Compare
Choose a tag to compare

General Changes

  • Implemented usage of the undocumented uWS.HttpResponse.endWithoutBody() into the Response.send() method to facilitate special request scenarios where users may need to send a custom valued content-length header without any body content thus conflicting with the original end() method's behavior.
  • Fixed bug with discarded Response access under specific streaming methods.
  • Improved internal backpressure handling accuracy by reducing number of chunk modifications upon drainage.

Full Changelog: 6.2.0...6.2.1

6.2.0

25 May 19:32
Compare
Choose a tag to compare

General Changes

  • Implemented Router.all() & Server.all() method which is an alias of the any() route method for improved ExpressJS compatibility.
  • Added various optimizations the request lifecycle for improved local benchmarking performance.
  • Improved JSDoc types.

Full Changelog: 6.1.3...6.2.0

6.1.3

07 May 20:10
Compare
Choose a tag to compare

General Changes

  • Updated uWebsockets.js to version 20.10.0 for internal improvements.
  • Removed the uid-safe and eventsource dependencies with internal refactoring.

Full Changelog: 6.1.2...6.1.3

6.1.2

05 May 15:25
Compare
Choose a tag to compare

General Changes

  • Changed the internally used query-string package to qs package to match ExpressJS internal usage in order to improve backwards compatibility.

New Contributors

Full Changelog: 6.1.1...6.1.2

6.1.1

30 Apr 16:36
Compare
Choose a tag to compare

General Changes

  • Updated the Response.send(body, close_connection) method to now have the close_connection parameter be undefined by default to allow for persisten connections to occur.
  • Improved comments and JSDoc types for various methods and components.

Full Changelog: 6.1.0...6.1.1

6.1.0

29 Apr 15:28
Compare
Choose a tag to compare

General Changes

  • Implemented Response.write_offset property which now returns the current response body content write offset in bytes.
  • Fixed types of Response.drain(handler) to now properly expects a boolean output from the handler callback signifying whether the retry write attempt was successful for not as required per uWS specification.
  • Updated the Response.send(body, close_connection) method to now have the close_connection parameter be true by default for compatible behavior to Express.js and the Node.js network modules.

Full Changelog: 6.0.4...6.1.0

6.0.4

28 Apr 19:12
Compare
Choose a tag to compare

Bug Fixes

  • Important: Patched a vulnerability which allowed for a Denial of Service by sending body data along with a non-spec compliant HTTP method such as a GET request.

Full Changelog: 6.0.3...6.0.4

6.0.3

28 Apr 15:48
Compare
Choose a tag to compare

General Changes

  • Fixed request body streaming flow where some requests would randomly hang due to the readable stream being in a paused state by default.

Full Changelog: 6.0.0...6.0.3

6.0.0

25 Apr 22:11
Compare
Choose a tag to compare

General Changes

  • Updated uWebsockets.js to v20.8.0 for internal improvements and improved compatibility.
  • Added support for up to Node.js to v18 in order to match compatibility for the latest version.
  • Router.use(...2 Overloads) has now been improved as an open-ended function for improved Express.js syntax compatibility.
    • You may now provide an arbitary amount of middlewares or routers over the span of multiple parameters.
    • Example: router.use('/api', auth_middleware, rate_limit_middleware, some_router)
  • Router.any(...4 Overloads) has now been improved as an open-ended function for improved Express.js syntax compatibility.
    • You may now provide an arbitary amount of middlewares and a route handler over the span of multiple parameters.
    • Example: server.get('/api', { max_body_length: 1024 * 1024 * 10 }, some_middleware_1, some_middleware_2, api_route_handler)

Breaking Changes

  • Request.stream property has been removed from the Request component.
    • The Request component is now an extended Readable stream.
    • See > [Stream.Readable] for more information on additional native methods and properties.
  • Response.writable property has been removed from the Response component.
    • The Response component is now an extended Writable stream.
    • See > [Stream.Writable] for more information on additional native methods and properties.
  • Response.hook(type, handler) method has been removed from the Response component.
    • The Response component is now an extended Writable stream which matches the Node.js specification.
    • There are 4 official new events emitted by the Response component.
      • [abort]: This event will get emitted when the request was aborted unexpectedly by the client or the underlying connection was closed.
      • [prepare]: This event will get emitted when the response is internally ready to be sent. Use this to perform any last minute modifications to the response.
      • [finish]: This event will get emitted when the response has been sent by HyperExpress. This does not mean the client has received anything yet.
      • [close]: This event will get emitted when the underlying connection has closed.
  • Response.delete_cookie(...) has been removed from the Response component.
    • You may now call Response.cookie(name, null) with a null value to delete the cookie.
  • Response.throw_error(error) has been renamed to the Response.throw(error) method.
  • RouteOptions.expect_body has been removed from the Router component.
    • HyperExpress no longer contains a built-in body parser as all parsing methods are provided on the Request component.
    • You may achieve desired Request.body property behavior through middlewares.
  • RouteOptions.stream_options has been removed from the Router component.
    • You may now specify custom constructor options for both Readable and Writable streams through Server and Router options.
    • You may specify *.streaming.readable with > [ReadableOptions] from the Node.js documentation.
    • You may specify *.streaming.writable with > [WritableOptions] from the Node.js documentation.
    • See the documentation for Server and Router components for detailed documentation on these specifications.

New Contributors

Full Changelog: 5.9.2...6.0.0

5.9.2

06 Apr 18:44
Compare
Choose a tag to compare
  • Implemented Response.statusCode setter for ExpressJS compatibility