From 03fb2fb21fe8e9fb1da333c961a5a9a97f96b0db Mon Sep 17 00:00:00 2001 From: SandroMaglione Date: Fri, 16 Dec 2022 05:45:21 +0100 Subject: [PATCH] release v0.4.0 --- CHANGELOG.md | 12 ++++++++--- README.md | 11 +++++++++- example/json_serializable/pubspec.lock | 2 +- example/open_meteo_api/pubspec.lock | 2 +- example/pokeapi_functional/pubspec.lock | 28 ++++++++++++------------- example/read_write_file/pubspec.lock | 4 ++-- pubspec.yaml | 2 +- 7 files changed, 38 insertions(+), 23 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 42a1b1a7..144894fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# v0.4.0 - Soon +# v0.4.0 - 16 December 2022 - Added extension methods to work with nullable types (`T?`) - From `T?` to `fpdart`'s types - `toOption` @@ -48,12 +48,18 @@ final first = waitWhat.first; /// Safe 🎯 final wellYeah = Either>.safeCast( intValue, - (dynamic value) => 'Not an List!', + (dynamic value) => 'Not a List!', ); final firstEither = wellYeah.map((list) => list.first); ``` - Added [**Open API Meteo example**](./example/open_meteo_api/) (from imperative to functional programming) -- Added article about [Option type and Null Safety in dart](https://www.sandromaglione.com/techblog/option_type_and_null_safety_dart) +- Added new articles + - [Option type and Null Safety in dart](https://www.sandromaglione.com/techblog/option_type_and_null_safety_dart) + - [Either - Error Handling in Functional Programming](https://www.sandromaglione.com/techblog/either-error-handling-functional-programming) + - [Future & Task: asynchronous Functional Programming](https://www.sandromaglione.com/techblog/async-requests-future-and-task-dart) + - [Flutter Supabase Functional Programming with fpdart](https://www.sandromaglione.com/techblog/flutter-dart-functional-programming-fpdart-supabase-app) + - [Open Meteo API - Functional programming with fpdart (Part 1)](https://www.sandromaglione.com/techblog/real_example_fpdart_open_meteo_api_part_1) + - [Open Meteo API - Functional programming with fpdart (Part 2)](https://www.sandromaglione.com/techblog/real_example_fpdart_open_meteo_api_part_2) # v0.3.0 - 11 October 2022 - Inverted `onSome` and `onNone` functions parameters in `match` method of `Option` [⚠️ **BREAKING CHANGE**] (*Read more on why* 👉 [#56](https://github.com/SandroMaglione/fpdart/pull/56)) diff --git a/README.md b/README.md index 1c52a373..760a3a89 100644 --- a/README.md +++ b/README.md @@ -74,13 +74,17 @@ Check out also this series of articles about functional programming with `fpdart - [How to use TaskEither in fpdart](https://www.sandromaglione.com/techblog/how-to-use-task-either-fpdart-functional-programming) - [How to map an Either to a Future in fpdart](https://blog.sandromaglione.com/techblog/from-sync-to-async-functional-programming) - [Option type and Null Safety in dart](https://www.sandromaglione.com/techblog/option_type_and_null_safety_dart) +- [Either - Error Handling in Functional Programming](https://www.sandromaglione.com/techblog/either-error-handling-functional-programming) +- [Future & Task: asynchronous Functional Programming](https://www.sandromaglione.com/techblog/async-requests-future-and-task-dart) +- [Flutter Supabase Functional Programming with fpdart](https://www.sandromaglione.com/techblog/flutter-dart-functional-programming-fpdart-supabase-app) + ## 💻 Installation ```yaml # pubspec.yaml dependencies: - fpdart: ^0.3.0 # Check out the latest version + fpdart: ^0.4.0 # Check out the latest version ``` ## ✨ Examples @@ -95,6 +99,10 @@ Flutter app that lets you search and view your favorite Pokemon: ### [Open Meteo API](./example/open_meteo_api/) Re-implementation using `fpdart` and functional programming of the [Open Meteo API](https://github.com/felangel/bloc/tree/master/examples/flutter_weather/packages/open_meteo_api) from the [flutter_weather](https://bloclibrary.dev/#/flutterweathertutorial) app example in the [bloc](https://pub.dev/packages/bloc) package. +A 2 parts series explains step by step the Open Meteo API code: +- [Open Meteo API - Functional programming with fpdart (Part 1)](https://www.sandromaglione.com/techblog/real_example_fpdart_open_meteo_api_part_1) +- [Open Meteo API - Functional programming with fpdart (Part 2)](https://www.sandromaglione.com/techblog/real_example_fpdart_open_meteo_api_part_2) + ### [Read/Write local file](./example/read_write_file/) Example of how to read and write a local file using functional programming. @@ -328,6 +336,7 @@ In general, **any contribution or feedback is welcome** (and encouraged!). ## 📃 Versioning +- **v0.4.0** - 16 December 2022 - **v0.3.0** - 11 October 2022 - **v0.2.0** - 16 July 2022 - **v0.1.0** - 17 June 2022 diff --git a/example/json_serializable/pubspec.lock b/example/json_serializable/pubspec.lock index f07cb66a..fe9c83c0 100644 --- a/example/json_serializable/pubspec.lock +++ b/example/json_serializable/pubspec.lock @@ -175,7 +175,7 @@ packages: path: "../.." relative: true source: path - version: "0.3.0" + version: "0.3.1" frontend_server_client: dependency: transitive description: diff --git a/example/open_meteo_api/pubspec.lock b/example/open_meteo_api/pubspec.lock index fc0af430..51316fbe 100644 --- a/example/open_meteo_api/pubspec.lock +++ b/example/open_meteo_api/pubspec.lock @@ -161,7 +161,7 @@ packages: path: "../.." relative: true source: path - version: "0.3.0" + version: "0.4.0" frontend_server_client: dependency: transitive description: diff --git a/example/pokeapi_functional/pubspec.lock b/example/pokeapi_functional/pubspec.lock index 7392d411..6a2e2699 100644 --- a/example/pokeapi_functional/pubspec.lock +++ b/example/pokeapi_functional/pubspec.lock @@ -28,7 +28,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.8.2" + version: "2.9.0" boolean_selector: dependency: transitive description: @@ -98,7 +98,7 @@ packages: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.2.1" charcode: dependency: transitive description: @@ -126,7 +126,7 @@ packages: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" code_builder: dependency: transitive description: @@ -168,7 +168,7 @@ packages: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.3.1" file: dependency: transitive description: @@ -213,7 +213,7 @@ packages: path: "../.." relative: true source: path - version: "0.2.1" + version: "0.3.1" freezed: dependency: "direct main" description: @@ -311,21 +311,21 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.11" + version: "0.12.12" material_color_utilities: dependency: transitive description: name: material_color_utilities url: "https://pub.dartlang.org" source: hosted - version: "0.1.4" + version: "0.1.5" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.7.0" + version: "1.8.0" mime: dependency: transitive description: @@ -346,7 +346,7 @@ packages: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.1" + version: "1.8.2" pedantic: dependency: transitive description: @@ -414,7 +414,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.2" + version: "1.9.0" stack_trace: dependency: transitive description: @@ -449,21 +449,21 @@ packages: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.2.1" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.9" + version: "0.4.12" timing: dependency: transitive description: @@ -507,5 +507,5 @@ packages: source: hosted version: "3.1.0" sdks: - dart: ">=2.17.0-0 <3.0.0" + dart: ">=2.17.0 <3.0.0" flutter: ">=1.20.0" diff --git a/example/read_write_file/pubspec.lock b/example/read_write_file/pubspec.lock index 0b634edb..4f977987 100644 --- a/example/read_write_file/pubspec.lock +++ b/example/read_write_file/pubspec.lock @@ -7,7 +7,7 @@ packages: path: "../.." relative: true source: path - version: "0.2.1" + version: "0.3.1" lint: dependency: "direct dev" description: @@ -16,4 +16,4 @@ packages: source: hosted version: "1.5.3" sdks: - dart: ">=2.16.0 <3.0.0" + dart: ">=2.17.0 <3.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 74a0c55d..281c8c86 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: fpdart -version: 0.3.0 +version: 0.4.0 homepage: https://www.sandromaglione.com/ repository: https://github.com/SandroMaglione/fpdart description: Functional programming in Dart and Flutter. All the main functional programming types and patterns fully documented, tested, and with examples.