npm / @colyseus/sdk
@colyseus/sdk
What changed in @colyseus/sdk 0.18, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-02.
4 breaking1 behavior and defaults6 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@colyseus/sdk 0.1811 changes
Breaking changes 4
Script-tag apps must load this file before the first join.
Going offline in the browser now closes every open connection, not every other one.
If a listener throws, the other listeners and subsequent room actions still run; the first error is rethrown after all listeners have run.
In Node 22, a room keeps retrying while the server is unreachable instead of giving up after the first failed attempt.
Behavior and default changes 1
Debug tooling is only wired up when this module is imported.
Fixes and other changes 6
Safari no longer logs an incorrect WebSocket protocol error each time a room connects.
A connection that never opened no longer keeps another room's connection open when the browser goes offline.
While reconnecting, leave() now stops reconnection and resolves immediately with CloseCode.CONSENTED; before the join completes, it leaves as soon as it does.
In Node 22, calling leave(false) from onError during a failed reconnection attempt no longer recurses.
A throwing onDrop listener no longer leaves the room's socket open.
A throwing onLeave listener no longer leaves the room's socket open.