refactor(store)!: reset to defaults before merging the on-disk state in reload (#3599)

* refactor(store)!: reset to defaults before merging the on-disk state in reload

`Store::reload` / `reload()` previously merged the on-disk state into the
current in-memory store. It now resets the store to its defaults first,
so in-memory keys that are neither in the defaults nor on disk are
dropped. `reload_ignore_defaults` / `reload({ ignoreDefaults: true })`
is unchanged.

* test(store): cover reload resetting to the defaults before merging the on-disk state

---------

Co-authored-by: Lucas Nogueira <lucas@crabnebula.dev>
This commit is contained in:
Lucas Fernandes Nogueira
2026-09-22 06:03:10 -03:00
committed by GitHub
co-authored by Lucas Nogueira
parent b7897cab5d
commit b566f09124
4 changed files with 90 additions and 9 deletions
+3
View File
@@ -35,3 +35,6 @@ tracing = { workspace = true }
thiserror = { workspace = true }
dunce = { workspace = true }
tokio = { version = "1", features = ["sync", "time", "macros"] }
[dev-dependencies]
tauri = { workspace = true, features = ["test"] }