Skip to content

Releases: sakost/zenmoney-rs

v0.3.0

28 Feb 14:20

Choose a tag to compare

What's New

InMemoryStorage for testing

Added public InMemoryStorage type — a thread-safe in-memory storage backend for unit and integration tests. No file I/O required:

use zenmoney_rs::storage::InMemoryStorage;
use zenmoney_rs::zen_money::ZenMoneyBlocking;

let storage = InMemoryStorage::new();
let client = ZenMoneyBlocking::builder()
    .token("test-token")
    .storage(storage)
    .build()
    .unwrap();

Test coverage

Achieved 95%+ line coverage with comprehensive tests across all storage backends, CLI commands, and client logic.

Full Changelog: v0.2.0...v0.3.0

v0.2.0

28 Feb 10:05

Choose a tag to compare

Features

  • Add cross-process advisory file locking to FileStorage using std::fs::File::lock / lock_shared for safe concurrent access across OS processes
  • Add --data-dir global CLI flag to override the default XDG storage directory

Details

  • with_shared_lock allows concurrent readers; with_exclusive_lock provides exclusive writer access
  • storage.lock sentinel file is created on construction and preserved across clear_all
  • New tests: lockfile_created_on_construction, clear_preserves_lockfile, concurrent_upserts_are_safe

v0.1.1

28 Feb 10:05

Choose a tag to compare

Bug Fixes

  • Skip serializing null qr_code, source, and viewed transaction fields to prevent API 500 errors
  • Remove deleted entities from local storage in delete_accounts, delete_transactions, delete_tags, delete_merchants, delete_reminders, and delete_reminder_markers
  • Filter out deleted: true records in filter_transactions

Other

  • Add create_transaction example for end-to-end API testing

v0.1.0

27 Feb 20:25

Choose a tag to compare

Initial release

First public release of zenmoney-rs — a Rust client library for the ZenMoney API.

Features

  • Async and blocking HTTP clients for the ZenMoney diff/suggest endpoints
  • Strongly-typed models for all ZenMoney entities (accounts, transactions, tags, merchants, etc.)
  • Newtype ID wrappers preventing accidental ID misuse at compile time
  • Pluggable storage trait with FileStorage backend for incremental sync
  • High-level client (ZenMoney / ZenMoneyBlocking) with:
    • Incremental and full sync
    • Push methods (create/update) for 7 entity types
    • Delete methods for 6 entity types
    • Composable TransactionFilter with builder pattern (date range, account, tag, payee, merchant, amount)
    • Convenience query methods (active accounts, find by title, etc.)
  • CLI binary for smoke-testing (zenmoney diff, accounts, transactions, tags, suggest)
  • CI/CD with GitHub Actions (lint, test, cargo-deny, auto-publish on tags)