- Fixed implicit import from
src
- Removed
src
folder from NPM package
- Removed
module
field frompackage.json
- Added interface compatible client support (ex.
ioredis-mock
) - Removed
instanceof Redis
validation in constructor ioredis
marked as optional peerDependency, explicitioredis
install is required now
- Fix race condition for refresh started before release and finished after release
- Added
identifier
constructor option. - Added
acquiredExternally
constructor option. - Option
externallyAcquiredIdentifier
DEPRECATED. - Option
identifierSuffix
DEPRECATED.
- Added
identifierSuffix
option, usefull for tracing app instance which locked resource
- Fixed reacquire expired resource in refresh
- Added
stopRefresh
method - Added
externallyAcquiredIdentifier
optional constructor option - Removed
uuid
dependency
- Added
acquireAttemptsLimit
method
- Added
tryAcquire
- Breadking change: Drop Node.js v10.x, v12.x support
- Added
ioredis@5
support
- Added
.isAcquired
property on all locks - Added
onLostLock
constructor option. By default throws unhandled error.
- Breaking change:
Mutex
,Semaphore
,MultiSemaphore
not longer supportCluster
. For multi-node case useRedlock*
instead. - Added
RedlockMutex
,RedlockSemaphore
,RedlockMultiSemaphore
- Internals refactored
- Added
MultiSemaphore
- Breaking change:
FairSemaphore
has been removed. UseSemaphore
instead (has the same "fairness")- the
acquire
method inSemaphore
no longer returns a boolean. Instead, it throws an error if it cannot acquire, and if it doesn't throw, you can assume it worked.
- the
- Internal code has been cleaned up
- Added more test, include synthetic node unsynchroned clocks