fix: stabilize rectification staging release

This commit is contained in:
Jesse_Chen
2026-07-29 18:17:46 +08:00
parent ee9d432762
commit 163d3fd1be
12 changed files with 317 additions and 11 deletions
@@ -15,6 +15,12 @@ export function latestEventRevisions(revisions: readonly LifeEventRevision[]): r
return [...latest.values()].sort((left, right) => left.eventId.localeCompare(right.eventId));
}
export function chronologicalEvents(events: readonly LifeEventRevision[]): readonly LifeEventRevision[] {
return [...events].sort((left, right) => left.createdAt.localeCompare(right.createdAt)
|| left.eventId.localeCompare(right.eventId)
|| left.revision - right.revision);
}
export function appendEventRevision(
revisions: readonly LifeEventRevision[],
input: NewEventRevision,