diff --git a/.changeset/angry-chicken-float.md b/.changeset/angry-chicken-float.md new file mode 100644 index 00000000000..5759975d848 --- /dev/null +++ b/.changeset/angry-chicken-float.md @@ -0,0 +1,5 @@ +--- +'@atproto/repo': patch +--- + +repo commit object prev field is nullable, but no longer nullable diff --git a/packages/repo/src/types.ts b/packages/repo/src/types.ts index 7aeaba03fca..e9debe013ed 100644 --- a/packages/repo/src/types.ts +++ b/packages/repo/src/types.ts @@ -16,7 +16,7 @@ const unsignedCommit = z.object({ data: common.cid, rev: z.string(), // `prev` added for backwards compatibility with v2, no requirement of keeping around history - prev: common.cid.nullable().optional(), + prev: common.cid.nullable(), }) export type UnsignedCommit = z.infer & { sig?: never } @@ -25,7 +25,7 @@ const commit = z.object({ version: z.literal(3), data: common.cid, rev: z.string(), - prev: common.cid.nullable().optional(), + prev: common.cid.nullable(), sig: common.bytes, }) export type Commit = z.infer