- Include ES modules in published NPM builds
- Officially support Node 16.x
- Drop support for Node 13.x (unstable)
- Add new
LazyResult.mapSuccess()
andLazyResult.mapFailure()
methods
- Add new
Maybe.expect()
andResult.expect()
methods. (Thanks @LetTheComputerDecide!)
- Fix bug introduced in v1.4.2 for TypeScript users trying to import from submodules, like 'lemons/Result'.
-
Fix static methods type definitions (thanks @VPagani!)
-
Improved TypeScript setup
- Added TypeScript linter (
dtslint
) - Reorganization of TypeScript declarations
- Added TypeScript linter (
- Add
LazyResult.error()
method, similar toLazyResult.value()
, but for the error value. (Thanks, @Vages!)
-
Breaking changes:
- Removed
Result.toMaybe()
- this method wasn鈥檛 commonly used, but pulled inMaybe
into compiled bundles, increasing its size.
- Removed
-
New features:
-
You can now directly import submodules of this package, for example:
// Previously import { Result, Ok, Err } from 'lemons'; // Now possible import Result, { Ok, Err } from 'lemons/Result'; // ^^^^^^^^^^^^^
Note that, when importing from the specific modules directly, you'll need to make the main class (in this case
Result
) a default import instead of a named import.
-
-
Misc:
- New build process
- Cleaner/smaller package output
- Add TypeScript support
- Drop support for Node 7
- Make lemons.js fully Flow Strict
- Add convenience
LazyResult.value()
- Upgrade dependencies
- First stable release