Version Packages#1051
Merged
Merged
Conversation
8b0f5cb to
b96e7c3
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
agents@0.7.2
Patch Changes
#1050
6157741Thanks @ask-bonk! - Fix Agent alarm() bypassing PartyServer's initializationThe Agent class defined
alarmas apublic readonlyarrow function property, which completely shadowed PartyServer'salarm()prototype method. This meant#ensureInitialized()was never called when a Durable Object woke via alarm (e.g. fromscheduleEvery), causingthis.nameto throw andonStartto never run.Converted
alarmfrom an arrow function property to a regular async method that callssuper.alarm()before processing scheduled tasks. Also added anonAlarm()no-op override to suppress PartyServer's default warning log.#1052
f1e2bfaThanks @ask-bonk! - MakescheduleEvery()idempotentscheduleEvery()now deduplicates by the combination of callback name, interval, and payload: calling it multiple times with the same arguments returns the existing schedule instead of creating a duplicate. A different interval or payload creates a separate, independent schedule.This fixes the common pattern of calling
scheduleEvery()insideonStart(), which runs on every Durable Object wake. Previously each wake created a new interval schedule, leading to a thundering herd of duplicate executions.