v0.1.0
First public release of memory-write-ahead-vfs — a SharedArrayBuffer-backed in-memory write-ahead VFS for @journeyapps/wa-sqlite.
Highlights
- One shared, named in-memory SQLite runtime that structured-clones into dedicated workers — every worker runs its own SQLite WASM instance against a single copy of the database bytes.
- Segmented, growable
SharedArrayBufferstorage: start small, grow in place up to the configured ceiling, no re-sharing or copying. - Cross-worker file locks built on Atomics with heartbeat-based stale-lock recovery: dead workers' locks and lease slots are reclaimed safely (CAS-guarded claim/release/recovery protocol).
- Snapshot isolation, rollback, and checkpointing delegated to wa-sqlite's
WriteAheadhelper. - Capacity limits enforced with clear errors; diagnostics expose file sizes, segment counts, lock state, and recovery counters.
Verification
Released through the prepublishOnly gate: Prettier check, strict TypeScript, 18 Playwright browser integration tests (WAL round-trips, multi-worker concurrency, dead-worker lock and lease recovery, capacity exhaustion, sequential reopen), and a clean build.
Install
pnpm add memory-write-ahead-vfs @journeyapps/wa-sqliteRequires a cross-origin-isolated browser context with growable SharedArrayBuffer support. See the README for the worker usage example and the locking model.