unstale

npm / socket.io-client

socket.io-client

What changed in socket.io-client 2 to 4, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-23.

4 breaking8 new APIs and options1 performance1 behavior and defaults4 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.2.4 on npm

socket.io-client 47 changes

New APIs and options 4

  • Export ExtendedError so it can be used in TypeScript with the connect_error event.

    4.8.4release notes

  • Export the reserved event interfaces for use in TypeScript.

    4.8.4release notes

  • Support for typed events was added, allowing developers to use event types with the client.

    4.0.0release notes

  • Some utility methods were added to the client API.

    4.0.0release notes

Fixes and other changes 3

  • A client bump is required for minor server-side bug fixes.

    4.8.3release notes

  • The queue is drained before the connect event is emitted.

    4.8.2release notes

  • The bundle no longer mangles the _placeholder attribute.

    4.8.2release notes

socket.io-client 36 changes

Breaking changes 2

  • Connecting to a namespace no longer implicitly connects to the default namespace.

    3.0.0release notes

  • Using reserved event names now throws.

    3.0.0release notes

New APIs and options 3

  • An ES6 module export is available.

    3.0.0release notes

  • A msgpack bundle is served for use by developers.

    3.0.0release notes

  • Catch-all listeners are supported, letting a socket listen for all events.

    3.0.0release notes

Behavior and default changes 1

socket.io-client 25 changes

Breaking changes 2

  • For self-signed certificates, rejectUnauthorized now defaults to true.

    2.0.0release notes

  • A breaking change related to utf-8 encoding in engine.io-parser makes this release not backward-compatible.

    2.0.0release notes

New APIs and options 1

  • Applications can provide a custom parser according to their needs.

    2.0.0release notes

Performance 1

  • The handshake packets were merged, reducing the number of roundtrips needed to establish a connection.

    2.0.0release notes

Fixes and other changes 1

  • The client socket id now matches the id on the server side.

    2.0.0release notes