Skip to content

Releases: PsychoLlama/wardens

v0.5.1

12 Aug 17:07
Compare
Choose a tag to compare

Fixed

  • Added support for parametrized resources in ResourceHandle<T>.

v0.5.0

12 Aug 16:49
Compare
Choose a tag to compare

Changed

  • Wardens is now published with ESM (type=module). It should be backwards compatible.
  • Now destroy(...) throws if you pass an object that wasn't constructed with create(...).

Fixed

  • If a resource fails while initializing, now all intermediate child resources are destroyed as well.
  • If a resource fails while being destroyed, now its child resources are destroyed as well.
  • Resources can no longer provision child resources after teardown. This closes a loophole where resources could escape destruction.

Added

  • New ResourceHandle<T> utility type represents the value returned when creating a resource.

v0.4.1

15 Jan 01:02
Compare
Choose a tag to compare

Fixed

  • Newer versions of TypeScript complained about signatures in bindContext(...).

v0.4.0

20 Jun 03:42
Compare
Choose a tag to compare

Added

  • Support for provisioning resources through async functions instead of Resource subclasses. This offers better type safety around null conditions.
  • A new Resource utility type is exported. The new functional API expects you to return this interface.

Removed

  • The Resource abstract class was removed. Use async functions instead.
  • The Controls<...> utility type was removed. Import the type you need from the module instead.

v0.3.0

04 Jun 18:06
Compare
Choose a tag to compare

Changed

  • Prevent use of allocate(...)/deallocate(...) outside a resource subclass.
  • Renamed enter() and leave() to create() and destroy().
  • Renamed mount() and unmount() to create() and destroy().

Removed

  • Second type parameter to Resource is gone. Arguments to enter(...) are now inferred.
  • No more default implementations for enter(...)/leave(...) on resources.

v0.2.0

24 May 07:33
Compare
Choose a tag to compare

Fixed

  • mount(...) and allocate(...) no longer require a config argument if the resource doesn't explicitly define one.

Added

  • enter(...) now supports variable arguments.

Changed

  • The second generic parameter of Resource was a config parameter, but now it's an argument tuple.
  • The ExternalControls utility type was renamed to Controls.

v0.1.0

22 May 22:34
Compare
Choose a tag to compare

Added

  • Resource class for modeling asynchronously provisioned resources
  • mount/unmount hooks to provision resources
  • allocate/deallocate for creating hierarchies of resources