## 3.1.2 (2026-09-27)

Packaging:
* Require OCaml >= 4.14 in ocsipersist-lib (it uses `String.for_all`).
* Tests: the DBM tests run on Arch Linux (no `which`) and FreeBSD
  (`waitpid` interrupted by `SIGCHLD`).

## 3.1.1 (2026-09-26)

Packaging:
* Require lwt >= 5.7.0: ocsipersist-lib uses `Lwt.reraise` since 2.1.0.
* The PostgreSQL backend test, which starts a local server, now runs only
  when `OCSIPERSIST_TEST_PGSQL=true` is set, so building
  ocsipersist-pgsql with tests no longer fails where no server can be
  started.

## 3.1.0 (2026-09-25)

New features:
* New exception `Decoding_error`, raised by the JSON frontends (`Ref_json`,
  `Store_json`, `Column.Json`) when a stored value cannot be deserialised by
  the codec it was opened with. Backend errors keep their own exceptions, so
  callers can now distinguish an unreadable value from a database failure.

Bug fixes:
* `Store_json.make_persistent` (and its lazy variants) no longer fails when
  the existing stored value cannot be deserialised. The value is left in
  place; `get` reports it with `Decoding_error` and the caller can overwrite
  it with `set`. Previously such a value made `make_persistent` fail with no
  way to recover, since overwriting requires the handle it failed to return.

## 3.0.0 (2026-09-25)

Breaking changes:
* Adapt the Ocsigen Server configuration-file extensions
  (`ocsipersist-*-config`) to the module names introduced in Ocsigen Server 8
  (`Ocsigen.Extensions`, `Ocsigen.Config`, `Ocsigen.Messages`). These packages
  now require `ocsigenserver >= 8.0.0 & < 9.0.0`.

Packaging:
* `ocsipersist-dbm` and `ocsipersist-dbm-config` are now marked as unavailable
  on Windows and macOS: the DBM backend relies on a separate `ocsidbm` process,
  Unix-domain sockets and gdbm/ndbm.

## 2.1.0 (2026-06-13)

New features:
* Type-safe JSON serialisation via `Deriving_Json`: new modules `Store_json`,
  `Ref_json` and functor `Column.Json`, available in all backends as
  alternatives to the `Marshal`-based `Store`, `Ref` and `Column.Marshal`.
  Persisted data is human-readable and stable across OCaml versions. This adds
  a dependency on `js_of_ocaml` (for the `Deriving_Json` runtime only; no
  JavaScript compilation is involved).
* `iter` and `fold` added to the `Polymorphic` interface; `iter_step` and
  `fold_step` are now deprecated.
* `iter_batch` implemented for the SQLite and DBM backends (was raising at
  runtime).

Bug fixes:
* SQLite: keep a persistent database connection instead of opening and closing
  it on every operation.
* PostgreSQL: fix `replace_if_exists` (`raise` instead of `Lwt.fail`), wrap
  `modify_opt` in a transaction, fix `Functorial.length` (was using `Marshal`
  on a `count` result) and fix `Functorial.fold`/`Polymorphic.fold` returning
  the initial accumulator.
* DBM: replace the `Lwt_unix.fork` double-fork with `Unix.create_process`,
  compatible with OCaml 5 multicore domains.

Security:
* Validate table and store names (only `[a-zA-Z0-9_]` allowed) in all backends
  to prevent SQL injection through interpolated names.

Other:
* Add a test suite for the three backends (SQLite, PostgreSQL, DBM) and a CI
  workflow running it.

## 2.0.0 (2024-06-15)

See the git history for changes up to this release.
