Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jan 1, 2025

Bumps result_dart from 1.1.1 to 2.0.0.

Release notes

Sourced from result_dart's releases.

v2.0.0

  • This version aims to reduce the Result boilerplate by making the Failure type Exception by default. This will free the Result from having to type Failure, making the declaration smaller.

If there is a need to type Failure, use ResultDart.

Added

  • Introduced typedef for Result<S> and AsyncResult<S> to simplify usage:
    • Result<S> is a simplified alias for ResultDart<S, Exception>.
    • AsyncResult<S> is a simplified alias for AsyncResultDart<S, Exception>.

Changed

  • Replaced Result class with ResultDart as the base class for all results.
    • Default failure type for ResultDart is now Exception.
    • This change reduces boilerplate and improves usability by eliminating the need to specify the failure type explicitly in most cases.

Removed

  • Remove factories Result.success and Result.failure.

Migration Guide

  • In version >=2.0.0, the Failure typing is by default an Exception, but if there is a need to type it, use ResultDart<Success, Failure>.

only Success type:

// Old
Result<int, Exception> myResult = Success(42);
// NEW
Result<int> myResult = Success(42);

with Success and Failure types:

// Old
Result<int, String> myResult = Success(42);
// NEW
ResultDart<int, String> myResult = Success(42);

Changelog

Sourced from result_dart's changelog.

[2.0.0] - 2024-12-11

  • This version aims to reduce the Result boilerplate by making the Failure type Exception by default. This will free the Result from having to type Failure, making the declaration smaller.

If there is a need to type Failure, use ResultDart.

Added

  • Introduced typedef for Result<S> and AsyncResult<S> to simplify usage:
    • Result<S> is a simplified alias for ResultDart<S, Exception>.
    • AsyncResult<S> is a simplified alias for AsyncResultDart<S, Exception>.

Changed

  • Replaced Result class with ResultDart as the base class for all results.
    • Default failure type for ResultDart is now Exception.
    • This change reduces boilerplate and improves usability by eliminating the need to specify the failure type explicitly in most cases.

Removed

  • Remove factories Result.success and Result.failure.

Migration Guide

  • In version >=2.0.0, the Failure typing is by default an Exception, but if there is a need to type it, use ResultDart<Success, Failure>.

only Success type:

// Old
Result<int, Exception> myResult = Success(42);
// NEW
Result<int> myResult = Success(42);

with Success and Failure types:

// Old
Result<int, String> myResult = Success(42);
// NEW
ResultDart<int, String> myResult = Success(42);

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [result_dart](https://github.com/Flutterando/result_dart) from 1.1.1 to 2.0.0.
- [Release notes](https://github.com/Flutterando/result_dart/releases)
- [Changelog](https://github.com/Flutterando/result_dart/blob/main/CHANGELOG.md)
- [Commits](Flutterando/result_dart@1.1.1...v2.0.0)

---
updated-dependencies:
- dependency-name: result_dart
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dart Pull requests that update Dart code dependencies Pull requests that update a dependency file labels Jan 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dart Pull requests that update Dart code dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant