Skip to content

Releases: ably/ably-js

v2.21.0

19 Mar 11:56
17be43e

Choose a tag to compare

Full Changelog: 2.20.0...2.21.0

What's Changed

New features

  • Add LiveObjects REST client: channel.object is now available on REST channel instances, exposing get() to read object state, publish() to send object operations, and generateObjectId() to create object IDs on the client side for atomic batch operations with cross-references between newly created objects #2109

v2.20.0

13 Mar 13:07
f8260f2

Choose a tag to compare

Full Changelog: 2.19.0...2.20.0

What's Changed

With this release, the ably-js LiveObjects API is no longer in Public Preview and is now generally available.

Key changes:

  • Introduce version 6 of the Ably protocol; add operation-specific payload fields to ObjectOperation and typed value fields to ObjectData exposed in LiveObjects subscription callbacks; deprecate map, counter, mapOp, counterOp on ObjectOperation and value on ObjectData #2159
  • Add support for partial sync of LiveObjects state #2152
  • Add support for server-initiated MAP_CLEAR object operation #2176
  • Return history function from useChannel hook #2177

v2.19.0

03 Mar 14:20
54d1630

Choose a tag to compare

Full Changelog: 2.18.0...2.19.0

What's Changed

  • [AIT-285] Fix rules for clearing buffered object operations during sync sequence by @VeskeR in #2150
  • feat: add detail field to ErrorInfo (TI6) by @splindsay-92 in #2171

v2.18.0

23 Feb 18:36
0035db0

Choose a tag to compare

Full Changelog: 2.17.1...2.18.0

What's Changed

New features

LiveObjects operations are now applied on acknowledgement

When you call a LiveObjects mutation method (e.g. map.set()), the SDK now applies the effects of this operation to the local LiveObjects data as soon as it receives the server's acknowledgement of this operation. This is an improvement over earlier versions, in which the SDK did not apply such an operation until receiving the operation's echo.

Concretely, this means that in the following example, fetchedValue is now guaranteed to be myValue:

await map.set('myKey', 'myValue');
const fetchedValue = map.get('myKey').value();

Bug fixes

  • Fix bug where calling channel.off() could prevent attach() and detach() calls from completing #2167
  • Make sure that ErrorInfo.cause is always an ErrorInfo #2169

v2.17.1

30 Jan 16:17
441cec2

Choose a tag to compare

Full Changelog: 2.17.0...2.17.1

What's Changed

  • Fix non-monotonic msgSerial on stale connection reset #2153
  • Fix missing capabilities in CapabilityOp type #2160

v2.17.0

08 Jan 14:32
a06036c

Choose a tag to compare

Full Changelog: 2.16.0...2.17.0

What's Changed

  • Support update and delete operations over realtime connections #2127
  • Implement message append for realtime and REST #2127
  • Publish, update, delete, and append methods now return result objects containing message serial/version information #2127
  • Fix msgpack encoding for multi-byte UTF-8 characters when using the binary protocol browsers #2145
  • Fix failing of non-sent queued messages when connection enters suspended/failed/closed state #2123
  • channel.detach() now immediately transitions to detached when the connection is not connected, instead of waiting or erroring #2149

v2.16.0

19 Dec 16:00
15ea48c

Choose a tag to compare

Full Changelog: 2.15.0...2.16.0

What's Changed

Introducing LiveObjects Path-based API

This release introduces a redesigned LiveObjects API centered around path-based operations. The new PathObject abstraction provides a more intuitive interaction model where operations resolve at runtime against the current value at a path, rather than being bound to specific object instances.

With this release, the ably-js LiveObjects API is no longer marked as @experimental and is in Public Preview.

Key improvements:

  • Resilient subscriptions: Subscribe to paths rather than object instances, so subscriptions automatically follow whatever object exists at that location even when it's replaced.
  • Deep subscriptions: Observe changes at any depth below a path with configurable depth control.
  • Operation context: Subscription callbacks now receive the complete ObjectMessage that triggered the change, including information about the publishing client and operation details.
  • Simplified object creation: Create deeply nested structures in a single operation using LiveMap.create() and LiveCounter.create() static methods, eliminating the risk of orphaned objects.
  • Compact representations: New .compact() and .compactJson() methods for converting LiveObjects to plain JavaScript objects.

This release contains breaking changes to the LiveObjects API. See the LiveObjects migration guide for detailed instructions on updating your code.

Breaking changes:

  • The LiveObjects plugin import path changed from 'ably/objects' to 'ably/liveobjects'
  • The plugin is now a named export: import { LiveObjects } from 'ably/liveobjects'
  • The API entrypoint changed from channel.objects to channel.object
  • channel.objects.getRoot() replaced by channel.object.get(), which returns a PathObject
  • channel.objects.createMap() and channel.objects.createCounter() replaced by static LiveMap.create() and LiveCounter.create() methods
  • Subscription callback signature changed to receive { object, message } context
  • LiveObject lifecycle event methods (.on(), .off(), .offAll()) removed; deleted events now surface via regular subscriptions
  • LiveObject.unsubscribeAll() removed; use individual Subscription.unsubscribe() instead
  • RealtimeObject.offAll() removed; use individual StatusSubscription.off() or RealtimeObject.off(event, callback) instead
  • channel.objects.batch() moved to PathObject.batch() / Instance.batch()
  • For TypeScript users: all LiveObjects types moved from 'ably' to 'ably/liveobjects'; global AblyObjectsTypes interface removed in favor of type parameters on channel.object.get<T>(); several types renamed, removed, or redesigned

v2.15.0

02 Dec 19:56
ef368ba

Choose a tag to compare

Full Changelog: 2.14.0...2.15.0

What's Changed

  • Implement client.clientId attribute as a shortcut for client.auth.clientId #2100
  • Add support for updating and deleting messages (REST-only for now) #2088

v2.14.0

02 Oct 12:20
5585ae9

Choose a tag to compare

Full Changelog: 2.13.0...2.14.0

What's Changed

  • Add clipped field to annotation summary types #2078

v2.13.0

19 Sep 08:26
7038090

Choose a tag to compare

Full Changelog: 2.12.0...2.13.0

What's Changed

  • Surface the connectionId of the client that submitted a LiveObject operation in subscribe callbacks #2084
  • Introduce version 4 of the Ably protocol #2076
  • Changes to the structure of the experimental annotations and message fields #2076
    • A new field Message.annotations to store annotation information for the message.
    • Message.version is now an object, containing information about the latest message version.
    • Message.createdAt has been removed, its purpose is now served by Message.timestamp.
    • Per the above, Message.timestamp now refers to when a message was first created on the server. For the latest updated at time, see Message.version.timestamp.
    • Message.operation has been removed. Its fields are now in Message.version.*
    • Message.summary has been moved to Message.annotations.summary