From db9ebac93b99c70a4045b912b588dffd9bef34de Mon Sep 17 00:00:00 2001 From: Simon Binder Date: Mon, 10 Feb 2025 15:58:55 +0100 Subject: [PATCH] Include sync order snapshot for postgres --- .../__snapshots__/storage_sync.test.ts.snap | 74 +++++++++++++++++++ package.json | 8 -- 2 files changed, 74 insertions(+), 8 deletions(-) diff --git a/modules/module-postgres-storage/test/src/__snapshots__/storage_sync.test.ts.snap b/modules/module-postgres-storage/test/src/__snapshots__/storage_sync.test.ts.snap index aed3dddc..52af71a0 100644 --- a/modules/module-postgres-storage/test/src/__snapshots__/storage_sync.test.ts.snap +++ b/modules/module-postgres-storage/test/src/__snapshots__/storage_sync.test.ts.snap @@ -127,6 +127,80 @@ exports[`sync - postgres > expiring token 2`] = ` ] `; +exports[`sync - postgres > sync buckets in order 1`] = ` +[ + { + "checkpoint": { + "buckets": [ + { + "bucket": "b0[]", + "checksum": 920318466, + "count": 1, + "priority": 2, + }, + { + "bucket": "b1[]", + "checksum": -1382098757, + "count": 1, + "priority": 1, + }, + ], + "last_op_id": "2", + "write_checkpoint": undefined, + }, + }, + { + "data": { + "after": "0", + "bucket": "b1[]", + "data": [ + { + "checksum": 2912868539n, + "data": "{"id":"earlier","description":"Test 2"}", + "object_id": "earlier", + "object_type": "test", + "op": "PUT", + "op_id": "2", + "subkey": "243b0e26-87b2-578a-993c-5ac5b6f7fd64", + }, + ], + "has_more": false, + "next_after": "2", + }, + }, + { + "partial_checkpoint_complete": { + "last_op_id": "2", + "priority": 1, + }, + }, + { + "data": { + "after": "0", + "bucket": "b0[]", + "data": [ + { + "checksum": 920318466n, + "data": "{"id":"t1","description":"Test 1"}", + "object_id": "t1", + "object_type": "test", + "op": "PUT", + "op_id": "1", + "subkey": "02d285ac-4f96-5124-8fba-c6d1df992dd1", + }, + ], + "has_more": false, + "next_after": "1", + }, + }, + { + "checkpoint_complete": { + "last_op_id": "2", + }, + }, +] +`; + exports[`sync - postgres > sync global data 1`] = ` [ { diff --git a/package.json b/package.json index 0eb712e8..d797d35a 100644 --- a/package.json +++ b/package.json @@ -41,13 +41,5 @@ "vite-tsconfig-paths": "^4.3.2", "vitest": "^2.1.1", "ws": "^8.2.3" - }, - "pnpm": { - "ignoredBuiltDependencies": [ - "esbuild" - ], - "onlyBuiltDependencies": [ - "esbuild" - ] } }