Skip to content

Releases: TooTallNate/once

v2.0.1

03 May 18:05

Choose a tag to compare

Patch Changes

  • a1e5e2d: Fix promise hang when AbortSignal is aborted

v3.0.1

09 Feb 18:19
b31c762

Choose a tag to compare

Patch Changes

  • 28dbc5d: Fix promise hang when AbortSignal is aborted

3.0.0

27 Sep 09:14

Choose a tag to compare

Major Changes

  • Output as ESM: #6

Patches

2.0.0

22 Sep 23:50

Choose a tag to compare

Major Changes

  • Big refactor for v2: #5
    • Returns a regular Promise instead of CancelablePromise.
    • The Promise is strongly typed when posssible. This is the main new feature.
    • Always returns the full array of arguments passed to the event handler (i.e. what was previously once.spread() is now the regular once()).
    • Compatible with AbortController to remove event listeners before the Promise has been fulfilled.
    • Requires TypeScript v4 or newer.
    • Jest tests running CI via GitHub Actions.

Minor Changes

Patches

Credits

Huge thanks to @lewish and @vivekkj123 for helping!

1.1.1

20 Apr 23:59

Choose a tag to compare

Patches

  • Make cancel() be a no-op after executed: 952e450
  • Assign p.cancel in the Promise constructor: aa710f3

1.1.0

20 Apr 23:17

Choose a tag to compare

Minor Changes

  • Add once.spread() function: 07c9601

1.0.0

08 Feb 23:45

Choose a tag to compare

Initial release