npm / @supabase/realtime-js
@supabase/realtime-js
What changed in @supabase/realtime-js 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
5 breaking8 new APIs and options1 behavior and defaults36 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@supabase/realtime-js 250 changes
Breaking changes 5
Node.js 20 is no longer supported.
Realtime disconnects are deferred.
Setting a postgres_changes event listener is blocked after joining.
The default serializer is now 2.0.0.
Node.js 20 or later is required to use this release.
New APIs and options 8
Broadcast persistence is added.
Adds the ability to wait for Postgres changes.
Adds a filter builder for postgres_changes, with new operators and select support.
Adds an option for a replication connection system message.
Adds copyBindings functionality.
Heartbeat latency is exposed on the heartbeat callback.
Adds metadata to realtime user broadcast push.
Realtime adds an explicit REST call.
Behavior and default changes 1
httpSend can now send binary payloads.
Fixes and other changes 36
The unsupported serializer error now includes vsn.
The send() REST fallback warning now respects the custom logger.
Prevents duplicate on bindings.
Clears stale join payload on sign-out.
Calling setAuth no longer disables token refresh.
Presence refs are now preserved.
Updated Phoenix to fix a presence issue in Realtime.
track() now forwards opts to send(), so those options are applied when sending.
Broadcast header fields are now encoded as UTF-8.
Suppresses disconnected status from onHeartbeat consumers.
Clarifies the 404 error and server migration note for httpSend().
Guards sessionStorage access in restricted-storage browsers.
Enum-like unions are widened with (string & {}) for forward compatibility, allowing string values beyond the listed union members.
Transport-level CHANNEL_ERROR now surfaces a real Error.
Realtime throws Error objects instead of bare strings.
Reverted the type of vsn to string.
Channel join payloads are patched with the resolved access token before the send buffer is flushed.
Removes an unnecessary check in removeChannel.
Fixed removeChannel when unsubscribe succeeds.
Reverts table-filter validation in postgres_changes event dispatch.
Sends a heartbeat when the initial connection encounters an error.
Adds a generic overload for the postgres_changes event type.
Validates the table filter during postgres_changes event dispatch.
Avoids edge runtime warnings in next.js.
The authorization header is omitted when no access token exists.
Handles a websocket race condition in Node.js.
Web workers are terminated on disconnect to prevent a memory leak.
Preserves custom JWT tokens across channel resubscribe.
Handles null values when comparing postgres changes filters.
Message encoding now accounts for null refs.
Calling setAuth is no longer required when using a custom JWT token.
Implements the V2 serializer.
Ensures WebSocket connections are properly closed during teardown.
Added the missing tslib dependency to core packages.
The RealtimeChannel type was enhanced.
URL manipulation now uses a URL object.