Skip to content

Comments

[pull] main from cloudflare:main#108

Merged
pull[bot] merged 11 commits intocode:mainfrom
cloudflare:main
Feb 23, 2026
Merged

[pull] main from cloudflare:main#108
pull[bot] merged 11 commits intocode:mainfrom
cloudflare:main

Conversation

@pull
Copy link

@pull pull bot commented Feb 23, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

threepointone and others added 11 commits February 22, 2026 16:31
Persist the Durable Object server name so it survives cold starts and is available inside onStart/onAlarm and scheduled callbacks. Introduces a NAME_STORAGE_KEY constant and has setName write the name to storage; fetch(), alarms and ws handlers hydrate the name from storage via a new #ensureInitialized() helper. Adds tests and two test DOs (AlarmNameServer, NoNameServer) plus wrangler test config updates; updates package peer/dev dependency ranges for partyserver and bumps partysocket. Adds a changeset entry and enables an experimental changesets option.
Replace wrangler migration entries from `new_classes` to `new_sqlite_classes` across fixtures and READMEs and add a changeset documenting that partyserver now relies on SQLite-backed Durable Objects (synchronous storage). Update use-socket logic to track option changes while disabled, ensure correct socket creation/cleanup on re-enable and StrictMode/HMR, and always connect replacement sockets. Expand tests in partysocket to cover these re-enable, token-refresh, cleanup, and wire-level scenarios. Breaking: Durable Object namespaces must use `new_sqlite_classes` when deployed.
Replace synchronous ctx.storage.kv usage with the async ctx.storage.get/put for persisting Server.name. Add a #hydrateNameFromStorage() helper and call it from entry points (#ensureInitialized and fetch path) so the name is loaded on cold starts; await storage.put when setting the name. Update tests to await ctx.storage.put. Add a changeset documenting the migration and remove the previous changeset that required SQLite-backed Durable Objects.
Stop storing the server name on ConnectionAttachments and in accept() options; instead populate connection.server at runtime from Server.name. Adjusted tryGetPartyServerMeta, connection serialization, and ConnectionManager.accept signatures accordingly. Updated index to set connection.server before invoking handlers, and updated tests/worker to expect the runtime-populated value. Marked the Connection.server type as deprecated in types.ts.
Specify explicit reconnection parameters in the react-hooks wire tests to control retry behavior during testing and reduce flakiness. Adds minReconnectionDelay: 50, maxReconnectionDelay: 200, and connectionTimeout: 2000 for the affected test cases.
Re-enable and stabilize many flaky partysocket tests by introducing a FAST_RECONNECT config and applying it across tests (min/max reconnection delays and connectionTimeout). Adjusted test timeouts, waitFor durations, and small timing delays to reduce flakiness; added explicit maxRetries and connectionTimeout in places. Also updated an error-handling test to set connectionTimeout and extended its wait period. In partyserver index, removed stray TODO/commented lines and top-of-file notes to tidy the file.
Pass the Hono Context (c) as a third argument to onBeforeConnect/onBeforeRequest callbacks so handlers can access c.env, c.var, c.get(), etc. Adds a .changeset for a patch release, updates the Hono fixture and README to demonstrate using env bindings, and implements HonoPartyServerOptions plus wrapOptionsWithContext to close over the Hono context. Also adjusts middleware and handler wiring (createMiddleware generic, options wrapping, and handler signatures) to forward the context to partyserver callbacks.
Add an explicit, optional React peerDependency for partysocket so strict package managers (e.g. pnpm) correctly resolve react for the partysocket/react and partysocket/use-ws subpath exports. This includes a new changeset and package.json updates. Also: tighten test typings (import and use WsWebSocket instead of any), rename an unused handler param to _lobby to avoid linter noise, and add explanatory comments plus a biome-ignore on the memoized socket options to avoid unnecessary reconnects when callers pass inline option objects.
@pull pull bot locked and limited conversation to collaborators Feb 23, 2026
@pull pull bot added the ⤵️ pull label Feb 23, 2026
@pull pull bot merged commit 28bf017 into code:main Feb 23, 2026
0 of 2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants