Skip to content

Releases: cloudflare/partykit

partysync@2.0.0

20 Feb 09:49

Choose a tag to compare

Patch Changes

partysub@2.0.0

20 Feb 09:49

Choose a tag to compare

Patch Changes

partysocket@1.1.14

20 Feb 09:49

Choose a tag to compare

Patch Changes

  • #335 659ceda Thanks @deathbyknowledge! - Fix useStableSocket replacing socket on HMR/StrictMode effect re-runs. When Vite HMR fires, React Fast Refresh re-runs all effects — the old code unconditionally created a new socket, breaking downstream references (event listeners, _pk identity, etc.). Now detects whether connection options actually changed via referential equality on the memoized options object: if unchanged (HMR), calls socket.reconnect() to preserve identity; if changed, creates a new socket as before.

partyserver@0.2.0

20 Feb 09:49

Choose a tag to compare

Minor Changes

  • #327 eef891a Thanks @threepointone! - Add connection.tags property to read back tags assigned via getConnectionTags(). Works in both hibernating and in-memory modes. Tags are validated and always include the connection id as the first tag.

Patch Changes

  • #325 c15e9d9 Thanks @threepointone! - Add lobby.className to onBeforeConnect/onBeforeRequest callbacks, providing the Durable Object class name (e.g. "MyAgent"). The existing lobby.party field is now deprecated (it returns the kebab-case URL namespace) and will be changed to return the class name in the next major version.

hono-party@2.0.0

20 Feb 09:49

Choose a tag to compare

Patch Changes

partysocket@1.1.13

09 Feb 03:34

Choose a tag to compare

Patch Changes

  • #322 3ed3bf0 Thanks @threepointone! - Fix reconnect() not working after maxRetries has been exhausted. The _connectLock was not released when the max retries early return was hit in _connect(), preventing any subsequent reconnect() call from initiating a new connection.

partyserver@0.1.5

09 Feb 11:26

Choose a tag to compare

Patch Changes

  • #323 353da20 Thanks @threepointone! - Fix initialization race conditions and improve error resilience.
    • getServerByName now propagates errors from the internal set-name request instead of silently swallowing them.
    • onStart failures no longer permanently brick the Durable Object. Errors are caught inside blockConcurrencyWhile (preserving the input gate) and the status is reset, allowing subsequent requests to retry initialization.
    • fetch() now retries initialization when a previous onStart attempt failed, instead of skipping it because the name was already set.
    • Errors in fetch() (including onStart failures and malformed props) are now caught and returned as proper 500 responses instead of crashing as unhandled exceptions.
    • WebSocket handlers (webSocketMessage, webSocketClose, webSocketError) are now wrapped in try/catch so that transient onStart failures don't kill the connection — the next message will retry.

partyserver@0.1.4

09 Feb 03:34

Choose a tag to compare

Patch Changes

  • #320 9bd3f56 Thanks @threepointone! - Add CORS support to routePartykitRequest.

    Pass cors: true for permissive defaults or cors: { ...headers } for custom CORS headers. Preflight (OPTIONS) requests are handled automatically for matched routes, and CORS headers are appended to all non-WebSocket responses — including responses returned by onBeforeRequest.

  • #260 84fe996 Thanks @BlankParticle! - remove redundant initialize code as setName takes care of it, along with the nested blockConcurrencyWhile call

partysocket@1.1.12

08 Feb 18:33

Choose a tag to compare

Patch Changes

  • #317 e1e7b47 Thanks @threepointone! - Fix PartySocket.reconnect() crashing when using basePath without room. The reconnect guard now accepts either room or basePath as sufficient context to construct a connection URL.

  • #319 15a4157 Thanks @threepointone! - Throw a clear error when constructing a PartySocket without room or basePath (and without startClosed: true), instead of silently connecting to a malformed URL containing "undefined" as the room name.

partyserver@0.1.3

08 Feb 18:33

Choose a tag to compare

Patch Changes

  • #319 15a4157 Thanks @threepointone! - Add configurable: true to the state, setState, serializeAttachment, and deserializeAttachment property descriptors on connection objects. This allows downstream consumers (like the Cloudflare Agents SDK) to redefine these properties with Object.defineProperty for namespacing or wrapping internal state storage. Default behavior is unchanged.