Version Packages#380
Merged
Merged
Conversation
b16518a to
c75b343
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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
hono-party@2.1.0
Minor Changes
#378
f3ab44fThanks @threepointone! - Use nativectx.id.nameto populatethis.name.Durable Objects now expose
ctx.id.nameon every entry point (constructor, fetch, alarm, hibernating websocket handlers) when the DO is addressed viaidFromName()/getByName(). PartyServer now uses this as the primary source ofthis.name, which simplifies routing, eliminates storage writes, and makesthis.nameavailable inside the constructor.Changes in
partyserver:this.nameresolves fromthis.ctx.id.name. The apologeticworkerd#2240error message is gone.this.nameis now available inside the constructor and from class field initializers, not just aftersetName()/fetch()has run.routePartykitRequestno longer issues asetName()/_initAndFetch()RPC beforefetch(). The WebSocket path goes from 2 RPCs to 1; the HTTP path remains 1 RPC. Props, when supplied, are delivered to the DO via thex-partykit-propsrequest header, set afteronBeforeConnect/onBeforeRequesthooks run.getServerByNamecontinues to perform a single RPC to ensureonStart()has completed before returning, so user-defined RPC methods on the returned stub can rely on initialization being done. That RPC is now cheaper internally (no storage write; name is read fromctx.id.name).Serverno longer writes the__ps_namerecord to storage. Existing records remain on disk for backward compatibility and are only read insidealarm()as a fallback for alarms that were scheduled before 2026-03-15 (wherectx.id.nameis not carried into the alarm handler — see the Durable Objects ID docs).setName()and_initAndFetch()are marked@deprecated. They continue to work for backward compatibility.setName(name)now throws ifnamedoes not matchctx.id.name.x-partykit-roomheader is still accepted as a fallback whenctx.id.nameis not available.idFromString()/newUniqueId(), runtime too old to exposectx.id.name, or directstub.fetch()withoutroutePartykitRequest/getServerByName).this.namethrows, it is becausectx.id.nameis undefined and no legacy fallback has populated the name: the DO was addressed viaidFromString()ornewUniqueId()(both unsupported), the runtime is too old to exposectx.id.name, or a pre-2026-03-15 alarm fired before the legacy storage fallback ran.Changes in all affected packages (
partyserver,partysub,partysync,y-partyserver,hono-party):@cloudflare/workers-typespeer dependency bumped from^4.20240729.0to^4.20260424.1. The old range predatesctx.id.namein the type surface.Not supported: addressing PartyServer DOs via
idFromString()ornewUniqueId(). These paths returnctx.id.name === undefinedinside the DO and will surface as a clear error fromthis.name. PartyServer has always assumed name-based addressing viagetServerByName/routePartykitRequest; this release makes that assumption explicit.partyserver@0.5.0
Minor Changes
#378
f3ab44fThanks @threepointone! - Use nativectx.id.nameto populatethis.name.Durable Objects now expose
ctx.id.nameon every entry point (constructor, fetch, alarm, hibernating websocket handlers) when the DO is addressed viaidFromName()/getByName(). PartyServer now uses this as the primary source ofthis.name, which simplifies routing, eliminates storage writes, and makesthis.nameavailable inside the constructor.Changes in
partyserver:this.nameresolves fromthis.ctx.id.name. The apologeticworkerd#2240error message is gone.this.nameis now available inside the constructor and from class field initializers, not just aftersetName()/fetch()has run.routePartykitRequestno longer issues asetName()/_initAndFetch()RPC beforefetch(). The WebSocket path goes from 2 RPCs to 1; the HTTP path remains 1 RPC. Props, when supplied, are delivered to the DO via thex-partykit-propsrequest header, set afteronBeforeConnect/onBeforeRequesthooks run.getServerByNamecontinues to perform a single RPC to ensureonStart()has completed before returning, so user-defined RPC methods on the returned stub can rely on initialization being done. That RPC is now cheaper internally (no storage write; name is read fromctx.id.name).Serverno longer writes the__ps_namerecord to storage. Existing records remain on disk for backward compatibility and are only read insidealarm()as a fallback for alarms that were scheduled before 2026-03-15 (wherectx.id.nameis not carried into the alarm handler — see the Durable Objects ID docs).setName()and_initAndFetch()are marked@deprecated. They continue to work for backward compatibility.setName(name)now throws ifnamedoes not matchctx.id.name.x-partykit-roomheader is still accepted as a fallback whenctx.id.nameis not available.idFromString()/newUniqueId(), runtime too old to exposectx.id.name, or directstub.fetch()withoutroutePartykitRequest/getServerByName).this.namethrows, it is becausectx.id.nameis undefined and no legacy fallback has populated the name: the DO was addressed viaidFromString()ornewUniqueId()(both unsupported), the runtime is too old to exposectx.id.name, or a pre-2026-03-15 alarm fired before the legacy storage fallback ran.Changes in all affected packages (
partyserver,partysub,partysync,y-partyserver,hono-party):@cloudflare/workers-typespeer dependency bumped from^4.20240729.0to^4.20260424.1. The old range predatesctx.id.namein the type surface.Not supported: addressing PartyServer DOs via
idFromString()ornewUniqueId(). These paths returnctx.id.name === undefinedinside the DO and will surface as a clear error fromthis.name. PartyServer has always assumed name-based addressing viagetServerByName/routePartykitRequest; this release makes that assumption explicit.partysub@2.1.0
Minor Changes
#378
f3ab44fThanks @threepointone! - Use nativectx.id.nameto populatethis.name.Durable Objects now expose
ctx.id.nameon every entry point (constructor, fetch, alarm, hibernating websocket handlers) when the DO is addressed viaidFromName()/getByName(). PartyServer now uses this as the primary source ofthis.name, which simplifies routing, eliminates storage writes, and makesthis.nameavailable inside the constructor.Changes in
partyserver:this.nameresolves fromthis.ctx.id.name. The apologeticworkerd#2240error message is gone.this.nameis now available inside the constructor and from class field initializers, not just aftersetName()/fetch()has run.routePartykitRequestno longer issues asetName()/_initAndFetch()RPC beforefetch(). The WebSocket path goes from 2 RPCs to 1; the HTTP path remains 1 RPC. Props, when supplied, are delivered to the DO via thex-partykit-propsrequest header, set afteronBeforeConnect/onBeforeRequesthooks run.getServerByNamecontinues to perform a single RPC to ensureonStart()has completed before returning, so user-defined RPC methods on the returned stub can rely on initialization being done. That RPC is now cheaper internally (no storage write; name is read fromctx.id.name).Serverno longer writes the__ps_namerecord to storage. Existing records remain on disk for backward compatibility and are only read insidealarm()as a fallback for alarms that were scheduled before 2026-03-15 (wherectx.id.nameis not carried into the alarm handler — see the Durable Objects ID docs).setName()and_initAndFetch()are marked@deprecated. They continue to work for backward compatibility.setName(name)now throws ifnamedoes not matchctx.id.name.x-partykit-roomheader is still accepted as a fallback whenctx.id.nameis not available.idFromString()/newUniqueId(), runtime too old to exposectx.id.name, or directstub.fetch()withoutroutePartykitRequest/getServerByName).this.namethrows, it is becausectx.id.nameis undefined and no legacy fallback has populated the name: the DO was addressed viaidFromString()ornewUniqueId()(both unsupported), the runtime is too old to exposectx.id.name, or a pre-2026-03-15 alarm fired before the legacy storage fallback ran.Changes in all affected packages (
partyserver,partysub,partysync,y-partyserver,hono-party):@cloudflare/workers-typespeer dependency bumped from^4.20240729.0to^4.20260424.1. The old range predatesctx.id.namein the type surface.Not supported: addressing PartyServer DOs via
idFromString()ornewUniqueId(). These paths returnctx.id.name === undefinedinside the DO and will surface as a clear error fromthis.name. PartyServer has always assumed name-based addressing viagetServerByName/routePartykitRequest; this release makes that assumption explicit.partysync@2.1.0
Minor Changes
#378
f3ab44fThanks @threepointone! - Use nativectx.id.nameto populatethis.name.Durable Objects now expose
ctx.id.nameon every entry point (constructor, fetch, alarm, hibernating websocket handlers) when the DO is addressed viaidFromName()/getByName(). PartyServer now uses this as the primary source ofthis.name, which simplifies routing, eliminates storage writes, and makesthis.nameavailable inside the constructor.Changes in
partyserver:this.nameresolves fromthis.ctx.id.name. The apologeticworkerd#2240error message is gone.this.nameis now available inside the constructor and from class field initializers, not just aftersetName()/fetch()has run.routePartykitRequestno longer issues asetName()/_initAndFetch()RPC beforefetch(). The WebSocket path goes from 2 RPCs to 1; the HTTP path remains 1 RPC. Props, when supplied, are delivered to the DO via thex-partykit-propsrequest header, set afteronBeforeConnect/onBeforeRequesthooks run.getServerByNamecontinues to perform a single RPC to ensureonStart()has completed before returning, so user-defined RPC methods on the returned stub can rely on initialization being done. That RPC is now cheaper internally (no storage write; name is read fromctx.id.name).Serverno longer writes the__ps_namerecord to storage. Existing records remain on disk for backward compatibility and are only read insidealarm()as a fallback for alarms that were scheduled before 2026-03-15 (wherectx.id.nameis not carried into the alarm handler — see the Durable Objects ID docs).setName()and_initAndFetch()are marked@deprecated. They continue to work for backward compatibility.setName(name)now throws ifnamedoes not matchctx.id.name.x-partykit-roomheader is still accepted as a fallback whenctx.id.nameis not available.idFromString()/newUniqueId(), runtime too old to exposectx.id.name, or directstub.fetch()withoutroutePartykitRequest/getServerByName).this.namethrows, it is becausectx.id.nameis undefined and no legacy fallback has populated the name: the DO was addressed viaidFromString()ornewUniqueId()(both unsupported), the runtime is too old to exposectx.id.name, or a pre-2026-03-15 alarm fired before the legacy storage fallback ran.Changes in all affected packages (
partyserver,partysub,partysync,y-partyserver,hono-party):@cloudflare/workers-typespeer dependency bumped from^4.20240729.0to^4.20260424.1. The old range predatesctx.id.namein the type surface.Not supported: addressing PartyServer DOs via
idFromString()ornewUniqueId(). These paths returnctx.id.name === undefinedinside the DO and will surface as a clear error fromthis.name. PartyServer has always assumed name-based addressing viagetServerByName/routePartykitRequest; this release makes that assumption explicit.y-partyserver@2.2.0
Minor Changes
#378
f3ab44fThanks @threepointone! - Use nativectx.id.nameto populatethis.name.Durable Objects now expose
ctx.id.nameon every entry point (constructor, fetch, alarm, hibernating websocket handlers) when the DO is addressed viaidFromName()/getByName(). PartyServer now uses this as the primary source ofthis.name, which simplifies routing, eliminates storage writes, and makesthis.nameavailable inside the constructor.Changes in
partyserver:this.nameresolves fromthis.ctx.id.name. The apologeticworkerd#2240error message is gone.this.nameis now available inside the constructor and from class field initializers, not just aftersetName()/fetch()has run.routePartykitRequestno longer issues asetName()/_initAndFetch()RPC beforefetch(). The WebSocket path goes from 2 RPCs to 1; the HTTP path remains 1 RPC. Props, when supplied, are delivered to the DO via thex-partykit-propsrequest header, set afteronBeforeConnect/onBeforeRequesthooks run.getServerByNamecontinues to perform a single RPC to ensureonStart()has completed before returning, so user-defined RPC methods on the returned stub can rely on initialization being done. That RPC is now cheaper internally (no storage write; name is read fromctx.id.name).Serverno longer writes the__ps_namerecord to storage. Existing records remain on disk for backward compatibility and are only read insidealarm()as a fallback for alarms that were scheduled before 2026-03-15 (wherectx.id.nameis not carried into the alarm handler — see the Durable Objects ID docs).setName()and_initAndFetch()are marked@deprecated. They continue to work for backward compatibility.setName(name)now throws ifnamedoes not matchctx.id.name.x-partykit-roomheader is still accepted as a fallback whenctx.id.nameis not available.idFromString()/newUniqueId(), runtime too old to exposectx.id.name, or directstub.fetch()withoutroutePartykitRequest/getServerByName).this.namethrows, it is becausectx.id.nameis undefined and no legacy fallback has populated the name: the DO was addressed viaidFromString()ornewUniqueId()(both unsupported), the runtime is too old to exposectx.id.name, or a pre-2026-03-15 alarm fired before the legacy storage fallback ran.Changes in all affected packages (
partyserver,partysub,partysync,y-partyserver,hono-party):@cloudflare/workers-typespeer dependency bumped from^4.20240729.0to^4.20260424.1. The old range predatesctx.id.namein the type surface.Not supported: addressing PartyServer DOs via
idFromString()ornewUniqueId(). These paths returnctx.id.name === undefinedinside the DO and will surface as a clear error fromthis.name. PartyServer has always assumed name-based addressing viagetServerByName/routePartykitRequest; this release makes that assumption explicit.partywhen@0.1.5
Patch Changes
f3ab44f]: