Releases: kartikk221/hyper-express
Releases · kartikk221/hyper-express
6.2.1
General Changes
- Implemented usage of the undocumented
uWS.HttpResponse.endWithoutBody()
into theResponse.send()
method to facilitate special request scenarios where users may need to send a custom valuedcontent-length
header without any body content thus conflicting with the originalend()
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
General Changes
- Implemented
Router.all()
&Server.all()
method which is an alias of theany()
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
General Changes
- Updated
uWebsockets.js
to version20.10.0
for internal improvements. - Removed the
uid-safe
andeventsource
dependencies with internal refactoring.
Full Changelog: 6.1.2...6.1.3
6.1.2
General Changes
- Changed the internally used
query-string
package toqs
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
General Changes
- Updated the
Response.send(body, close_connection)
method to now have the close_connection parameter beundefined
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
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 thehandler
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 theclose_connection
parameter betrue
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
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
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
General Changes
- Updated
uWebsockets.js
to v20.8.0 for internal improvements and improved compatibility. - Added support for up to
Node.js
tov18
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 theRequest
component.- The
Request
component is now an extendedReadable
stream. - See
> [Stream.Readable]
for more information on additional native methods and properties.
- The
Response.writable
property has been removed from theResponse
component.- The
Response
component is now an extendedWritable
stream. - See
> [Stream.Writable]
for more information on additional native methods and properties.
- The
Response.hook(type, handler)
method has been removed from theResponse
component.- The
Response
component is now an extendedWritable
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.
- [
- The
Response.delete_cookie(...)
has been removed from theResponse
component.- You may now call
Response.cookie(name, null)
with anull
value to delete the cookie.
- You may now call
Response.throw_error(error)
has been renamed to theResponse.throw(error)
method.RouteOptions.expect_body
has been removed from theRouter
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.
- HyperExpress no longer contains a built-in body parser as all parsing methods are provided on the
RouteOptions.stream_options
has been removed from theRouter
component.- You may now specify custom constructor options for both
Readable
andWritable
streams throughServer
andRouter
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
andRouter
components for detailed documentation on these specifications.
- You may now specify custom constructor options for both
New Contributors
- @SupremeTechnopriest made their first contribution in #65
Full Changelog: 5.9.2...6.0.0
5.9.2
- Implemented Response.statusCode setter for ExpressJS compatibility