create version graph to handle migrations (#2708)

* create version graph to handle migrations

* Fix some version alpha test

* connect dataVersion api

* rename init fns

* improve types and add tests

* set data version after backup restore

* chore: Add some types tests for version info

* wip: More changes to versionInfo tests

* wip: fix my stupid

* update mocks

* update runtime

* chore: Fix the loop

---------

Co-authored-by: Jade <2364004+Blu-J@users.noreply.github.com>
Co-authored-by: J H <dragondef@gmail.com>
This commit is contained in:
Aiden McClelland
2024-08-15 20:58:53 +00:00
committed by GitHub
parent c704626a39
commit c174b65465
34 changed files with 974 additions and 257 deletions

View File

@@ -11,14 +11,10 @@ export class Install<Manifest extends T.Manifest, Store> {
return new Install(fn)
}
async init({
effects,
previousVersion,
}: Parameters<T.ExpectedExports.init>[0]) {
if (!previousVersion)
await this.fn({
effects,
})
async install({ effects }: Parameters<T.ExpectedExports.init>[0]) {
await this.fn({
effects,
})
}
}