Releases: maxveldink/sorbet-result
Releases · maxveldink/sorbet-result
[1.2.0] - 2024-11-03
Added
- Add
Typed::Success(payload)
andTyped::Failure(error)
convenience method (no more.new
-ing!) - Add
Typed::Success#==
andTyped::Failure#==
implementations
Removed
- POTENTIALLY BREAKING Remove support for Ruby < 3.1.
[1.1.0] - 2024-02-21
Added
- Add minitest assertions for Results
Changed
- Switched to Standard over using Rubocop directly
1.0.0 - Drop Ruby 2.7 support and release first major version
[1.0.0] - 2023-06-20
Removed
- Remove support for Ruby < 3.0
0.3.1 - Add more error handling methods
[0.3.1] - 2023-06-20
Added
- Add
#on_error
toTyped::Result
to allow behavior when an error is encountered during chaining. - Add
#payload_or
toTyped::Result
to allow callers to specify a default value ifFailure
is returned.
0.3.0 - Better static checking and chaining
[0.3.0] - 2023-06-06
Shoutout to @iMacTia for putting in most the work to make this release possible 🙏🏻
Added
- Add
.blank
to create aTyped::Success
with anil
payload or aTyped::Failure
with anil
error. - Add
#and_then
toTyped::Result
to allow chaining of results. See #14 for more details.
Changed
- Breaking Make
Typed::Success#Error
andTyped::Failure#Payload
fixed toT.noreturn
. This allows to specify the other type_member only when using generics. See #8 for more details - Breaking Remove
T.nilable
fromPayload
andError
parameters inTyped::Success.new
andTyped::Failure.new
. Nilability will now need to be specified in the generic type. This also means that you'll need to use the new.blank
instead of.new
when you want to create aTyped::Success
orTyped::Failure
with anil
payload or error. - Breaking Change
Typed::Success
andTyped::Failure
initialize arguments from keyword to positional. - Improve
Typed::Success.new
andTyped::Failure.new
to make them generic methods and automatically infer the type of thepayload
anderror
arguments. See #8 for more details
0.2.1 - Automate Gem Release
[0.2.1] - 2023-05-18
Added
- Automated gem release process
Changed
- Update dependencies
[0.2.0] - 2023-04-21
Changed
- Breaking Updated all
T::
modules toTyped::
. This allows the Sorbet project freedom to explore these constants in the future. - Pulled in Zeitwerk for autoloading.
[0.1.1] - 2023-04-17
Changed
- Updated
T::Result
to be an abstract class, instead of an interface module.
Fixed
bin/console
now requires the correct file.
[0.1.0] - 2023-04-17
Added
T::Result
,T::Success
andT::Failure
types.- Basic documentation.