Skip to content

Releases: supermacro/neverthrow

Fix superflouous logging

30 May 20:07
Compare
Choose a tag to compare

Thanks to @jsmith for submitting a patch which addresses this issue:

  • fromPromise always prints warning (#46)

This release also includes some minor additions as well:

  • dev dependency upgrades
  • generalizing the logging logic, see this commit
  • log deprecation warning for the chain API

2.3.2

27 May 12:51
Compare
Choose a tag to compare

This release patches, but doesn't necessarily address, #39.

Besides that, there are was a bit of "cleanup" around upgrading dev dependencies.

New `ResultAsync` API

20 May 16:38
Compare
Choose a tag to compare

The 2.3.0 release introduces a brand new ResultAsync API!

Thank you to @paduc for this amazing contribution.

ResultAsync Overview:

This new api gives you the same Result API, but for asynchronous results (i.e. Promise<Result<T, E>>).

ResultAsync is thenable! Meaning that you can await or .then it just like a regular promise. But unlike regular promises, this data type also has the same API as Result:

  • map
  • mapErr
  • andThen
  • match

Head over to the docs to learn more about this new API!

Deprecation Warning

This new ResultAsync API will likely replace the chain api that was introduced in version 2.2.0. If this is the decision that is taken, expect a major release. I am not yet 100% committed to this path, but I don't think it makes sense to have both a chain and a ResultAsync api.

✨ New Chain API 🔗

01 Mar 16:47
Compare
Choose a tag to compare

This release introduces a new set of functions for chaining async tasks.

there are 8 variants:

chain, chain3, chain4, etc all the way to chain8.

This api makes working with async Results very very very nice!

Check out the docs for usage and examples.

Enforcing consistent `match` return type

10 Nov 18:08
Compare
Choose a tag to compare

This release introduces a breaking change with the match method.

Previously, the 2 match arms could return different types.

V2 of neverthrow now enforces that both arms of the match method return the same type.

Refer to this commit for the aforementioned change: a07287e

To upgrade, simply run npm install [email protected] in your project.