Releases: ably/ably-js
2.17.0
- 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 todetachedwhen the connection is not connected, instead of waiting or erroring #2149
v2.16.0
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
ObjectMessagethat 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()andLiveCounter.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.objectstochannel.object channel.objects.getRoot()replaced bychannel.object.get(), which returns aPathObjectchannel.objects.createMap()andchannel.objects.createCounter()replaced by staticLiveMap.create()andLiveCounter.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 individualSubscription.unsubscribe()insteadRealtimeObject.offAll()removed; use individualStatusSubscription.off()orRealtimeObject.off(event, callback)insteadchannel.objects.batch()moved toPathObject.batch()/Instance.batch()- For TypeScript users: all LiveObjects types moved from
'ably'to'ably/liveobjects'; globalAblyObjectsTypesinterface removed in favor of type parameters onchannel.object.get<T>(); several types renamed, removed, or redesigned
v2.15.0
Full Changelog: 2.14.0...2.15.0
What's Changed
v2.14.0
v2.13.0
Full Changelog: 2.12.0...2.13.0
What's Changed
- Surface the
connectionIdof the client that submitted aLiveObjectoperation 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.annotationsto store annotation information for the message. Message.versionis now an object, containing information about the latest message version.Message.createdAthas been removed, its purpose is now served byMessage.timestamp.- Per the above,
Message.timestampnow refers to when a message was first created on the server. For the latest updated at time, seeMessage.version.timestamp. Message.operationhas been removed. Its fields are now inMessage.version.*Message.summaryhas been moved toMessage.annotations.summary
- A new field
v2.12.0
v2.11.1
Full Changelog: 2.11.0...2.11.1
What's Changed
v2.11.0
v2.10.1
v2.10.0
Full Changelog: 2.9.0...2.10.0
What's Changed
- Add
Channels.allto type declarations #2040 - Add
ClientOptions.endpointparameter and deprecate theenvironment,restHostandrealtimeHostclient options. See platform customization documentation for guidance on using the newendpointparameter #1973