Skip to content

Releases: socketio/socket.io-client

4.5.3

15 Oct 05:48
2eca8da
Compare
Choose a tag to compare

Bug Fixes

  • do not swallow user exceptions (2403b88)

Links:

  • Diff: 4.5.2...4.5.3
  • Server release: 4.5.3
  • engine.io-client version: ~6.2.1
  • ws version: ~8.2.3

Size of the bundles:

min min+gzip
socket.io.min.js 42.6 KB (-) 13.6 KB (-)
socket.io.msgpack.min.js 47.7 KB (-) 14.6 KB (-)
socket.io.esm.min.js 34.5 KB (-) 11.5 KB (-)

4.5.2

02 Sep 22:41
2d70813
Compare
Choose a tag to compare

Bug Fixes

  • handle ill-formatted packet from server (c597023)

Links:

Size of the bundles:

min min+gzip
socket.io.min.js 42.6 KB (-) 13.6 KB (-)
socket.io.msgpack.min.js 47.7 KB (-) 14.6 KB (-)
socket.io.esm.min.js 34.5 KB (-) 11.5 KB (-)

2.5.0

26 Jun 08:03
2b8e318
Compare
Choose a tag to compare

Bug Fixes

  • ensure buffered events are sent in order (991eb0b)

Links:

  • Diff: 2.4.0...2.5.0
  • Server release: 2.5.0
  • engine.io-client version: ~3.5.0
  • ws version: ~7.4.2

4.5.1

17 May 21:44
f0350a0
Compare
Choose a tag to compare

There were some minor bug fixes on the server side, which mandate a client bump.

Links:

Size of the bundles:

min min+gzip
socket.io.min.js 42.6 KB (-) 13.6 KB (-)
socket.io.msgpack.min.js 47.7 KB (-) 14.6 KB (-)
socket.io.esm.min.js 34.5 KB (-) 11.5 KB (-)

4.5.0

24 Apr 20:18
abdba07
Compare
Choose a tag to compare

Features

  • add details to the disconnect event (b862924)

The "disconnect" event will now include additional details to help debugging if anything has gone wrong.

Example when a payload is over the maxHttpBufferSize value in HTTP long-polling mode:

socket.on("disconnect", (reason, details) => {
  console.log(reason); // "transport error"

  // in that case, details is an error object
  console.log(details.message); "xhr post error"
  console.log(details.description); // 413 (the HTTP status of the response)

  // details.context refers to the XMLHttpRequest object
  console.log(details.context.status); // 413
  console.log(details.context.responseText); // ""
});
  • add support for catch-all listeners for outgoing packets (74e3e60)

This is similar to onAny(), but for outgoing packets.

Syntax:

socket.onAnyOutgoing((event, ...args) => {
  console.log(event);
});
  • slice write buffer according to the maxPayload value (46fdc2f)

The server will now include a "maxPayload" field in the handshake details, allowing the clients to decide how many packets they have to send to stay under the maxHttpBufferSize value.

Links:

Size of the bundles:

min min+gzip
socket.io.min.js 42.6 KB (+ 2.2 KB ⬆️) 13.6 KB (+ 0.5 KB ⬆️)
socket.io.msgpack.min.js 47.7 KB (+ 2.1 KB ⬆️) 14.6 KB (+ 0.4 KB ⬆️)
socket.io.esm.min.js 34.5 KB (+ 1.4 KB ⬆️) 11.5 KB (+ 0.2 KB ⬆️)

4.4.1

06 Jan 06:43
359d1e2
Compare
Choose a tag to compare

This release only contains minor changes. Please see the diff for more details.

Links:

  • Diff: 4.4.0...4.4.1
  • Server release: 4.4.1
  • engine.io-client version: ~6.1.1
  • ws version: ~8.2.3

Size of the bundles:

min min+gzip
socket.io.min.js 40.4 KB (-) 13.1 KB (-)
socket.io.msgpack.min.js 45.6 KB (-) 14.2 KB (-)
socket.io.esm.min.js 33.1 KB (-) 11.3 KB (-)

4.4.0

18 Nov 13:16
71e34a3
Compare
Choose a tag to compare

Bug Fixes

Features

socket.timeout(5000).emit("my-event", (err) => {
  if (err) {
    // the server did not acknowledge the event in the given delay
  }
});

Links:

Size of the bundles:

min min+gzip
socket.io.min.js 40.4 KB (+ 0.4 KB ⬆️) 13.1 KB (+ 0.1 KB ⬆️)
socket.io.msgpack.min.js 45.6 KB (+ 0.4 KB ⬆️) 14.2 KB (-)
socket.io.esm.min.js 33.1 KB (+ 0.3 KB ⬆️) 11.3 KB (+ 0.2 KB ⬆️)

4.3.2

16 Oct 23:22
da0b828
Compare
Choose a tag to compare

Bug Fixes

  • restore the default export (bis) (6780f29)

Links:

  • Diff: 4.3.1...4.3.2
  • Server release: -
  • engine.io-client version: ~6.0.1
  • ws version: ~8.2.3

Size of the bundles:

min min+gzip
socket.io.min.js 40.0 KB (-) 13.0 KB (-)
socket.io.msgpack.min.js 45.2 KB (-) 14.2 KB (-)
socket.io.esm.min.js 32.8 KB (-) 11.1 KB (-)

4.3.1

16 Oct 00:01
ca614b2
Compare
Choose a tag to compare

Bug Fixes

  • restore the default export (f0aae84)
  • restore the namespace export (8737d0a)

Links:

  • Diff: 4.3.0...4.3.1
  • Server release: -
  • engine.io-client version: ~6.0.1
  • ws version: ~8.2.3

Size of the bundles:

min min+gzip
socket.io.min.js 40.0 KB (+ 0.1 KB ⬆️) 13.0 KB (+ 0.1 KB ⬆️)
socket.io.msgpack.min.js 45.2 KB (+ 0.1 KB ⬆️) 14.2 KB (+ 0.1 KB ⬆️)
socket.io.esm.min.js 32.8 KB (+ 0.1 KB ⬆️) 11.1 KB (-)

4.3.0

15 Oct 06:48
c76d367
Compare
Choose a tag to compare

An ESM bundle is now provided:

<script type="module">
  import { io } from "https://cdn.socket.io/4.3.0/socket.io.esm.min.js";

  const socket = io();

  socket.emit("hello", "world");
</script>

The bundle size has also been greatly reduced, from 16.0 KB to 12.9 KB (min+gzip).

Features

  • typings: add missing types for some emitter methods (#1502) (a9e5b85)
  • provide an ESM build with and without debug (16b6569)
  • migrate to rollup (0661564)

Links:

Size of the bundles:

min  min+gzip
socket.io.min.js 39.9 KB (-24.6 KB ⬇️) 12.9 KB (-3.1 KB ⬇️)
socket.io.msgpack.min.js 45.1 KB (-25.6 KB ⬇️) 14 KB (-2.6 KB ⬇️)
socket.io.esm.min.js 32.7 KB 11.1 KB