This is do-with-redis-lock version 3.2.0, a minimal, promisified library for distributed locking with Redis. It provides a simple `doWithRedisLock` function that acquires a lock via Redis SET NX PX and releases it after the callback resolves. Unlike heavyweight options (e.g., Redlock), this package has zero peer dependencies, no external lock manager, and focuses on a single atomic operation. Releases are infrequent but stable; the current major version (v3) dropped support for Node <18 and switched to ESM-only exports. Key differentiator: simplicity — no retry strategies, no lock extension — just a promise-based lock around an async function.
No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
ESM-only since v3; CommonJS require will fail with ERR_REQUIRE_ESM.
This package only exports a named function; default import is undefined.
Type exports are available; import type for compile-time only.
Connects to Redis, acquires a distributed lock for `criticalTask`, and releases after completion. Demonstrates options: ttl, retryDelay, retryCount.
Breaking-change detection hasn't run for this library yet.
CVE tracking and dependency tree are planned for a later release.