Skip to content

Commit db9ebac

Browse files
committed
Include sync order snapshot for postgres
1 parent 2e17504 commit db9ebac

File tree

2 files changed

+74
-8
lines changed

2 files changed

+74
-8
lines changed

modules/module-postgres-storage/test/src/__snapshots__/storage_sync.test.ts.snap

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,80 @@ exports[`sync - postgres > expiring token 2`] = `
127127
]
128128
`;
129129

130+
exports[`sync - postgres > sync buckets in order 1`] = `
131+
[
132+
{
133+
"checkpoint": {
134+
"buckets": [
135+
{
136+
"bucket": "b0[]",
137+
"checksum": 920318466,
138+
"count": 1,
139+
"priority": 2,
140+
},
141+
{
142+
"bucket": "b1[]",
143+
"checksum": -1382098757,
144+
"count": 1,
145+
"priority": 1,
146+
},
147+
],
148+
"last_op_id": "2",
149+
"write_checkpoint": undefined,
150+
},
151+
},
152+
{
153+
"data": {
154+
"after": "0",
155+
"bucket": "b1[]",
156+
"data": [
157+
{
158+
"checksum": 2912868539n,
159+
"data": "{"id":"earlier","description":"Test 2"}",
160+
"object_id": "earlier",
161+
"object_type": "test",
162+
"op": "PUT",
163+
"op_id": "2",
164+
"subkey": "243b0e26-87b2-578a-993c-5ac5b6f7fd64",
165+
},
166+
],
167+
"has_more": false,
168+
"next_after": "2",
169+
},
170+
},
171+
{
172+
"partial_checkpoint_complete": {
173+
"last_op_id": "2",
174+
"priority": 1,
175+
},
176+
},
177+
{
178+
"data": {
179+
"after": "0",
180+
"bucket": "b0[]",
181+
"data": [
182+
{
183+
"checksum": 920318466n,
184+
"data": "{"id":"t1","description":"Test 1"}",
185+
"object_id": "t1",
186+
"object_type": "test",
187+
"op": "PUT",
188+
"op_id": "1",
189+
"subkey": "02d285ac-4f96-5124-8fba-c6d1df992dd1",
190+
},
191+
],
192+
"has_more": false,
193+
"next_after": "1",
194+
},
195+
},
196+
{
197+
"checkpoint_complete": {
198+
"last_op_id": "2",
199+
},
200+
},
201+
]
202+
`;
203+
130204
exports[`sync - postgres > sync global data 1`] = `
131205
[
132206
{

package.json

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,5 @@
4141
"vite-tsconfig-paths": "^4.3.2",
4242
"vitest": "^2.1.1",
4343
"ws": "^8.2.3"
44-
},
45-
"pnpm": {
46-
"ignoredBuiltDependencies": [
47-
"esbuild"
48-
],
49-
"onlyBuiltDependencies": [
50-
"esbuild"
51-
]
5244
}
5345
}

0 commit comments

Comments
 (0)