Releases: socketio/socket.io-client
4.5.3
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
Bug Fixes
- handle ill-formatted packet from server (c597023)
Links:
- Diff: 4.5.1...4.5.2
- Server release: 4.5.2
- engine.io-client version:
~6.2.1
(diff) - 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 (-) |
2.5.0
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
There were some minor bug fixes on the server side, which mandate a client bump.
Links:
- Diff: 4.5.0...4.5.1
- Server release: 4.5.1
- engine.io-client version:
~6.2.1
(diff) - 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.0
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:
- Diff: 4.4.1...4.5.0
- Server release: 4.5.0
- engine.io-client version:
~6.2.1
(diff) - ws version:
~8.2.3
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
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
Bug Fixes
- add package name in nested package.json (53d8fca), closes socketio/socket.io-client#1513
- fix
socket.disconnect().connect()
usage (99c2cb8) - prevent socket from reconnecting after middleware failure (d54d12c)
Features
- add timeout feature (ccf7998)
socket.timeout(5000).emit("my-event", (err) => {
if (err) {
// the server did not acknowledge the event in the given delay
}
});
Links:
- Diff: 4.3.2...4.4.0
- Server release: 4.4.0
- engine.io-client version:
~6.1.1
(diff) - ws version:
~8.2.3
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
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
Bug Fixes
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
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:
- Diff: 4.2.0...4.3.0
- Server release: 4.3.0
- engine.io-client version:
~6.0.1
(diff) - ws version:
~8.2.3
(diff)
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 |