Repository navigation
The 0.6.0 release moves the Spaces SDK onto Ably Pub/Sub v3. Pub/Sub v3 is split by where your code runs: @ably/pubsub-device for code that runs on an end user's device, such as a browser or a mobile app, and @ably/pubsub-server for code that runs on your own infrastructure. The Spaces SDK works with a client from either package, so you install the one that matches your side of the connection alongside @ably/spaces.
Below is an overview of the major changes in this release.
Please refer to the upgrade guide for the full details, including a list of all breaking changes and instructions on how to address them.
Ably Pub/Sub v3
- The Spaces SDK no longer uses the
ablypackage. Create the Pub/Sub client you pass to the Spaces SDK withcreateClientfrom@ably/pubsub-device, orcreateRealtimeClientfrom@ably/pubsub-server, instead ofnew Ably.Realtime(). #365 - In React, wrap your app in
PubSubClientProviderfrom@ably/pubsub-device/reactinstead ofAblyProviderfromably/react. #365 - When using the CDN, load the Pub/Sub v3 bundle, which defines an
AblyPubSubglobal in place ofAbly. #365
Client API naming
- The
Spacesclass and the package's default export are replaced by thecreateSpacesClientfactory function, which returns aSpacesClient. UsecreateSpacesClient(client)instead ofnew Spaces(client). #365 - The React
SpacesProvideris renamedSpacesClientProvider. #365 - The CDN bundle's
Spacesglobal is replaced by anAblySpacesnamespace. UseAblySpaces.createSpacesClient(client). #365
Supported platforms changes
- Support for Node.js versions lower than 22 has been dropped, as Ably Pub/Sub v3 requires Node.js 22 or newer. #365