Skip to content

Commit

Permalink
Version Packages (#51)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and github-actions[bot] authored Aug 6, 2024
1 parent 0446fbd commit cb8c9b5
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 35 deletions.
34 changes: 0 additions & 34 deletions .changeset/healthy-penguins-sing.md

This file was deleted.

35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit cb8c9b5

Please sign in to comment.