diff --git a/.changeset/healthy-penguins-sing.md b/.changeset/healthy-penguins-sing.md deleted file mode 100644 index 1a5fd8a..0000000 --- a/.changeset/healthy-penguins-sing.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -"y-durableobjects": major ---- - -Add JS RPC Support for getYDoc and updateYDoc - -1. **Major Features**: - - - **JS RPC APIs `getYDoc` and `updateYDoc`**: - - Implemented new JS RPC APIs to fetch (`getYDoc`) and update (`updateYDoc`) YDocs within Durable Objects. - - Allows manipulating YDocs from sources other than WebSocket, enhancing flexibility and control. - -2. **Hono Integration**: - - - Added examples for integrating `y-durableobjects` with Hono, using both shorthand and detailed methods. - - Demonstrated how to handle WebSocket connections via fetch due to the current limitations of JS RPC (see [Cloudflare issue](https://github.com/cloudflare/workerd/issues/2319)). - -3. **Extending with JS RPC**: - - - Explained how to extend `y-durableobjects` for advanced operations, including accessing and manipulating protected fields: - - `app`: The Hono app instance used to handle requests. - - `doc`: An instance of `WSSharedDoc` managing the YDoc state. - - `storage`: A `YTransactionStorageImpl` instance for storing and retrieving YDoc updates. - - `sessions`: A map to manage active WebSocket sessions. - - `awarenessClients`: A set to track client awareness states. - - Provided a minimal example of creating a custom Durable Object by extending `YDurableObjects`. - -4. **Client-side Typed Fetch with Hono RPC**: - - - Included a guide for creating a typed client using `hc` from `hono/client` to facilitate Hono RPC on the client side. - -5. **Documentation Updates**: - - Updated the README with detailed examples and explanations for the new features and integrations. - - Ensured clarity and ease of understanding for developers looking to utilize the new functionalities. diff --git a/CHANGELOG.md b/CHANGELOG.md index 7609327..fbf4991 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,40 @@ # y-durableobjects +## 1.0.0 + +### Major Changes + +- 0446fbd: Add JS RPC Support for getYDoc and updateYDoc + + 1. **Major Features**: + + - **JS RPC APIs `getYDoc` and `updateYDoc`**: + - Implemented new JS RPC APIs to fetch (`getYDoc`) and update (`updateYDoc`) YDocs within Durable Objects. + - Allows manipulating YDocs from sources other than WebSocket, enhancing flexibility and control. + + 2. **Hono Integration**: + + - Added examples for integrating `y-durableobjects` with Hono, using both shorthand and detailed methods. + - Demonstrated how to handle WebSocket connections via fetch due to the current limitations of JS RPC (see [Cloudflare issue](https://github.com/cloudflare/workerd/issues/2319)). + + 3. **Extending with JS RPC**: + + - Explained how to extend `y-durableobjects` for advanced operations, including accessing and manipulating protected fields: + - `app`: The Hono app instance used to handle requests. + - `doc`: An instance of `WSSharedDoc` managing the YDoc state. + - `storage`: A `YTransactionStorageImpl` instance for storing and retrieving YDoc updates. + - `sessions`: A map to manage active WebSocket sessions. + - `awarenessClients`: A set to track client awareness states. + - Provided a minimal example of creating a custom Durable Object by extending `YDurableObjects`. + + 4. **Client-side Typed Fetch with Hono RPC**: + + - Included a guide for creating a typed client using `hc` from `hono/client` to facilitate Hono RPC on the client side. + + 5. **Documentation Updates**: + - Updated the README with detailed examples and explanations for the new features and integrations. + - Ensured clarity and ease of understanding for developers looking to utilize the new functionalities. + ## 0.4.2 ### Patch Changes diff --git a/package.json b/package.json index 549ebfc..70c332d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "y-durableobjects", - "version": "0.4.2", + "version": "1.0.0", "type": "module", "main": "dist/index.cjs", "module": "dist/index.js",