From 51059aff316cb0da55837bedc8d77ff5b90fa5b4 Mon Sep 17 00:00:00 2001 From: Andrew Bulat Date: Fri, 1 Mar 2024 21:00:37 +0000 Subject: [PATCH] Better 2.0.0 changelog introduction --- CHANGELOG.md | 44 ++++++++++++++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 68d262c57..053544f2d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,21 +4,41 @@ This contains only the most important and/or user-facing changes; for a full cha ## [2.0.0](https://github.com/ably/ably-js/tree/2.0.0) (date TBD) -The 2.0.0 release introduces a number of significant changes. Here is an overview: +The 2.0.0 release introduces a number of new features and QoL improvements, including a new way to remove bloat and reduce the bundle size of your ably-js client, first-class support for Promises, a more idiomatic approach to using ably-js' React Hooks, enhancements to TypeScript typings, and more. + +Below is a list of all new features, APIs, deprecations, and breaking changes. +Read [ably-js v2 migration guide](link TBD) for more information. + +### Modular variant of the library + +An ESM variant of the library is now available for browsers (but not for Node.js) at `ably/modules`. This modular variant of the library supports tree shaking, allowing for a reduction in the Ably bundle size within your application. + +### First-class support for Promises + +The exports `ably/callbacks` and `ably/promises` have been removed. The callbacks API has been entirely removed, and now only promises are supported. Calls like `new Ably.Realtime.Promise` should be replaced with `new Ably.Realtime`. + +### React Hooks + +React hooks, exported at `ably/react`, now rely on the `ChannelProvider` component to define the channels you wish to use and the options for them. + +### TypeScript typings + +The Types namespace has been removed. All types are now exported at the top level. + +### Browser and Web Worker bundles + +- The browser bundle now relies on the native Web Crypto API instead of CryptoJS. The `ably/build/ably.noencryption` bundle has been removed, as it is no longer necessary. +- The separate bundle for web workers, `ably/build/ably-webworker`, has been removed. You can now import from `ably` in web workers. + +### Supported platforms changes - Support for Internet Explorer has been dropped. - Support for Node.js versions lower than 16 has been dropped. The supported Node.js versions are now 16, 18, and 20. - The minimum supported versions for major browsers are: Chrome 58, Firefox 52, Edge 79, Safari 11, and Opera 45. -- An ESM variant of the library is now available for browsers (but not for Node.js) at `ably/modules`. This modular variant of the library supports tree shaking, allowing for a reduction in the Ably bundle size within your application. -- React hooks, exported at `ably/react`, now rely on the `ChannelProvider` component to define the channels you wish to use and the options for them. -- The exports `ably/callbacks` and `ably/promises` have been removed. The callbacks API has been entirely removed, and now only promises are supported. Calls like `new Ably.Realtime.Promise` should be replaced with `new Ably.Realtime`. -- The browser bundle now relies on the native Web Crypto API instead of CryptoJS. The `ably/build/ably.noencryption` bundle has been removed, as it is no longer necessary. -- The separate bundle for web workers, `ably/build/ably-webworker`, has been removed. You can now import from `ably` in web workers. -- The Types namespace has been removed. All types are now exported at the top level. -Read more in [the migration guide for v2](link TBD). +___ -BREAKING CHANGES +### Breaking Changes - Remove code that's supporting older platforms [\#1629](https://github.com/ably/ably-js/pull/1629) - `ChannelProvider` implementation [\#1620](https://github.com/ably/ably-js/pull/1620) @@ -44,7 +64,7 @@ BREAKING CHANGES - Conform to spec for logging configuration [\#1216](https://github.com/ably/ably-js/pull/1216) - Remove support for JSONP [\#1215](https://github.com/ably/ably-js/pull/1215) -Features +### Features - `ChannelProvider` implementation [\#1620](https://github.com/ably/ably-js/pull/1620) - Log all HTTP activity [\#1581](https://github.com/ably/ably-js/pull/1581) @@ -54,12 +74,12 @@ Features - Use Web Crypto API for encrypting and decrypting [\#1299](https://github.com/ably/ably-js/pull/1299) - Add mandatory `version` param to `Rest.request` [\#1231](https://github.com/ably/ably-js/pull/1231) -Bug Fixes +### Bug Fixes - Remove false class exports in type declarations [\#1524](https://github.com/ably/ably-js/pull/1524) - Fix the type definition of `Crypto.getDefaultParams` [\#1352](https://github.com/ably/ably-js/pull/1352) -Code Refactoring +### Code Refactoring - Remove code that's supporting older platforms [\#1629](https://github.com/ably/ably-js/pull/1629) - Remove duplicate type names and change public `ChannelModes` type [\#1601](https://github.com/ably/ably-js/pull/1601)