v1.2.0 @liveblocks/*- Support the new and improved Liveblocks authorization.
- Change client logic to stop retrying if room is full. Instead, the client will
now disconnect. To retry, call
room.reconnect()explicitly.
@liveblocks/node- Add new APIs for authorization. See our migration guide for tips on how to adopt the new style of authorizing your Liveblocks clients.
v1.1.8 - Fix a small TypeScript issue introduced in 1.1.7.
v1.1.7 @liveblocks/client- When initializing the client with a
custom auth callback,
you can now return
{ error: "forbidden", reason: ... }as the response, which the client will treat as a sign to stop retrying. The client will then disconnect from the room, instead of remaining in"connecting"status indefinitely.
@liveblocks/react- Fix a bug with
useSelf()where it would not correctly re-render after entering an empty room. It’s now consistent again withuseMyPresence().
DevTools
- Fix a bug in the Liveblocks DevTools panel where the "me" view would incorrectly stay empty after entering an empty room.
- When initializing the client with a
custom auth callback,
you can now return
v1.1.6 @liveblocks/*- Loosen duplicate import detection so it won't throw when used in test runners that deliberately run multiple instances of a module (like Jest or Playwright can do).
v1.1.5 @liveblocks/*- Ship all of our packages as both ESM and CJS modules again (restore the changes that 1.1.3 originally introduced).
- Auto-detect if multiple copies of Liveblocks are included in your production bundle. If so, a help page is presented that will help you resolve this issue.
- Fix a bug where the room internals could become non-functional when used in combination with Immer due to Immer’s excessive auto-freezing, which would break the room’s internals. (This became an issue since Liveblocks 1.1 was released.)
v1.1.4 - Undo the changes made in 1.1.3. We’ve got some bug reports where Liveblocks could still be doubly-included in production bundles (in some bundler setups only), with storage data corruptions as a possible result. We’re investigating.
v1.1.3 Ship all of our packages as both ESM and CJS modules. By upgrading, your project’s bundler can now perform (better) tree-shaking on the Liveblocks code.
You can expect (at least) the following bundle size reductions:
@liveblocks/clientfrom 80kB → 70kB@liveblocks/reactfrom 129kB → 80kB@liveblocks/reduxfrom 84kB → 38kB@liveblocks/zustandfrom 83kB → 37kB@liveblocks/yjsfrom 129kB → 74kB
v1.1.2 @liveblocks/yjsAdded Yjs support to open beta through the new
@liveblocks/yjspackage (not stable yet).- Fixes a missing internal export.
v1.1.1 - Fixes a bug where under certain circumstances the Liveblocks client could
incorrectly throw a
Not started yeterror message.
- Fixes a bug where under certain circumstances the Liveblocks client could
incorrectly throw a
v1.1.0 This release improves the client’s internals to ensure a more reliable connection with Liveblocks servers.
@liveblocks/client- New APIs:
room.getStatus(): returns the current status of the WebSocket connection:"initial","connecting","connected","reconnecting", or"disconnected"room.subscribe("status"): subscribe to changes of the connection status.room.subscribe("lost-connection"): high-level API to get informed when Liveblocks’ automatic reconnection process is taking longer than usual, so you can show a toast message on screen. (See this example for an illustration.)
- New behavior:
- The client will stop retrying to establish a connection in cases where retrying would not help. For example an explicit 403 forbidden response from your backend, or a configuration error.
- The client will more quickly reconnect even after long periods of sleep.
@liveblocks/react-
New APIs:
useStatus()- React hook version ofroom.getStatus()useLostConnectionListener()- React hook version ofroom.subscribe("lost-connection")(See this example for an illustration.)
-
Reconnection would sometimes not work after long periods of sleep. Waking up is now instant.
-
React clients using Suspense could sometimes incorrectly bounce back to the Suspense boundary after a successful load. No longer!
-
Client could sometimes not load storage after reconnecting. Not anymore!
-
Others array will no longer flash during an internal reconnect.
-
DevTools now keeps working even when the client goes offline.
These APIs still work, but are replaced by newer APIs. The old APIs will be removed in a future release of Liveblocks.
Old connection status codes are replaced by the new ones:
❌ Old statuses ✅ New statuses closed initial authenticating connecting connecting connecting open connected unavailable reconnecting failed disconnected Recommended steps to upgrade:
- ❌
room.getConnectionState()→ ✅room.getStatus() - ❌
room.subscribe('connection')→ ✅room.subscribe('status') - Old client options:
- ❌
clientOptions.fetchPolyfill - ❌
clientOptions.WebSocketPolyfill→ ✅clientOptions.polyfills: { fetch, WebSocket }
- ❌
- New APIs: