(change)
| 629 | } |
| 630 | |
| 631 | function addChange(change) { |
| 632 | const timestamp = safeString(change.timestamp, nowIso()); |
| 633 | const entry = { |
| 634 | id: uid("change"), |
| 635 | type: change.type, |
| 636 | path: typeof change.path === "string" ? change.path : undefined, |
| 637 | summary: safeString(change.summary, ""), |
| 638 | timestamp, |
| 639 | sectionId: typeof change.sectionId === "string" ? change.sectionId : undefined, |
| 640 | }; |
| 641 | stateCache.changeLog.unshift(entry); |
| 642 | stateCache.lastUpdated = timestamp; |
| 643 | return entry; |
| 644 | } |
| 645 | |
| 646 | function addNote(sectionId, text, author) { |
| 647 | const section = findSectionOrThrow(sectionId); |
no test coverage detected