0.17.4
- Fix three-level context nesting silent failure in Deno runtime
0.17.3
- Fix nested context.step() hanging in Node.js and Bun
0.17.2
- Update to work with Deno 2.0
0.17.1
- Fix missig awaits when closing file descriptor
- Ensure file is locked by the current process before writing anything
0.17.0
- Add parameter
ignoreTransactionErrorstoopen()andsync(). - Make cli
openandopen:noindexignore errors by default. - Add cli command
repair - Add optional parameter
ignoreReadErrorsto commandsopen,sync,scanandvacuum - Fix problem with murmurHash implementation
- Allow using different hashing algorithms per database version
0.16.5
- Makes cli tool
openandclosemore resilient to errors. - Dependency update.
0.16.4
- Refactor of file locks during a vacuum
0.16.3
- Added
KV.defer(promiseToHandle, [errorHandler], [timeoutMs])method to allow non-awaited promises to be tracked and settled duringKV.close().errorHandler(optional): A function to handle errors that occur during promise resolution/rejection. If not provided, errors will silently ignored.timeoutMs(optional): A timeout (in milliseconds) for promise resolution. If the promise doesn't settle within this time duringKV.close(), a warning will be logged. Defaults to 5000ms.
- Fix cli tool not being able to open any database after a failed open
- Code refactors
0.16.3
- Added
KV.defer(promiseToHandle, [errorHandler], [timeoutMs])method to allow non-awaited promises to be tracked and settled duringKV.close().errorHandler(optional): A function to handle errors that occur during promise resolution/rejection. If not provided, errors will silently ignored.timeoutMs(optional): A timeout (in milliseconds) for promise resolution. If the promise doesn't settle within this time duringKV.close(), a warning will be logged. Defaults to 5000ms.
- Fix cli tool not being able to open any database after a failed open
- Code refactors
0.16.2
- Fix for Node.js; use
readlineinstead of prompt
0.16.1
- Fix for Node.js not treating subarrays of buffers as expected
0.16.0
Breaking change, databases created using earlier versions is not compatible with 0.16.0 and up.
- Use 32 bit MurmurHash3 (from new dependency
npm:ohashinstead of SHA-1 for transaction integrity check, saving time and storage - Precalculate the Uint32Array of the transaction signature, improving performance
- Use CBOR-encoding of key instead of custom implementation, improving performance
- Avoid copying arraybuffers in certain situations
- Prefetch data on transaction read, severely reducing the number of disk reads
0.15.11
- Remove option doLock from
.sync() - Remove unused code from
key.ts - Add benchmark for getting data that does not exist
- Rename internal function
toAbsolutePathtotoNormalizedAbsolutePathand clarify code with additional comments - Adds various missing test to reduce the risk for regression bugs
0.15.10
- Do not assume that the ledger is open for the full duration of each method call.
0.15.9
- Fix `isOpen“ to return false while closing the database
0.15.8
- Remove sync result
noopas isn't used anywhere anymore. - Adds
fetchDataoption toscan. Setting this tofalseenables faster retrieval of transaction metadata. - Change the
statscli command to use the new fast scan. - Fix ledgerPath not being reset on close.
- Adds missing commands to the cli
helpoutput. - Remove
a.bridge() // this is bridge-comments
Fixes
- Fixed Deno panic on decoding data from cache
0.15.7
Changes
- Do not freeze the database during vacuum
- Reduce time in locked state during vacuum
- Only unlock old ledger after successful vacuum
- Only re-open ledger after successful vacuum
Fixes
- Fixed Deno panic on decoding data from cache
0.15.6
Additions
- Fixed order of transactions returned by
iterateandlistAll
0.15.5
Additions
- Add argument
reversetoiterateandlistAllto allow almost instant queries for "last x transactions matching query y". - Reduce lock time on writing new transactions.
- Optimize the logic of writing new transactions.
Fixes
- Make sure the results of
iterateandlistAllare returned in insertion order, or reverse insertion order ifreverseis set.
0.15.4
- Fix for
prompttotally blocking the event loop in the cli tool, preventing synchronization. - Make the watchdog slightly more invincible.
0.15.3
- Internal fix; Always unblock sync even if a vacuum fails
- Added
synccli command, to force a synchronization of the cli instance.
0.15.2
- Fixed a problem where records were overwritten during large atomic transaction writes.
- Renamed the CLI command
sysinfotostatsand added ledger statistics. - Added a constant factor
LEDGER_CACHE_MEMORY_FACTORto approximate the actual memory used by the ledger cache, based on raw data size. - Added a
recursiveoption to.scan()to allow recursively counting transactions in the ledger. - Improved error handling in cli commands.
- Increase
LOCK_STALE_TIMEOUT_MSfrom 60 seconds to 3 hours, to allow longer running queries. - Fixed error where ledger was unlocked instantly after a failed locking operation.
- Added
unlock-command to the cli interface, to allow manually unlocking a database from a crashed process.
0.15.1
- Fixed problem where keys lingered when running .listKeys() after a deletion.
- Adds
vacuumcli command - Fixes missing await in
.scan()
0.15.0
- Added in-memory cache for ledger
- Added option
disableIndexfor faster startup in scenarios where you don't have to query the index. - Added option
ledgerCacheSizeto control how much of the ledger to cache in memory, for faster retrieval. - Refactor of cli tool
- Added command
open:noindexto cli-tool. - Added the
.scan()method to extract full transaction history for a certain key.
0.14.0
- Cli-tool
ckvnow included in@cross/kvthrough export@cross/kv/cli- Install with
deno install -A -g -n ckv jsr:@cross/kv/cliand runckv - Run without installing with
deno run -A jsr:@cross/kv/cli
- Install with
Other changes
- Renamed
key.toStringRepresentation()to.stringify() - Added static function
KVKeyImplementation.parse()which returns aKVKey. - Various internal optiomizations
0.13.2
- Be more graceful when closing
0.13.1
- Allow unlocking the database while closing it.
0.13.0
- Only throw in
.sync()on closed database if the force parameter is true. - Make all relevant methods (
.get(),.set(),.iterate(),.listAll()...) type safe using generics - Update docs
0.12.1
- Add method
.isOpen()
0.12.0
- Use a header flag instead of separate file to lock/unlock database
- Update ledger version
B011->B012with backwards compatibility - Implement atomic transactions
0.11.0
- Update ledger version
BETA->B011"Beta 0.11" - Use the supplied database path without adding
.data - Reduce header length from 1024 to 256 bytes
- Add feature
.watch(query, callback, recursive) - Change lockfile name from
path/to/db.locktopath/to/db-lock - Change temporary name from
path/to/db.tmptopath/to/db-tmp - Allow all unicode letters and numbers in string key parts
- Add
CHANGELOG.md - Code cleanup