Releases: RobDWaller/resulty
0.4.0 Expects
This release adds expects functionality to the Result and Option objects, specifically the expect()
, expectErr()
and expectNone()
methods. This provides more control over the error messages outputted when objects are unwrapped and panic.
Additional Work:
- Upgraded integration with Deno standard library.
- Fixed unit tests to work with
assertStrictEquals()
. - Added code comments to main module.
- Updated README documentation.
To Do:
- Add more code comments.
- Add more Rust-like functionality.
- Add GitHub pipeline for publishing to nest.land.
0.3.1 Type Guard Patch
This release adds type guarding to the isNone()
, isSome()
, isOk()
and isErr()
methods so type narrowing works properly. An interface change in 0.3.0 had caused a bug where proper type narrowing was required so the Result and Option unwrap methods continued to work as expected.
0.3.0 Additional Interfaces
The main purpose of this release is to add a number of additional interfaces to the Result and Option objects so they are more usable and Rust-like. The new interfaces include unwrapErr()
, unwrapNone()
, isNone()
and isSome()
.
The new unwrap methods means Resulty is more Rust-like and the relevant unwrap methods will now panic correctly, as is the case in Rust. The isNone()
and isSome()
methods allow developers to check whether an Opt<T>
object is an instance of Some
or None
. Again this provides additional Rust-like behaviour.
Additional Work:
- Fixed line endings in License File.
- Fixed line endings in README.
- Updated README documentation.
- Added
Panic
functionality. - Abstracted
Is
interface to separate module. - Created separate example tests module.
- Added nest.land egg.json config.
- Added dev_deps.ts file.
- Fixed Ok and Err objects so the properly implement Result interface.
To Do:
- Add code comments.
- Add more Rust-like functionality.
- Add GitHub pipeline for publishing to nest.land.
0.2.0 Release
This release adds an isOk()
method to the Result<T>
objects along with some tidy up of the Opt<T>
types and interfaces. This means you no longer have to write an option return type like Opt<string | null>
, you can now just write Opt<string>
.
Additional Work:
- Expanded README documentation with clear examples and setup information.
- Tightened up unit tests so assertions are exact.
To Do:
- Improve README documentation.
- Add code comments.
Release One
This is the first release of Resulty which aims to provide some simple Rust-like Result and Option objects for Deno. This allows a more functional / bubble-up approach to error management than throwing exceptions everywhere.
Core features:
ok()
,err()
,some()
andnone()
methods.Result
,Ok
,Err
,Opt
,Some
andNone
types.
Additional features:
- Unit tests written.
- CI pipeline added.
- Basic documentation written.
To do:
- Add
isOk()
method to Result interface and classes. - Improve unit tests.
- Improve README documentation.
- Improve CI pipeline.