Releases: toddy007/twin-db
Releases · toddy007/twin-db
Release list
2.*.*
07/15/2026 ( MM/DD/YYYY )
⚠️ Breaking Changes
- New TwinDB constructor: now takes (path, options) instead of just a database name, allowing you to choose the storage backend (JSONStorage or SqliteStorage)
- push and pull now accept values as an array (values: unknown[]) instead of rest parameters
- Minimum required Node.js version bumped to
>=22.13.0
✨ New Features
- Full rewrite of TwinDB, moving from a single JSON-file-only implementation to a pluggable storage architecture
- Storages
- Added native SQLite support (node:sqlite) via the new SqliteStorage class, with configurable table and key
- Added the JSONStorage class, decoupling JSON file storage logic from the core TwinDB logic
- Added TwinMongoDB class, to store your data in your MongoDB.
- See more in TwinMongoDB
- Path-based get/set now use lodash instead of a manual split-loop
- Added an in-memory cache to avoid repeated storage reads
- All methods (get, set, delete, sum, sub, concat, push, pull) now accept an optional fetch parameter to force a re-read from storage before the operation
- See more in fetch
- Added aliases: remove (for delete), add (for sum), and subtract (for sub)
- Exported JSONStorage and SqliteStorage and TwinMongoDB for direct use
🐛 Fixes
- Fixed the order of types/default fields in package.json's exports field for CJS/ESM builds