Releases: cloudflare/partykit
partysync@2.0.0
partysub@2.0.0
partysocket@1.1.14
Patch Changes
- #335
659cedaThanks @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), callssocket.reconnect()to preserve identity; if changed, creates a new socket as before.
partyserver@0.2.0
Minor Changes
- #327
eef891aThanks @threepointone! - Addconnection.tagsproperty to read back tags assigned viagetConnectionTags(). Works in both hibernating and in-memory modes. Tags are validated and always include the connection id as the first tag.
Patch Changes
- #325
c15e9d9Thanks @threepointone! - Addlobby.classNametoonBeforeConnect/onBeforeRequestcallbacks, providing the Durable Object class name (e.g."MyAgent"). The existinglobby.partyfield 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
partysocket@1.1.13
Patch Changes
- #322
3ed3bf0Thanks @threepointone! - Fixreconnect()not working aftermaxRetrieshas been exhausted. The_connectLockwas not released when the max retries early return was hit in_connect(), preventing any subsequentreconnect()call from initiating a new connection.
partyserver@0.1.5
Patch Changes
- #323
353da20Thanks @threepointone! - Fix initialization race conditions and improve error resilience.getServerByNamenow propagates errors from the internalset-namerequest instead of silently swallowing them.onStartfailures no longer permanently brick the Durable Object. Errors are caught insideblockConcurrencyWhile(preserving the input gate) and the status is reset, allowing subsequent requests to retry initialization.fetch()now retries initialization when a previousonStartattempt failed, instead of skipping it because the name was already set.- Errors in
fetch()(includingonStartfailures 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 transientonStartfailures don't kill the connection — the next message will retry.
partyserver@0.1.4
Patch Changes
-
#320
9bd3f56Thanks @threepointone! - Add CORS support toroutePartykitRequest.Pass
cors: truefor permissive defaults orcors: { ...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 byonBeforeRequest. -
#260
84fe996Thanks @BlankParticle! - remove redundant initialize code as setName takes care of it, along with the nested blockConcurrencyWhile call
partysocket@1.1.12
Patch Changes
-
#317
e1e7b47Thanks @threepointone! - FixPartySocket.reconnect()crashing when usingbasePathwithoutroom. The reconnect guard now accepts eitherroomorbasePathas sufficient context to construct a connection URL. -
#319
15a4157Thanks @threepointone! - Throw a clear error when constructing aPartySocketwithoutroomorbasePath(and withoutstartClosed: true), instead of silently connecting to a malformed URL containing"undefined"as the room name.
partyserver@0.1.3
Patch Changes
- #319
15a4157Thanks @threepointone! - Addconfigurable: trueto thestate,setState,serializeAttachment, anddeserializeAttachmentproperty descriptors on connection objects. This allows downstream consumers (like the Cloudflare Agents SDK) to redefine these properties withObject.definePropertyfor namespacing or wrapping internal state storage. Default behavior is unchanged.