# What changed in partysocket

> 20 changes in partysocket 1 from its official release notes, upgrade guides and advisories: 2 breaking, 1 deprecations, 5 new APIs and options. Each one cited. Sources checked 2026-11-15. HTML: https://unstale.sh/npm/partysocket/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## partysocket 1

### Breaking changes

- close() dispatches its close event synchronously, and readyState reports CLOSED immediately after close() returns. (1.2.0) — [release notes](https://github.com/cloudflare/partykit/releases/tag/partysocket%401.2.0)
- Narrows the exported type from ArrayBufferView to ArrayBufferView<ArrayBuffer> to match DOM WebSocket.send() overloads; runtime behavior is unchanged. (1.1.18) — [release notes](https://github.com/cloudflare/partykit/releases/tag/partysocket%401.1.18)

### Deprecations

- Calling send() after close() emits a warning once per close cycle; the message remains buffered for backwards compatibility, and the warning resets on reconnect(). (1.2.0) — [release notes](https://github.com/cloudflare/partykit/releases/tag/partysocket%401.2.0)

### New APIs and options

- Adds an option that lets callers stop automatic reconnects for terminal close events while preserving reconnect-by-default behavior. (1.3.0) — [release notes](https://github.com/cloudflare/partykit/releases/tag/partysocket%401.3.0)
- Adds a method that removes and returns messages buffered by send() but never transmitted, allowing a discarded socket's unsent buffer to be handed to a replacement. (1.2.0) — [release notes](https://github.com/cloudflare/partykit/releases/tag/partysocket%401.2.0)
- Overrides buffered-message transfer behavior: true always transfers messages and false never transfers them. (1.2.0) — [release notes](https://github.com/cloudflare/partykit/releases/tag/partysocket%401.2.0)
- Adds an enabled prop for conditional connection control. (1.1.11) — [release notes](https://github.com/cloudflare/partykit/releases/tag/partysocket%401.1.11)
- Adds an enabled prop for conditional connection control. (1.1.11) — [release notes](https://github.com/cloudflare/partykit/releases/tag/partysocket%401.1.11)

### Behavior and default changes

- send() returns true when transmitted immediately and false when buffered or dropped because maxEnqueuedMessages was reached. (1.2.0) — [release notes](https://github.com/cloudflare/partykit/releases/tag/partysocket%401.2.0)
- When replacing a socket because connection options changed, hooks migrate buffered messages by default only if the destination is unchanged; messages for changed destinations are discarded with a warning. (1.2.0) — [release notes](https://github.com/cloudflare/partykit/releases/tag/partysocket%401.2.0)
- PartySocket is released as v1 after being described as pretty stable. (1.0.0) — [release notes](https://github.com/cloudflare/partykit/blob/HEAD/packages/partysocket/CHANGELOG.md)

### Fixes and other changes

- Fixes the module-scope random default. (1.1.19) — [release notes](https://github.com/cloudflare/partykit/releases/tag/partysocket%401.1.19)
- The protocols type now accepts ProtocolsProvider instead of string[], matching the full range of types supported by the underlying ReconnectingWebSocket. (1.1.17) — [release notes](https://github.com/cloudflare/partykit/releases/tag/partysocket%401.1.17)
- Declared react as an optional peer dependency so strict package managers like pnpm correctly resolve it for the partysocket/react and partysocket/use-ws subpath exports. (1.1.15) — [release notes](https://github.com/cloudflare/partykit/releases/tag/partysocket%401.1.15)
- On HMR or StrictMode effect re-runs, unchanged connection options now call socket.reconnect() to preserve socket identity; changed options still create a new socket. (1.1.14) — [release notes](https://github.com/cloudflare/partykit/releases/tag/partysocket%401.1.14)
- Fixes reconnect() after maxRetries has been exhausted by releasing _connectLock when the max retries early return is hit. (1.1.13) — [release notes](https://github.com/cloudflare/partykit/releases/tag/partysocket%401.1.13)
- Construction without room or basePath now throws a clear error unless startClosed: true, rather than connecting to a malformed URL. (1.1.12) — [release notes](https://github.com/cloudflare/partykit/releases/tag/partysocket%401.1.12)
- PartySocket.reconnect() now accepts basePath without room as sufficient context to construct a connection URL. (1.1.12) — [release notes](https://github.com/cloudflare/partykit/releases/tag/partysocket%401.1.12)
- Fixes a React Native/Expo TypeError by detecting those environments and using Node-style event cloning. (1.1.11) — [release notes](https://github.com/cloudflare/partykit/releases/tag/partysocket%401.1.11)
- Fixes invalid package exports, so developers can use the package's exports correctly. (1.1.10) — [release notes](https://github.com/cloudflare/partykit/releases/tag/partysocket%401.1.10)
