commit
Function: commit()
commit(
delta,meta?):Promise<VersionedPatch>
Defined in: packages/versioning/src/history.ts:122
Wrap a Delta with commit metadata AND compute a content-addressed id
via hash(). The resulting id is a 64-char hex SHA-256 fingerprint of
the patch's content — stable across runtimes, deterministic, and unique
per (delta, timestamp, author, message) tuple.
For the common case where you want a git-like commit record, prefer
commit() over manually wiring wrap() + hash().
Parameters
delta
the delta to commit
meta?
Omit<VersionedPatchMeta, "id"> = {}
optional metadata (timestamp, author, message); id is computed automatically
Returns
Promise<VersionedPatch>
a VersionedPatch with a content-addressed id field set