Skip to content

Releases: eblocha/composable-locks

Removal of 'Domain'

16 Sep 23:42
Compare
Choose a tag to compare

With v0.5.0, the old Domain class is removed in favor of Symbol for domain identifiers in the re-entrant mutex.

Symbols have the benefit of being allowed in plain objects. Symbols also have additional convenience methods built-in.

This change also reduces the bundle size ever so slightly since it is missing the Domain class definition.

Typing Updates to Keyed Mutex

16 Sep 12:51
Compare
Choose a tag to compare
  • Simplified key resolver function type signature, generic can be any type.
  • By default, the KeyedMutex will accept string | number | symbol keys, instead of defaulting to string. This can automatically be narrowed by providing a type-annotated resolver function.

Remove LockType enum from RWMutex

16 Sep 12:54
Compare
Choose a tag to compare
  • Removed the LockType enum from the RWMutex
  • typescript enums cause issues with tree-shaking
  • Moved to string union type, and renamed to RWLockType
  • Package can now be marked side-effect free