Skip to content

Bump fpdart from 0.2.0 to 0.4.1 - #5

Closed
dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/pub/fpdart-0.4.1
Closed

dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/pub/fpdart-0.4.1

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Feb 27, 2023

Copy link
Copy Markdown

Bumps fpdart from 0.2.0 to 0.4.1.

Release notes

Sourced from fpdart's releases.

v0.4.1

  • New methods for Option type (thanks to tim-smart 🎉)
    • flatMapNullable
    • flatMapThrowable
final option = Option.of(10);
option.flatMapNullable((a) => a + 1); /// 👈 Some(11)
option.flatMapThrowable((a) => a + 1); /// 👈 Some(11)
option.flatMapNullable<int>((a) => null); /// 👈 None()
option.flatMapThrowable<int>((a) => throw "fail"); /// 👈 None()

  • Improved support fromJson for Option type (thanks [again] to tim-smart 🎉)
    • Allow for decoding of non-primitive types (with custom fromJson constructors)
/// `fromJson` on `DateTime` with `Option` type
final now = DateTime.now();
Option<DateTime>.fromJson(now.toIso8601String(), (a) => DateTime.parse(a as String)); /// 👈 `Some(now)`
Option<DateTime>.fromJson("fail", (a) => DateTime.parse(a as String)); /// 👈 None()

  • New extension methods for Map (thanks [once again] to tim-smart 🎉)
    • extract
    • extractMap
final map = <String, dynamic>{'a': 1, 'b': 2, 'c': 3, 'd': 4};
map.extract<int>('b'); /// 👈 `Some(2)`
map.extract<String>('b'); /// 👈 `None()`, not of type `String` ⚠️
final map = <String, dynamic>{'a': 1};
map.extractMap('a'); /// 👈 None(), not a Map
final map = <String, dynamic>{'a': {'b': 2} };
map.extractMap('a'); /// 👈 Some({'b': 2})

  • Option.of and Option.none factories const (thanks to f-person 🎉)

Note: People who have the prefer_const_constructors lint enabled will notice a warning to use const 🤝

v0.4.0

  • Added extension methods to work with nullable types (T?)
    • From T? to fpdart's types
      • toOption

... (truncated)

Changelog

Sourced from fpdart's changelog.

v0.4.1 - 25 February 2023

  • New methods for Option type (thanks to tim-smart 🎉)
    • flatMapNullable
    • flatMapThrowable
final option = Option.of(10);
option.flatMapNullable((a) => a + 1); /// 👈 Some(11)
option.flatMapThrowable((a) => a + 1); /// 👈 Some(11)
option.flatMapNullable<int>((a) => null); /// 👈 None()
option.flatMapThrowable<int>((a) => throw "fail"); /// 👈 None()

  • Improved support fromJson for Option type (thanks [again] to tim-smart 🎉)
    • Allow for decoding of non-primitive types (with custom fromJson constructors)
/// `fromJson` on `DateTime` with `Option` type
final now = DateTime.now();
Option<DateTime>.fromJson(now.toIso8601String(), (a) => DateTime.parse(a as String)); /// 👈 `Some(now)`
Option<DateTime>.fromJson("fail", (a) => DateTime.parse(a as String)); /// 👈 None()

  • New extension methods for Map (thanks [once again] to tim-smart 🎉)
    • extract
    • extractMap
final map = <String, dynamic>{'a': 1, 'b': 2, 'c': 3, 'd': 4};
map.extract<int>('b'); /// 👈 `Some(2)`
map.extract<String>('b'); /// 👈 `None()`, not of type `String` ⚠️
final map = <String, dynamic>{'a': 1};
map.extractMap('a'); /// 👈 None(), not a Map
final map = <String, dynamic>{'a': {'b': 2} };
map.extractMap('a'); /// 👈 Some({'b': 2})

  • Option.of and Option.none factories const (thanks to f-person 🎉)

Note: People who have the prefer_const_constructors lint enabled will notice a warning to use const 🤝

v0.4.0 - 16 December 2022

  • Added extension methods to work with nullable types (T?)
    • From T? to fpdart's types
      • toOption

... (truncated)

Commits
  • e892c8d V0.4.1 (#91)
  • dd62057 updated README and pubspec
  • 4a12d37 v0.4.1 README and CHANGELOG
  • 899b76a feat: Option.flatMapThrowable (#89)
  • 3bafb88 feat: Option.flatMapThrowable
  • 574e62c refactor: improve fromJson support (#87)
  • 768414a chore: add Option.fromJson tests
  • 4af55ee refactor: improve fromJson support
  • c748961 Make Option.of and Option.none factories const (#85)
  • 3b1740b fix: Add type annotation to Option in flatMap and ap
  • Additional commits viewable in compare view

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 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 [fpdart](https://github.com/SandroMaglione/fpdart) from 0.2.0 to 0.4.1.
- [Release notes](https://github.com/SandroMaglione/fpdart/releases)
- [Changelog](https://github.com/SandroMaglione/fpdart/blob/main/CHANGELOG.md)
- [Commits](SandroMaglione/fpdart@v0.2.0...v0.4.1)

---
updated-dependencies:
- dependency-name: fpdart
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added the dependencies Pull requests that update a dependency file label Feb 27, 2023
@dependabot @github

dependabot Bot commented on behalf of github Mar 6, 2023

Copy link
Copy Markdown
Author

Superseded by #6.

@dependabot dependabot Bot closed this Mar 6, 2023
@dependabot
dependabot Bot deleted the dependabot/pub/fpdart-0.4.1 branch March 6, 2023 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants