uWebSockets.js

μWebSockets for Node.js back-ends

APACHE-2.0 License

Downloads
255.8K
Stars
7.5K
Committers
42

Bot releases are hidden (Show)

uWebSockets.js - v20.43.0 Latest Release

Published by uNetworkingAB 7 months ago

  • Bumps uWS to v20.62.0
  • Windows binaries are not updated this release due to GitHub Actions issues
uWebSockets.js - v20.42.0

Published by uNetworkingAB 8 months ago

Bumps uWS to v20.60.0

uWebSockets.js - v20.41.0

Published by uNetworkingAB 9 months ago

uWebSockets.js - v20.40.0

Published by uNetworkingAB 9 months ago

  • Adds App.filter wrapper
  • Adds App.filter and WebSocketBehavior.dropped to TypeScript definitions
  • Updates the documentation from v20.16.0 to v20.40.0
uWebSockets.js - v20.39.0

Published by uNetworkingAB 9 months ago

Bumps uWS to v20.56.0

uWebSockets.js - v20.38.0

Published by uNetworkingAB 10 months ago

Bumps uWS to v20.53.0

uWebSockets.js - v20.37.0

Published by uNetworkingAB 10 months ago

Bumps uWS to v20.52.0

uWebSockets.js - v20.36.0

Published by uNetworkingAB 10 months ago

  • Fixes broken v20.35.0

image

uWebSockets.js - v20.35.0

Published by uNetworkingAB 10 months ago

  • Bumps uWS to v20.51.0
  • Adds new .dropped event
uWebSockets.js - v20.34.0

Published by uNetworkingAB 11 months ago

Bumps uWS to v20.48.0

uWebSockets.js - v20.33.0

Published by uNetworkingAB 12 months ago

Node.js 21

Apparently the idea of only supporting LTS versions of Node.js went down the shitter. New rule will be:

  • 3 most recent LTS versions (or to be LTS) are supported.
  • Latest non-LTS (never to become) supported until replaced with a new one.

This means Node.js 16, 18, 20 and 21 are supported now.

Then it becomes 18, 20, 21, 22.
Then it becomes 18, 20, 22, 23.
Then it becomes 20, 22, 23, 24.
Then it becomes 20, 22, 24, 25.

Then, you should really just swap to Bun.

uWebSockets.js - v20.32.0

Published by uNetworkingAB about 1 year ago

Fixes

  • Updates uWS to v20.47.0
uWebSockets.js - v20.31.0

Published by uNetworkingAB over 1 year ago

HTTP error pages

This release bumps uWS to v20.45.0 which adds error codes / pages for:

  • 505
  • 431
  • 400
  • 404

This means easier debugging when using proxies, as uWS won't simply respond with a generic RST (which often ends up as a 502 in the proxy), but will instead return proper HTTP error pages / status codes that can be handled & logged properly.

uWebSockets.js - v20.30.0

Published by uNetworkingAB over 1 year ago

More user error message fixes

This release reverts v20.25.0 since it was quickly found to be a heavily misunderstood and misused mode. This change is backwards compatible, as the flag will simply be ignored.

This release also tweaks the onWritable error message into a warning message that better guides the user to a solution:

Warning: uWS.HttpResponse.onWritable callback should return Boolean. See documentation for uWS.HttpResponse.onWritable and consult the user manual.

It also tweaks the error message from use of deleted uWS.HttpResponse:

Error: uWS.HttpResponse must not be accessed after uWS.HttpResponse.onAborted callback, or after a successful response. See documentation for uWS.HttpResponse and consult the user manual.

uWebSockets.js - v20.29.0

Published by uNetworkingAB over 1 year ago

Obvious user error messages

This release tweaks the error messages given to users who use the library wrongly. Now they are less technical and more helpful and guides the user to the docs and manual:

On ill-use of uWS.HttpRequest:

Error: uWS.HttpRequest must not be accessed after await or route handler return. See documentation for uWS.HttpRequest and consult the user manual.

On ill-use of uWS.HttpResponse:

Warning: uWS.HttpResponse writes must be made from within a corked callback. See documentation for uWS.HttpResponse.cork and consult the user manual.

Hopefully users will stop reporting these errors as if they were bugs in uWS, and instead read them and go to the docs to solve the problem on their end.

uWebSockets.js - v20.28.0

Published by uNetworkingAB over 1 year ago

  • Updates uWS to v20.43.0
uWebSockets.js - v20.27.0

Published by uNetworkingAB over 1 year ago

Some corrections to last release. A better warning is now used:

Warning: uWS.HttpResponse writes must be made from within a corked callback. See documentation for uWS.HttpResponse.cork and consult the user manual.

Some fixes to TypeScript definitions have been merged.

uWebSockets.js - v20.26.0

Published by uNetworkingAB over 1 year ago

Warning of ill-use

This release adds something I have wanted to add for a long time. While the user manual is pretty clear on this, many users don't care to read it. So with this release there is now a in-your-face critical warning for ill-use regarding corking.

This release is backwards compatible, since we only issue warnings, but next major release will make this warning into a forceful termination of your app. This is done, to make it crystal clear that you aren't using uWS.js properly.

On invalid use, you will now get this:

Critical warning: Calling uWS.HttpResponse [.writeStatus, .writeHeader, .end, .write, .tryEnd, .upgrade, .endWithoutBody, or similar] outside of uWS.HttpResponse.cork callback is highly discouraged due to major performance loss! Read the user manual and make the fix.

If you get this warning, fix your app.

uWebSockets.js - v20.25.0

Published by uNetworkingAB over 1 year ago

Alien tech 👾

This release introduces a new mode of integration; no integration. Setting the environment variable ALIEN_UWS=1 makes uWS run entirely alien to Node.js, on its own separate event-loop. This mode greatly increases performance of uWS.js given the same CPU-time budget, by escaping Node.js's heavy weight AsyncHook feature that always imposes a huge performance penalty to your entire Node.js process, regardless if you actually use it or not. AsyncHook will not be able to track uWS.js callbacks in this mode.

uWebSockets js v20 25 0 msg_sec, with and without ALIEN_UWS=1 on Node js v20 2 0, Linux  CPU-time normalized

uWebSockets.js - v20.24.0

Published by uNetworkingAB over 1 year ago

  • Updates uWS to v20.40.0.