diff --git a/.changeset/stale-task-signals.md b/.changeset/stale-task-signals.md deleted file mode 100644 index e7c8f4d..0000000 --- a/.changeset/stale-task-signals.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"effect-machine": patch ---- - -A task's success or failure event and a `.timeout` event now belong to the state entry that started them. The actor drops such an event when that entry has ended before the event leaves the mailbox. Before this change, a task that completed (or a timer that fired) while another event left the state queued its event behind that event, and a later entry of the same state processed it: after `.reenter`, or after a round trip such as `A -> B -> A`. Handlers had to compare a lease or an entry id in the event with the state to ignore it. An entry ends on a change of state tag or on `.reenter`. A same-tag `.on` transition keeps the entry, so its task and timer events still arrive. A stale event is dropped before any hook sees it, and it is never postponed. Events that a `.spawn` handler sends with `self.send` are not owned and are delivered as before. diff --git a/CHANGELOG.md b/CHANGELOG.md index fe0c22c..69ad586 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # effect-machine +## 0.32.1 + +### Patch Changes + +- [#100](https://github.com/cevr/effect-machine/pull/100) [`f24a768`](https://github.com/cevr/effect-machine/commit/f24a768baaef458f28498fa8ef47f03fc5fcb1d4) Thanks [@cevr](https://github.com/cevr)! - A task's success or failure event and a `.timeout` event now belong to the state entry that started them. The actor drops such an event when that entry has ended before the event leaves the mailbox. Before this change, a task that completed (or a timer that fired) while another event left the state queued its event behind that event, and a later entry of the same state processed it: after `.reenter`, or after a round trip such as `A -> B -> A`. Handlers had to compare a lease or an entry id in the event with the state to ignore it. An entry ends on a change of state tag or on `.reenter`. A same-tag `.on` transition keeps the entry, so its task and timer events still arrive. A stale event is dropped before any hook sees it, and it is never postponed. Events that a `.spawn` handler sends with `self.send` are not owned and are delivered as before. + ## 0.32.0 ### Minor Changes diff --git a/package.json b/package.json index 564fb30..56aec47 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "effect-machine", - "version": "0.32.0", + "version": "0.32.1", "repository": { "type": "git", "url": "https://github.com/cevr/effect-machine.git"