diff --git a/src/lib b/src/lib index 9753055..6a2dc67 160000 --- a/src/lib +++ b/src/lib @@ -1 +1 @@ -Subproject commit 97530553a63dc206ea3fb7ef60721cabda6c74cc +Subproject commit 6a2dc6777f1eb2beb7a058b8d2dde662662df9d7 diff --git a/updates.md b/updates.md index 7308bad..53a435b 100644 --- a/updates.md +++ b/updates.md @@ -5,7 +5,14 @@ The head note of 0.25 is now in [updates_old.md](https://github.com/vrtmrz/obsid ## Unreleased +### Improved + +- P2P synchronisation has been made more robust + Now the foundation for P2P synchronisation has been rewritten, and the unit tests have been added. The foundation has been separated into the transport layer, signalling-and-connection layer, and, an RPC layers. And each layer has been unit-tested. As the result, the P2P synchronisation now uses the robust shim that uses RPC-ed PouchDB synchronisation in contrast to previous implementation. +This P2P synchronisation is not compatible with previous versions in terms of connectivity. All devices must be updated. + ### Fixed + - No longer baffling errors occur when setting-update is triggered during the early stage of initialisation. ## 0.25.60 diff --git a/vitest.config.rpc-unit.ts b/vitest.config.rpc-unit.ts new file mode 100644 index 0000000..8c24b34 --- /dev/null +++ b/vitest.config.rpc-unit.ts @@ -0,0 +1,30 @@ +import { defineConfig, mergeConfig } from "vitest/config"; +import viteConfig from "./vitest.config.common"; + +export default mergeConfig( + viteConfig, + defineConfig({ + resolve: { + alias: { + obsidian: "", + }, + }, + test: { + name: "rpc-unit-tests", + include: ["src/lib/src/rpc/**/*.unit.spec.ts"], + exclude: ["test/**"], + coverage: { + include: ["src/lib/src/rpc/**/*.ts"], + exclude: ["**/*.unit.spec.ts", "**/index.ts"], + provider: "v8", + reporter: ["text", "json", "html", ["text", { file: "coverage-rpc-text.txt" }]], + thresholds: { + lines: 90, + functions: 90, + branches: 75, + statements: 90, + }, + }, + }, + }) +);