Skip to content

# Summary#78

Merged
jwaspin merged 5 commits intomainfrom
fix/misc
Feb 14, 2026
Merged

# Summary#78
jwaspin merged 5 commits intomainfrom
fix/misc

Conversation

@jwaspin
Copy link
Contributor

@jwaspin jwaspin commented Feb 14, 2026

Summary

Enhances schema validation strictness and date-format handling for safer financial ledger ingestion, while preparing the 3.x transition path with LucaLedger compatibility in mind.

Changes

  • Added strict unknown-field validation via unevaluatedProperties: false across core schemas.
  • Added shared date utilities:
    • normalizeDateString(value) for unambiguous YYYY/MM/DDYYYY-MM-DD.
    • isDateStringFixable(value) to identify safe auto-fix candidates.
  • Enhanced validator outputs with structured metadata for date format issues:
    • dateFormatIssues
    • hasFixableDateFormatIssues
  • Added date field path helpers:
    • getDateFieldPaths(schemaKey)
    • getDateFieldPathsByCollection()
  • Cleaned schema/data/docs alignment:
    • Removed counterparty from transaction schema usage and example data.
    • Kept memo where currently supported.
  • Fixed schema export surface in src/index.js to avoid namespace spread artifacts.
  • Updated tests for:
    • strict unknown-field behavior
    • date fixability behavior
    • helper exports
  • Added 3.0.0 changelog entry with breaking-change notes.

Schema Version Policy (Current PR)

  • For this transition, fixtures derive schemaVersion from package version to keep LucaLedger and LucaSchema aligned on a shared 3.x baseline.
  • Exact schema-contract version decoupling/enforcement is intentionally deferred to a follow-up cross-repo migration pass (LucaSchema + LucaLedger) to avoid introducing app-load breakage in this branch.

Breaking Changes

  • Unknown/undeclared properties now fail validation.
  • counterparty is no longer accepted on transactions.

Checklist

  • Increment Version in package.json (semantic versioning)
  • Updated README or documentation if needed
  • Updated changelog if needed
  • Updated/added tests if needed
  • Updated/added examples if needed
  • Ran pnpm test, all tests pass
  • Ran pnpm lint
  • Ran pnpm build

Related Issues

  • N/A

@jwaspin jwaspin merged commit cc26042 into main Feb 14, 2026
6 checks passed
@jwaspin jwaspin deleted the fix/misc branch February 14, 2026 05:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant