Skip to content

Version Packages#382

Merged
threepointone merged 1 commit into
mainfrom
changeset-release/main
Apr 24, 2026
Merged

Version Packages#382
threepointone merged 1 commit into
mainfrom
changeset-release/main

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

partyserver@0.5.1

Patch Changes

  • #381 0274658 Thanks @threepointone! - Fix: restore legacy __ps_name storage fallback for framework bootstrap patterns.

    0.5.0 moved the legacy storage hydrate into alarm() only, breaking Cloudflare Agents facets and any other framework that writes __ps_name directly before calling __unsafe_ensureInitialized(). Facet DOs are spawned via ctx.facets.get(...) rather than idFromName() and therefore have ctx.id.name === undefined; they relied on PartyServer reading the storage record back to populate this.name before onStart().

    Changes:

    • Move the legacy __ps_name hydrate from alarm() into #ensureInitialized(), still gated on !ctx.id.name && !#_name so it costs nothing on the happy path (normal idFromName()/getByName() DOs skip the storage read entirely).
    • Server.fetch() now delegates to #ensureInitialized() for the hydrate instead of doing its own. The x-partykit-room header fallback remains as a last resort when neither ctx.id.name nor a legacy storage record is available.
    • Server.alarm() is simplified — it no longer needs its own hydrate call since #ensureInitialized() handles it.
    • setName()'s @deprecated docblock is softened to clarify that it remains appropriate for framework-level bootstrap of non-idFromName DOs (e.g. Agents facets), not just a deprecated compatibility shim.

@threepointone threepointone merged commit de99473 into main Apr 24, 2026
3 checks passed
@threepointone threepointone deleted the changeset-release/main branch April 24, 2026 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant