refactor(workspaces): remove unused migration helper (#105522)

This commit is contained in:
Vincent Koc
2026-07-12 18:28:17 +02:00
committed by GitHub
parent 007f714dca
commit 10853e82fd
-15
View File
@@ -456,18 +456,3 @@ export function validateWorkspaceDoc(value: unknown): WorkspaceDoc {
prefs: validatePrefs(record.prefs, tabSlugs),
};
}
export function migrateWorkspaceDoc(value: unknown): { doc: WorkspaceDoc; changed: boolean } {
const record = assertRecord(value, "workspaces");
const schemaVersion = record.schemaVersion;
if (typeof schemaVersion !== "number" || !Number.isInteger(schemaVersion)) {
throw new Error("schemaVersion must be an integer");
}
if (schemaVersion > CURRENT_WORKSPACE_SCHEMA_VERSION) {
throw new Error(`unsupported future workspace schemaVersion: ${schemaVersion}`);
}
if (schemaVersion < CURRENT_WORKSPACE_SCHEMA_VERSION) {
throw new Error(`unsupported old workspace schemaVersion: ${schemaVersion}`);
}
return { doc: validateWorkspaceDoc(record), changed: false };
}