Skip to content

Releases: uNetworking/uWebSockets.js

v20.33.0

22 Oct 19:26
Compare
Choose a tag to compare

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.

v20.32.0

24 Sep 23:32
Compare
Choose a tag to compare

Fixes

  • Updates uWS to v20.47.0

v20.31.0

15 Jul 18:40
Compare
Choose a tag to compare

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.

v20.30.0

30 May 01:15
Compare
Choose a tag to compare

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.

v20.29.0

29 May 19:07
Compare
Choose a tag to compare

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.

v20.28.0

28 May 05:37
Compare
Choose a tag to compare
  • Updates uWS to v20.43.0

v20.27.0

28 May 00:35
Compare
Choose a tag to compare

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.

v20.26.0

27 May 20:40
Compare
Choose a tag to compare

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.

v20.25.0

19 May 18:12
Compare
Choose a tag to compare

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

v20.24.0

01 May 18:21
Compare
Choose a tag to compare
  • Updates uWS to v20.40.0.