diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a716ce3..48be49d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ This contains only the most important and/or user-facing changes; for a full changelog, see the commit history. +## [0.2.0](https://github.com/ably/ably-chat-js/tree/0.2.0) (2024-09-09) + +- Added hooks and providers for React, to allow a closer integration with these ecosystems. For more information on how to get started with Chat in React, see [the React README](./src/react/README.md). +- When a new room is returned from rooms.get() we now guarantee that the returned object is usable. Previously if the room was being released, the releasing room was returned. If needed, async operations wait for the previous release to finish behind-the-scenes. +- Added message parsing helpers that convert regular Ably Pub/Sub messages into Chat entities, which can be used on existing post-publish channel rules [#249](https://github.com/ably/ably-chat-js/pull/249). +- Improved documentation around getting previous messages for a given subscription [#328](https://github.com/ably/ably-chat-js/pull/328) +- The CDN bundle for the core Chat SDK is now in UMD format, as opposed to ESM. This will still work in both browsers and Node. The README instructions have been updated to reflect this [#333](https://github.com/ably/ably-chat-js/pull/333). + ## [0.1.0](https://github.com/ably/ably-chat-js/tree/0.1.0) (2024-07-10) - Initial private beta release of the Ably Chat SDK for JavaScript. diff --git a/README.md b/README.md index 6b35dde8..fd6beb9f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Ably Chat SDK +# Ably Chat SDK for TypeScript and React
@@ -9,7 +9,7 @@ Ably Chat is a set of purpose-built APIs for a host of chat features enabling you to create 1:1, 1:Many, Many:1 and Many:Many chat rooms for any scale. It is designed to meet a wide range of chat use cases, such as livestreams, in-game communication, customer support, or social interactions in SaaS products. Built on [Ably's](https://ably.com/) core service, it abstracts complex details to enable efficient chat architectures. > [!IMPORTANT] -> This SDK is currently under development. If you are interested in being an early adopter and providing feedback then you can [sign up to the private beta](https://forms.gle/vB2kXhCXrTQpzHLu5) and are welcome to [provide us with feedback](https://forms.gle/mBw9M53NYuCBLFpMA). Coming soon: React Hooks for Ably Chat. +> This SDK is currently under development. If you are interested in being an early adopter and providing feedback then you can [sign up to the private beta](https://forms.gle/vB2kXhCXrTQpzHLu5) and are welcome to [provide us with feedback](https://forms.gle/mBw9M53NYuCBLFpMA). Coming soon: chat moderation, editing and deleting messages. Get started using the [π documentation](https://ably.com/docs/products/chat) and [πcheck out the live demo](https://ably-livestream-chat-demo.vercel.app/), or [π browse the API reference](https://sdk.ably.com/builds/ably/ably-chat-js/main/typedoc/). @@ -25,6 +25,12 @@ This SDK supports the following platforms: **Typescript**: This library is written in TypeScript and has full TypeScript support. +**React**: The library ships with a number of providers and hooks for React, which provide a closer integration with that ecosystem. For more information on using Ably Chat in React, see the [React readme](./src/react/README.md). + +**React Native** We aim to support all platforms supported by React Native. If you find any issues please raise an issue or contact us. + +There is a known caveat in the current version of the library in environments where `structuredClone` is not defined. To address this, you can use a polyfill such as [@ungap/structured-clone](https://www.npmjs.com/package/@ungap/structured-clone). + ## Supported chat features This project is under development so we will be incrementally adding new features. At this stage, you'll find APIs for the following chat features: diff --git a/cspell.json b/cspell.json index 84665821..011b4281 100644 --- a/cspell.json +++ b/cspell.json @@ -15,10 +15,9 @@ "Suspendable", "Failable", "livestreams", - "livestream" + "livestream", + "ungap" ], "ignoreRegExpList": ["/.*@\\d{13}-/"], - "flagWords": [ - "cancelled" - ] + "flagWords": ["cancelled"] } diff --git a/demo/package-lock.json b/demo/package-lock.json index 8ed61a57..fbbc4d9d 100644 --- a/demo/package-lock.json +++ b/demo/package-lock.json @@ -34,7 +34,7 @@ }, "..": { "name": "@ably/chat", - "version": "0.1.0", + "version": "0.2.0", "license": "Apache-2.0", "dependencies": { "async-mutex": "^0.5.0", diff --git a/package-lock.json b/package-lock.json index 13842065..ae5a8f06 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ably/chat", - "version": "0.1.0", + "version": "0.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@ably/chat", - "version": "0.1.0", + "version": "0.2.0", "license": "Apache-2.0", "dependencies": { "async-mutex": "^0.5.0", diff --git a/package.json b/package.json index 462f5472..4a30f293 100644 --- a/package.json +++ b/package.json @@ -1,22 +1,26 @@ { "name": "@ably/chat", - "version": "0.1.0", + "version": "0.2.0", "description": "Ably Chat is a set of purpose-built APIs for a host of chat features enabling you to create 1:1, 1:Many, Many:1 and Many:Many chat rooms for any scale. It is designed to meet a wide range of chat use cases, such as livestreams, in-game communication, customer support, or social interactions in SaaS products.", "type": "module", "main": "dist/chat/ably-chat.umd.cjs", "browser": "dist/chat/ably-chat.js", "types": "dist/chat/index.d.ts", + "react-native": "dist/react/ably-chat-react.umd.cjs", "exports": { ".": { "types": "./dist/chat/index.d.ts", "import": "./dist/chat/ably-chat.js", - "require": "./dist/chat/ably-chat.umd.cjs" + "require": "./dist/chat/ably-chat.umd.cjs", + "react-native": "./dist/chat/ably-chat.umd.cjs" }, "./react": { "types": "./dist/react/index.d.ts", "import": "./dist/react/ably-chat-react.js", - "require": "./dist/react/ably-chat-react.umd.cjs" - } + "require": "./dist/react/ably-chat-react.umd.cjs", + "react-native": "./dist/react/ably-chat-react.umd.cjs" + }, + "./package.json": "./package.json" }, "scripts": { "lint": "eslint . && npm run cspell", diff --git a/src/core/version.ts b/src/core/version.ts index 0b1765f0..8dac4379 100644 --- a/src/core/version.ts +++ b/src/core/version.ts @@ -1,4 +1,4 @@ // Update this when you release a new version -export const VERSION = '0.1.0'; +export const VERSION = '0.2.0'; export const CHANNEL_OPTIONS_AGENT_STRING = `chat-js/${VERSION}`; export const DEFAULT_CHANNEL_OPTIONS = { params: { agent: CHANNEL_OPTIONS_AGENT_STRING } };