Skip to content

Releases: ide/await-lock

v2.2.2

29 Apr 16:27
@ide ide
d16760d
Compare
Choose a tag to compare

Source maps now work. The original TypeScript (.ts) files are included in the published npm package.

v2.2.1

22 Apr 21:36
@ide ide
dc7d511
Compare
Choose a tag to compare

Patch fixes

  • Exclude tests from the published npm package

v2.2.0

22 Apr 21:31
@ide ide
d8836d9
Compare
Choose a tag to compare

New API

  • Added a timeout option to acquireAsync. If the lock is not acquired before the timeout elapses, the promise returned from acquireAsync is rejected with an error.

Internal

  • Use Sets instead of arrays internally
  • Run tests on Node 16 and 18

v2.1.0

11 Sep 21:53
@ide ide
ece7d10
Compare
Choose a tag to compare

New API

  • Added lock.acquired, a read-only property to access whether the lock is currently acquired or not.

Internal

  • CI no longer tests with Node 8 because some dev dependencies don't support it. Added testing on Node 14.

v2.0.1

04 Nov 07:48
@ide ide
708fded
Compare
Choose a tag to compare

Removed the assert dependency in favor of throwing an error directly to make this package a little easier to run in non-Node environments.

v2.0.0

12 Sep 20:48
@ide ide
c21ea33
Compare
Choose a tag to compare

This is not a significant upgrade over v1.2.1 but there is a small breaking change. Namely, CommonJS's require('await-lock') has been dropped in favor of standard JS's import 'await-lock'. You can still use require() but need to explicitly access the default export.

v1.2.0

07 Sep 01:20
@ide ide
1c35f51
Compare
Choose a tag to compare

v1.2.1

  • Added back support for require('await-lock'), which will go away in 2.0.0.

v1.2.0

  • Migrated from Flow to TypeScript
  • Removed Flow types. This is technically a breaking change, but I decided that it didn't warrant a new major version. Use ~1.1.3 if you want to use the last version with Flow.
  • Added tryAcquire, a method to try to acquire the lock immediately without waiting. This method returns true if the lock was acquired and false otherwise.
  • Migrated from Babel 6 to 7 (used for testing)
  • Switched to GitHub Actions for testing
  • Added code-coverage tracking with Codecov