Make connection state/setState properties configurable and validate room/basePath on construction
#319
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
partyserver: Addconfigurable: trueto thestate,setState,serializeAttachment, anddeserializeAttachmentproperty descriptors on connection objects. This allows downstream consumers (like the Cloudflare Agents SDK) to redefine these properties viaObject.definePropertyfor namespacing or wrapping internal state storage. Default behavior is unchanged.partysocket: Throw a clear error when constructing aPartySocketwithoutroomorbasePath(and withoutstartClosed: true), instead of silently connecting to a malformed URL containing"undefined"as the room name.Tests: Add tests for configurable property redefinition (both hibernating and non-hibernating paths),
setStateround-trip persistence, and the new constructor validation. Changedescribe.skip→describe.skipIf(!!process.env.GITHUB_ACTIONS)across partysocket tests so they run locally but remain skipped in CI. Fix port collision betweenreact-ssrandedge-casestest suites, and individually skip flaky WebSocket-connection-dependent hook tests.Test plan
GITHUB_ACTIONS=true): identical to previous behavior (45 partysocket + 12 partyserver pass)