Skip to content

chore(deps): bump partysocket from 1.1.19 to 1.2.0#1093

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/npm_and_yarn/partysocket-1.2.0
Open

chore(deps): bump partysocket from 1.1.19 to 1.2.0#1093
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/npm_and_yarn/partysocket-1.2.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Jun 17, 2026

Copy link
Copy Markdown
Contributor

Bumps partysocket from 1.1.19 to 1.2.0.

Release notes

Sourced from partysocket's releases.

partysocket@1.2.0

Minor Changes

  • #403 7e042eb Thanks @​threepointone! - Make buffered messages and connection teardown reliable across socket replacement and explicit close (see cloudflare/agents#1738).

    • close() now dispatches its close event synchronously (mirroring how reconnect() already dispatched its synthetic close). Consumers that detach their listeners right after closing — like the React hooks during cleanup — previously never observed the terminal close event, leaving "connection closed" handling (pending-call rejection, state resets) to never run. After close() returns, readyState reports CLOSED immediately, even while the underlying socket finishes its closing handshake. Code that attached a close listener after calling close() and relied on the event arriving asynchronously must attach the listener first.
    • send() now returns a boolean: true if the message was transmitted immediately over an open connection, false if it was buffered (delivered when the connection next opens, always before the open event is dispatched) or dropped because maxEnqueuedMessages was reached. Callers implementing request/response protocols can use this to know whether a request is actually in flight.
    • New drainQueuedMessages() method removes and returns all messages that were buffered by send() but never transmitted, so a socket that's being discarded can hand its unsent buffer to a replacement instead of silently losing it.
    • React hooks (usePartySocket, useWebSocket) now migrate buffered messages when they replace the socket because connection options changed. By default, buffered messages transfer only when the destination is unchanged (e.g. only query — credentials — changed); if destination options (room, party, path, host, URL, ...) changed, the messages are discarded with a warning rather than delivered to a destination they weren't composed for. The new transferEnqueuedMessages option overrides this: true always transfers, false never does.
    • Warn when send() is called after close(). Messages sent against a permanently closed socket are buffered into a queue that nothing will ever flush (unless reconnect() is called later), which silently strands the message — and any caller waiting on a reply. This usually indicates a stale socket reference in the caller. The message is still buffered for backwards compatibility; the warning is emitted once per close cycle and resets on reconnect().
Changelog

Sourced from partysocket's changelog.

1.2.0

Minor Changes

  • #403 7e042eb Thanks @​threepointone! - Make buffered messages and connection teardown reliable across socket replacement and explicit close (see cloudflare/agents#1738).
    • close() now dispatches its close event synchronously (mirroring how reconnect() already dispatched its synthetic close). Consumers that detach their listeners right after closing — like the React hooks during cleanup — previously never observed the terminal close event, leaving "connection closed" handling (pending-call rejection, state resets) to never run. After close() returns, readyState reports CLOSED immediately, even while the underlying socket finishes its closing handshake. Code that attached a close listener after calling close() and relied on the event arriving asynchronously must attach the listener first.
    • send() now returns a boolean: true if the message was transmitted immediately over an open connection, false if it was buffered (delivered when the connection next opens, always before the open event is dispatched) or dropped because maxEnqueuedMessages was reached. Callers implementing request/response protocols can use this to know whether a request is actually in flight.
    • New drainQueuedMessages() method removes and returns all messages that were buffered by send() but never transmitted, so a socket that's being discarded can hand its unsent buffer to a replacement instead of silently losing it.
    • React hooks (usePartySocket, useWebSocket) now migrate buffered messages when they replace the socket because connection options changed. By default, buffered messages transfer only when the destination is unchanged (e.g. only query — credentials — changed); if destination options (room, party, path, host, URL, ...) changed, the messages are discarded with a warning rather than delivered to a destination they weren't composed for. The new transferEnqueuedMessages option overrides this: true always transfers, false never does.
    • Warn when send() is called after close(). Messages sent against a permanently closed socket are buffered into a queue that nothing will ever flush (unless reconnect() is called later), which silently strands the message — and any caller waiting on a reply. This usually indicates a stale socket reference in the caller. The message is still buffered for backwards compatibility; the warning is emitted once per close cycle and resets on reconnect().
Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [partysocket](https://github.com/cloudflare/partykit/tree/HEAD/packages/partysocket) from 1.1.19 to 1.2.0.
- [Release notes](https://github.com/cloudflare/partykit/releases)
- [Changelog](https://github.com/cloudflare/partykit/blob/main/packages/partysocket/CHANGELOG.md)
- [Commits](https://github.com/cloudflare/partykit/commits/partysocket@1.2.0/packages/partysocket)

---
updated-dependencies:
- dependency-name: partysocket
  dependency-version: 1.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants