Skip to content

Releases: open-draft/deferred-promise

v2.2.0

07 Sep 14:40
Compare
Choose a tag to compare

v2.2.0 (2023-09-07)

Features

v2.1.0

07 Dec 15:59
Compare
Choose a tag to compare

v2.1.0 (2022-12-07)

Features

v2.0.0

24 Nov 12:32
Compare
Choose a tag to compare

v2.0.0 (2022-11-24)

⚠️ BREAKING CHANGES

  • add deferred executor, support chaining (#4) (1fe382e)

Deferred promises are now implemented via the deferred
executor function. There are no changes to the existing public API.

Changes

  • Supports Promise chaining.
  • Adds createDeferredExecutor to use this library with any Promise.
  • Improves type annotations in regard to what the deferred promise
    expects as the input and what is the promise's output:
const p = new DeferredPromise<number>()
  .then(() => 'hello')

// The input must be "number".
p.resolve(5)

// the output is "string"
// (the result of the "then" chain)
await p // "hello"
  • Deprecated: Removes DeferredPromise.result. Access the result by
    awaiting the promise instead.
  • Deprecated: The resolved promise state is replaced by
    fulfilled, which is the correct promise state representation per
    specification.

v1.3.0

20 Oct 13:00
Compare
Choose a tag to compare

v1.3.0 (2022-10-20)

Features

  • do not throw on illegal state (3cd0983)

v1.2.1

20 Oct 10:39
Compare
Choose a tag to compare

v1.2.1 (2022-10-20)

Bug Fixes

  • IllegalStateError: set custom name for instanceof matching (1137d71)

v1.2.0

20 Oct 10:28
Compare
Choose a tag to compare

v1.2.0 (2022-10-20)

Features

  • throw IllegalStateError upon illegal state (#3) (9819dcd)

v1.1.1

26 Sep 10:49
Compare
Choose a tag to compare

v1.1.1 (2022-09-26)

Bug Fixes

  • improve methods chaining compatibility (#2) (05e7e93)

v1.1.0

26 Sep 10:15
Compare
Choose a tag to compare

v1.1.0 (2022-09-26)

Features

v1.0.0

12 Sep 22:54
Compare
Choose a tag to compare

v1.0.0 (2022-09-12)

⚠️ BREAKING CHANGES

  • add initial DeferredPromise implementation (512313d)

This is a 1.0 release.