feat(w5): ship v2.0.0 platform sync, undo persistence, and updates

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-08 18:24:51 +08:00
parent cb6b4c3731
commit fe421ffc55
60 changed files with 2207 additions and 36 deletions
+20
View File
@@ -0,0 +1,20 @@
import { describe, it, expect, afterEach } from 'vitest'
import { DatabaseSync } from 'node:sqlite'
import { migrate } from '../../src/main/db/migrate'
import type { SqliteDb } from '../../src/main/db/types'
describe('migrate v11', () => {
let db: SqliteDb
afterEach(() => db?.close())
it('UT-MIG-11: fresh database migrates to v11 with undo_stack', () => {
db = new DatabaseSync(':memory:')
migrate(db)
const version = db.prepare('SELECT MAX(version) AS v FROM schema_version').get() as { v: number }
expect(version.v).toBe(11)
const table = db
.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='undo_stack'")
.get()
expect(table).toBeTruthy()
})
})