Changelog for @signaldb/fs
BREAKING CHANGES
- Switched to new
StorageAdapterAPI. - The adapter is given a folder, not a file, and the on-disk layout changed with it.
createFileSystemAdapter('data.json')used to write one JSON file holding the whole collection; it now takes a directory and writes one file per document underitems/— sharded over two levels by the document's id — and one file per indexed value underindex/. A write therefore costs one file rather than a rewrite of the entire collection. Data written by v1 is not read by v2: point the adapter at a fresh directory and import your old JSON file into the collection once, or keep the old file and write a one-off migration that inserts its contents. - Removed compatibility with
@signaldb/coreversions below2.0.0
Fixed
@signaldb/generic-fsis no longer bundled into this package. It was already declared as a dependency, so consumers installed it and received a second copy compiled intodist— about 7 kB of duplicated code in the shipped bundle, and two separate module instances at runtime. The built package is now roughly a third of its previous size.- Custom deserialize function now works correctly when file is empty (thanks to @krolebord!)
[1.0.1] - 2025-04-24
Fixed
- Avoid duplicate ids and unnecessary errors
[1.0.0] - 2024-12-16
Added
- Added JSDoc comments to public API