diff --git a/src/apps/cli/test/test-mirror-linux.sh b/src/apps/cli/test/test-mirror-linux.sh index 21a24d3..415548e 100755 --- a/src/apps/cli/test/test-mirror-linux.sh +++ b/src/apps/cli/test/test-mirror-linux.sh @@ -43,6 +43,15 @@ cli_test_init_settings_file "$SETTINGS_FILE" # isConfigured=true is required for mirror (canProceedScan checks this) cli_test_mark_settings_configured "$SETTINGS_FILE" +# Enable writeDocumentsIfConflicted to resolve unsynced conflicts during mirror +node -e ' +const fs = require("fs"); +const file = process.argv[1]; +const data = JSON.parse(fs.readFileSync(file, "utf-8")); +data.writeDocumentsIfConflicted = true; +fs.writeFileSync(file, JSON.stringify(data, null, 2)); +' "$SETTINGS_FILE" + # Preparation: Sync settings and files logic DB_SETTINGS="$DB_DIR/settings.json" cp "$SETTINGS_FILE" "$DB_SETTINGS" diff --git a/src/apps/cli/testdeno/test-mirror.ts b/src/apps/cli/testdeno/test-mirror.ts index b6eae4d..b4dc899 100644 --- a/src/apps/cli/testdeno/test-mirror.ts +++ b/src/apps/cli/testdeno/test-mirror.ts @@ -39,6 +39,10 @@ Deno.test("mirror: storage <-> DB synchronisation", async (t) => { // isConfigured=true is required for canProceedScan in the mirror command. await markSettingsConfigured(settingsFile); + const data = JSON.parse(await Deno.readTextFile(settingsFile)); + data.writeDocumentsIfConflicted = true; + await Deno.writeTextFile(settingsFile, JSON.stringify(data, null, 2)); + // Copy settings to the DB directory (separated-path mode) const dbSettings = workDir.join("db", "settings.json"); await Deno.copyFile(settingsFile, dbSettings); diff --git a/src/lib b/src/lib index 82e15f2..53804cb 160000 --- a/src/lib +++ b/src/lib @@ -1 +1 @@ -Subproject commit 82e15f2b9d99e0f595b45c864958a657d5d43bac +Subproject commit 53804cbaec7fed9591321e7fbe6dcc9092e51017 diff --git a/updates.md b/updates.md index fed04ca..5b292fb 100644 --- a/updates.md +++ b/updates.md @@ -3,6 +3,16 @@ Since 19th July, 2025 (beta1 in 0.25.0-beta1, 13th July, 2025) The head note of 0.25 is now in [updates_old.md](https://github.com/vrtmrz/obsidian-livesync/blob/main/updates_old.md). Because 0.25 got a lot of updates, thankfully, compatibility is kept and we do not need breaking changes! In other words, when get enough stabled. The next version will be v1.0.0. Even though it my hope. +## unreleased + +### Fixed (CLI, automated) + +- Fixed an issue where the mirror command could fail to apply updates when conflict preservation checks prevented overwriting unsynchronised local changes, even when the `force` parameter or `writeDocumentsIfConflicted` setting was enabled. + +### Improved + +- (CLI) Ported the remaining bash regression tests (`test-daemon-linux.sh`, `test-decoupled-vault-linux.sh`, and `test-remote-commands-linux.sh`) to Deno for cross-platform validation. + ## 0.25.74 8th June, 2026