Skip to content

Releases: uNetworking/uWebSockets.js

v20.23.0

21 Apr 18:17
Compare
Choose a tag to compare
  • Updates uWS to v20.39.0.

v20.22.0

20 Apr 17:05
Compare
Choose a tag to compare

Node.js LTS 16, 18, 20 support

  • Three latest LTS of Node.js supported.
  • Node.js 19 support removed.

v20.21.0

16 Apr 20:04
Compare
Choose a tag to compare
  • Updates uWS to v20.38.0

Full Changelog: v20.20.0...v20.21.0

v20.20.0

08 Mar 14:03
7029168
Compare
Choose a tag to compare

Full Changelog: v20.19.0...v20.20.0

v20.19.0

09 Jan 14:19
Compare
Choose a tag to compare
  • Recompiles on Ubuntu 20.04 instead of Ubuntu 22.04 for increased binary compatibility.

v20.18.0

08 Jan 23:35
Compare
Choose a tag to compare
  • Updates uWS to v20.36.0

v20.17.0

08 Jan 20:24
Compare
Choose a tag to compare

TypeScript updates for C++ alignment

The typings are now more strict and more aligned with the C++ interface. This means that documentation for TypeScript is more applicable to C++ and vice versa. In fact, the C++ examples are in many aspects identical to what you would write in TypeScript (ignoring syntax differences).

The biggest change is that you can no longer attach any key/value pair to WebSocket. You must define a static interface of the members up front. This means the type of WebSocket is now WebSocket<UserData> and WebSocket.getUserData() returns UserData.

Here is a complete example in TypeScript:

interface UserData {
    openDate: number;
}

uWS.App().ws<UserData>("/", {
    open: (ws) => {
        ws.getUserData().openDate = Date.now();
    },
    close: (ws, code, message) => {
        console.log("WebSocket with openDate " + ws.getUserData().openDate + " left.");
    }
}).listen(3000, (listenSocket) => {
    
});

and for comparison here is the equivalent example in C++:

struct UserData {
    time_t openDate;
}

uWS::App().ws<UserData>("/", {
    .open = [](auto *ws) {
        ws->getUserData()->openDate = clock();
    },
    .close = [](auto *ws, auto code, auto message) {
        std::cout << "WebSocket with openDate " << ws->getUserData()->openDate << " left." << std::endl;
    }
}).listen(3000, [](auto *listenSocket) {
    
});

Obviously, this only applies to TypeScript users. JavaScript users can still attach anything to anything without limitation and do not need to use getUserData(). So JavaScript code is unaffected by this change.

v20.16.0

08 Jan 18:27
Compare
Choose a tag to compare

A bigger update

  • This update contains maxLifetime, unix sockets, subscription events and many fixes and new docs additions.
  • Updates uWS to v20.35.0

v20.15.0

07 Nov 11:23
Compare
Choose a tag to compare
  • Updates uWS to v20.30.0
  • Adds ARMv7 binaires for Linux (unsupported)

v20.14.0

18 Oct 16:47
Compare
Choose a tag to compare

Node.js 19 and more HTTP fixes

  • uWS v20.25.0
  • Dropped Node.js 14 even though it is an LTS release (due to major performance regression).