[monorepo] downgrade ranges ids back to strings for now (#36857)

GitOrigin-RevId: 6c85715bc85adc2f641bfd0e9f3bb6a8f2c839c2
This commit is contained in:
Jakob Ackermann
2026-09-17 12:03:33 +00:00
committed by Copybot
parent 91bf8f13ba
commit 9b44fd075b
3 changed files with 7 additions and 5 deletions
+2 -2
View File
@@ -62,13 +62,13 @@ const trackedChangeMetadata = z.strictObject({
}) })
const comment = z.strictObject({ const comment = z.strictObject({
id: zz.objectId().optional(), id: z.string().optional(),
op: commentOp, op: commentOp,
metadata: commentMetadata.optional(), metadata: commentMetadata.optional(),
}) })
const trackedChange = z.strictObject({ const trackedChange = z.strictObject({
id: zz.objectId().optional(), id: z.string().optional(),
op: insertOp.or(deleteOp), op: insertOp.or(deleteOp),
metadata: trackedChangeMetadata, metadata: trackedChangeMetadata,
}) })
@@ -75,7 +75,8 @@ describe('schemas', function () {
expect(result.success).to.equal(true) expect(result.success).to.equal(true)
}) })
it('rejects a tracked change with a non-ObjectId id', function () { // eslint-disable-next-line mocha/no-pending-tests
it.skip('rejects a tracked change with a non-ObjectId id', function () {
const result = ranges.safeParse({ const result = ranges.safeParse({
changes: [{ id: 'tc_1000001', op: { i: 'foo', p: 0 }, metadata }], changes: [{ id: 'tc_1000001', op: { i: 'foo', p: 0 }, metadata }],
}) })
@@ -119,7 +120,8 @@ describe('schemas', function () {
expect(result.success).to.equal(true) expect(result.success).to.equal(true)
}) })
it('rejects a comment with a non-ObjectId id', function () { // eslint-disable-next-line mocha/no-pending-tests
it.skip('rejects a comment with a non-ObjectId id', function () {
const result = ranges.safeParse({ const result = ranges.safeParse({
comments: [{ id: 'thread-id-1', op: { c: 'foo', p: 0, t: threadId } }], comments: [{ id: 'thread-id-1', op: { c: 'foo', p: 0, t: threadId } }],
}) })
@@ -494,7 +494,7 @@ const acceptChangesSchema = z.object({
change_id: zz.objectId().optional(), change_id: zz.objectId().optional(),
}), }),
body: z.strictObject({ body: z.strictObject({
change_ids: z.array(zz.objectId()).optional(), change_ids: z.array(z.string()).optional(),
}), }),
}) })