(manifest: ArtifactManifest, file: string, now: string, note?: string)
| 109 | |
| 110 | /** Append a new version to a manifest and make it current (immutably). */ |
| 111 | export function addVersion(manifest: ArtifactManifest, file: string, now: string, note?: string): ArtifactManifest { |
| 112 | const v = nextVersionNumber(manifest); |
| 113 | return { |
| 114 | ...manifest, |
| 115 | updatedAt: now, |
| 116 | current: v, |
| 117 | versions: [...manifest.versions, { v, file, createdAt: now, ...(note ? { note } : {}) }], |
| 118 | }; |
| 119 | } |
| 120 | |
| 121 | // ── path helpers ────────────────────────────────────────────────────────────── |
| 122 |
no test coverage detected