Changelog
A comprehensive history of changes, improvements, and bug fixes in NeverThrow.v8.2.0 (Current)
Minor Changes
Add orTee method for error track side effects
Add orTee method for error track side effects
Allow void arguments in ok/err/okAsync/errAsync
Allow void arguments in ok/err/okAsync/errAsync
v8.1.1
Patch Changes
Documentation updates for safeTry
Documentation updates for safeTry
v8.1.0
Minor Changes
safeTry no longer requires safeUnwrap
safeTry no longer requires safeUnwrap
v8.0.0
Major Changes
Breaking: orElse type argument order changed
Breaking: orElse type argument order changed
Pull Request: #484
Contributor: @braxtonhallTheMigration:This only applies if type arguments were explicitly provided at an
Contributor: @braxtonhallThe
orElse method now allows changing ok types, making the types match the implementation.Breaking Change:The ok type must now be provided before the err type when explicitly providing type arguments.orElse callsite. If the type arguments were inferred, no updates are needed during the upgrade.v7.2.0
Minor Changes
safeTry returns ResultAsync for better composability
safeTry returns ResultAsync for better composability
Pull Request: #562
Contributor: @sharnoChanged the return type of
Contributor: @sharnoChanged the return type of
safeTry from Promise<Result<T, E>> to ResultAsync<T, E> for better composability.What This Means:ResultAsync is thenable and behaves like a native Promise, but provides additional methods like map, andThen, and mapErr without needing to await or .then() first.Example:v7.1.0
Minor Changes
Add andTee and andThrough for side effects
Add andTee and andThrough for side effects
Pull Request: #467
Contributor: @untidy-hairAdded
Contributor: @untidy-hairAdded
andTee and andThrough methods to handle side effects:andTee: Perform side effects without affecting the Result type (errors are ignored)andThrough: Validate or perform checks where errors should propagate
Patch Changes
Fix combineWithAllErrors types
Fix combineWithAllErrors types
Pull Request: #483
Contributor: @braxtonhallFixed type definitions for
Contributor: @braxtonhallFixed type definitions for
combineWithAllErrors to properly handle error arrays.Improve err() string inference
Improve err() string inference
Pull Request: #563
Contributor: @mattpocockMade
Contributor: @mattpocockMade
err() infer strings narrowly for easier error tagging.Example:v7.0.1
Patch Changes
Make safeTry type inference more strict
Make safeTry type inference more strict
Enhance match type inference
Enhance match type inference
Pull Request: #497
Contributor: @braxtonhallEnhanced type inference for the
Contributor: @braxtonhallEnhanced type inference for the
match method to better handle callback return types.v7.0.0
Major Changes
Declare minimum Node.js version
Declare minimum Node.js version
Pull Request: #553
Contributor: @m-shakaDeclared the minimum supported Node.js version in the
Contributor: @m-shakaDeclared the minimum supported Node.js version in the
engines field of package.json.Requirements:- Node.js:
>=18 - npm:
>=11
NeverThrow does not depend on any Node.js version-specific features, so it should work with any version of Node.js that supports ES6 and other runtimes like browsers, Deno, etc.The engine declaration is primarily for maintaining a consistent development environment.Earlier Versions
For a complete history of changes in versions prior to v7.0.0, please visit the GitHub releases page.Release Channels
NeverThrow follows semantic versioning:- Major versions (x.0.0) contain breaking changes
- Minor versions (0.x.0) add new features in a backward-compatible manner
- Patch versions (0.0.x) contain bug fixes and documentation updates
Stay Updated
- Watch the repository on GitHub for release notifications
- Follow releases via RSS feed
- Subscribe to npm updates for the neverthrow package
Contributing
Interested in contributing to NeverThrow?- Check out open issues
- Read the contributing guidelines
- Join GitHub Discussions
Support the Project
If you find NeverThrow useful:- Sponsor the maintainer
- Buy the maintainer a coffee
- Star the project on GitHub