Compare commits

...

2 Commits

Author SHA1 Message Date
Dax
ef89682d8a Merge branch 'dev' into migrate-json-migration 2026-02-18 17:53:44 -05:00
Dax Raad
aeffbfebba refactor: migrate src/storage/json-migration.ts from Bun.file() to Filesystem module
Replace Bun.file().json() with Filesystem.readJson():

- Update read() function to use Filesystem.readJson() for batch JSON reading

All 22 storage tests pass.
2026-02-18 10:45:32 -05:00

View File

@@ -7,6 +7,7 @@ import { SessionTable, MessageTable, PartTable, TodoTable, PermissionTable } fro
import { SessionShareTable } from "../share/share.sql"
import path from "path"
import { existsSync } from "fs"
import { Filesystem } from "../util/filesystem"
export namespace JsonMigration {
const log = Log.create({ service: "json-migration" })
@@ -82,7 +83,7 @@ export namespace JsonMigration {
const count = end - start
const tasks = new Array(count)
for (let i = 0; i < count; i++) {
tasks[i] = Bun.file(files[start + i]).json()
tasks[i] = Filesystem.readJson(files[start + i])
}
const results = await Promise.allSettled(tasks)
const items = new Array(count)