From aa72abe7287c1606a8be85cc06de583a1af46eb6 Mon Sep 17 00:00:00 2001 From: Maddy Guthridge Date: Sat, 31 Aug 2024 00:18:19 +1000 Subject: [PATCH] Bump to v0.3.1 --- package.json | 2 +- src/lib/server/data/migrations/index.ts | 7 +++++-- src/lib/server/data/migrations/v0.2.0.ts | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index fff88900..334d04da 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "minifolio", - "version": "0.3.0", + "version": "0.3.1", "private": true, "license": "GPL-3.0-only", "scripts": { diff --git a/src/lib/server/data/migrations/index.ts b/src/lib/server/data/migrations/index.ts index e8f9eab7..ae57cddc 100644 --- a/src/lib/server/data/migrations/index.ts +++ b/src/lib/server/data/migrations/index.ts @@ -12,10 +12,11 @@ export type MigrationFunction = (dataDir: string) => Promise; const migrations: Record = { '~0.1.0': migrateFromV010, '~0.2.0': migrateFromV020, + '~0.3.0': updateConfigVersions, }; /** Update config versions (only for minor, non-breaking changes to config.json) */ -export async function updateConfigVersions() { +export async function updateConfigVersions(dataDir: string) { const config = await getConfig(); config.version = version; await setConfig(config); @@ -38,7 +39,9 @@ export default async function migrate(oldVersion: string) { // calls getConfig and getLocalConfig without specifying the desired // directory to load from). try { - return await migrateFunction(getDataDir()); + await migrateFunction(getDataDir()); + console.log('Migration success'); + return; } catch (e) { console.log('!!! Error during migration'); console.log(e); diff --git a/src/lib/server/data/migrations/v0.2.0.ts b/src/lib/server/data/migrations/v0.2.0.ts index 30305d2c..35c387ac 100644 --- a/src/lib/server/data/migrations/v0.2.0.ts +++ b/src/lib/server/data/migrations/v0.2.0.ts @@ -12,7 +12,7 @@ import { unsafeLoadGroupInfo } from './unsafeLoad'; export default async function migrate(dataDir: string) { console.log(`Migrate from v0.2.x -> ${version}`); - await updateConfigVersions(); + await updateConfigVersions(dataDir); // For each group for (const groupId of await listGroups()) {