Highlights
Attachment replication, compaction, and error reporting now work correctly on-device — validated by the upstream PouchDB conformance suite (core + attachments + replication) running in the example app on both iOS and Android.
Bug fixes
web_sql_went_bad: unknownmasking a SQLiteUNIQUE constraint failed(#77). op-sqlite v16 reports UNIQUE violations as a plainErrorwith noe.code, so they slipped through as a genericunknown. They're now detected and mapped to the right PouchDB error — e.g. a clashing_localwrite returns409 REV_CONFLICT.- Attachment replication (#3962). Pull replication delivers attachments as React Native
Blobs; they're now normalized toBufferbefore hashing/storage, so binary and multi-attachment replication works. - Multi-attachment puts: dedupe attachment digests per revision, so two attachments sharing the same content no longer violate the
(digest, seq)index. - Compaction: reclaim orphaned attachment rows (and fix a missing
await), so a stub referencing a since-compacted attachment correctly returns412. auto_compactionis no longer forced tofalse— the option is respected again (db.info,revs_limit).- Correct binary-attachment storage (stored as a BLOB) and transaction error propagation.
Note on error handling: errors that previously surfaced as
web_sql_went_bad/unknownnow surface as proper PouchDB errors (REV_CONFLICT409,MISSING_STUB412). If your code branches on those error types, review it.
Other
- Bump
@op-engineering/op-sqliteto 16.2.0. - Add an on-device PouchDB conformance test suite (chai + mocha) to the example app.
- README: document the required Metro Node-build config (for attachments) and the Hermes design-doc view/filter caveat (write map/filter functions as string literals).
Full Changelog: v4.1.3...v4.2.0