Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release Commit for Funcky 3.4 and Funcky Async 1.3 #788

Merged
merged 6 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Funcky.Async/Funcky.Async.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Nullable>enable</Nullable>
<Description>Extends Funcky with support for IAsyncEnumerable and Tasks.</Description>
<PackageTags>Functional Async Monad Linq</PackageTags>
<Version>1.2.0</Version>
<Version>1.3.0</Version>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>
Expand Down
2 changes: 2 additions & 0 deletions Funcky.Async/PublicAPI.Shipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -276,3 +276,5 @@ static Funcky.Monads.ResultAsyncExtensions.Sequence<TValidResult>(this Funcky.Mo
static Funcky.Monads.ResultAsyncExtensions.Traverse<TValidResult, T>(this Funcky.Monads.Result<TValidResult> result, System.Func<TValidResult, System.Collections.Generic.IAsyncEnumerable<T>!>! selector) -> System.Collections.Generic.IAsyncEnumerable<Funcky.Monads.Result<T>>!
static Funcky.Monads.ResultAsyncExtensions.Traverse<TValidResult, T>(this Funcky.Monads.Result<TValidResult> result, System.Func<TValidResult, System.Threading.Tasks.Task<T>!>! selector) -> System.Threading.Tasks.Task<Funcky.Monads.Result<T>>!
static Funcky.Monads.ResultAsyncExtensions.Traverse<TValidResult, T>(this Funcky.Monads.Result<TValidResult> result, System.Func<TValidResult, System.Threading.Tasks.ValueTask<T>>! selector) -> System.Threading.Tasks.ValueTask<Funcky.Monads.Result<T>>
static Funcky.Extensions.AsyncEnumerableExtensions.InspectEmpty<TSource>(this System.Collections.Generic.IAsyncEnumerable<TSource>! source, System.Action! inspector) -> System.Collections.Generic.IAsyncEnumerable<TSource>!
static Funcky.Monads.OptionAsyncExtensions.ToAsyncEnumerable<TItem>(this Funcky.Monads.Option<TItem> option) -> System.Collections.Generic.IAsyncEnumerable<TItem>!
2 changes: 0 additions & 2 deletions Funcky.Async/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
#nullable enable
static Funcky.Extensions.AsyncEnumerableExtensions.InspectEmpty<TSource>(this System.Collections.Generic.IAsyncEnumerable<TSource>! source, System.Action! inspector) -> System.Collections.Generic.IAsyncEnumerable<TSource>!
static Funcky.Monads.OptionAsyncExtensions.ToAsyncEnumerable<TItem>(this Funcky.Monads.Option<TItem> option) -> System.Collections.Generic.IAsyncEnumerable<TItem>!
2 changes: 1 addition & 1 deletion Funcky.Xunit/Funcky.Xunit.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Nullable>enable</Nullable>
<Description>Package to use Funcky with xUnit</Description>
<PackageTags>Functional Monad xUnit</PackageTags>
<Version>2.0.1</Version>
<Version>2.0.2</Version>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<RootNamespace>Funcky</RootNamespace>
Expand Down
2 changes: 1 addition & 1 deletion Funcky/Funcky.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Product>Funcky</Product>
<Description>Funcky is a functional C# library</Description>
<PackageTags>Functional Monad Linq</PackageTags>
<VersionPrefix>3.3.0</VersionPrefix>
<VersionPrefix>3.4.0</VersionPrefix>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<PackageReadmeFile>README.md</PackageReadmeFile>
Expand Down
64 changes: 64 additions & 0 deletions Funcky/PublicAPI.Shipped.txt

Large diffs are not rendered by default.

65 changes: 1 addition & 64 deletions Funcky/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
@@ -1,65 +1,2 @@
#nullable enable
Funcky.Extensions.EnumeratorExtensions
Funcky.Monads.Either<TLeft, TRight>.InspectLeft(System.Action<TLeft>! inspector) -> Funcky.Monads.Either<TLeft, TRight>
Funcky.Monads.Either<TLeft, TRight>.OrElse(Funcky.Monads.Either<TLeft, TRight> fallback) -> Funcky.Monads.Either<TLeft, TRight>
Funcky.Monads.Either<TLeft, TRight>.OrElse(System.Func<TLeft, Funcky.Monads.Either<TLeft, TRight>>! fallback) -> Funcky.Monads.Either<TLeft, TRight>
Funcky.Monads.Option<TItem>.InspectNone(System.Action! inspector) -> Funcky.Monads.Option<TItem>
Funcky.Monads.Result<TValidResult>.GetOrElse(System.Func<System.Exception!, TValidResult>! fallback) -> TValidResult
Funcky.Monads.Result<TValidResult>.GetOrElse(TValidResult fallback) -> TValidResult
Funcky.Monads.Result<TValidResult>.InspectError(System.Action<System.Exception!>! inspector) -> Funcky.Monads.Result<TValidResult>
Funcky.Monads.Result<TValidResult>.OrElse(Funcky.Monads.Result<TValidResult> fallback) -> Funcky.Monads.Result<TValidResult>
Funcky.Monads.Result<TValidResult>.OrElse(System.Func<System.Exception!, Funcky.Monads.Result<TValidResult>>! fallback) -> Funcky.Monads.Result<TValidResult>
Funcky.UpCast<TResult>
static Funcky.Extensions.EnumerableExtensions.InspectEmpty<TSource>(this System.Collections.Generic.IEnumerable<TSource>! source, System.Action! inspector) -> System.Collections.Generic.IEnumerable<TSource>!
static Funcky.Extensions.EnumeratorExtensions.MoveNextOrNone<T>(this System.Collections.Generic.IEnumerator<T>! enumerator) -> Funcky.Monads.Option<T>
static Funcky.Extensions.ListExtensions.FindIndexOrNone<TValue>(this System.Collections.Generic.List<TValue>! list, int startIndex, int count, System.Predicate<TValue>! match) -> Funcky.Monads.Option<int>
static Funcky.Extensions.ListExtensions.FindIndexOrNone<TValue>(this System.Collections.Generic.List<TValue>! list, int startIndex, System.Predicate<TValue>! match) -> Funcky.Monads.Option<int>
static Funcky.Extensions.ListExtensions.FindIndexOrNone<TValue>(this System.Collections.Generic.List<TValue>! list, System.Predicate<TValue>! match) -> Funcky.Monads.Option<int>
static Funcky.Extensions.ListExtensions.FindLastIndexOrNone<TValue>(this System.Collections.Generic.List<TValue>! list, int startIndex, int count, System.Predicate<TValue>! match) -> Funcky.Monads.Option<int>
static Funcky.Extensions.ListExtensions.FindLastIndexOrNone<TValue>(this System.Collections.Generic.List<TValue>! list, int startIndex, System.Predicate<TValue>! match) -> Funcky.Monads.Option<int>
static Funcky.Extensions.ListExtensions.FindLastIndexOrNone<TValue>(this System.Collections.Generic.List<TValue>! list, System.Predicate<TValue>! match) -> Funcky.Monads.Option<int>
static Funcky.Extensions.ParseExtensions.ParseByteOrNone(this System.ReadOnlySpan<byte> candidate, System.Globalization.NumberStyles style, System.IFormatProvider? provider) -> Funcky.Monads.Option<byte>
static Funcky.Extensions.ParseExtensions.ParseByteOrNone(this System.ReadOnlySpan<byte> candidate, System.IFormatProvider? provider) -> Funcky.Monads.Option<byte>
static Funcky.Extensions.ParseExtensions.ParseByteOrNone(this System.ReadOnlySpan<byte> candidate) -> Funcky.Monads.Option<byte>
static Funcky.Extensions.ParseExtensions.ParseCharOrNone(this string? candidate) -> Funcky.Monads.Option<char>
static Funcky.Extensions.ParseExtensions.ParseDecimalOrNone(this System.ReadOnlySpan<byte> candidate, System.Globalization.NumberStyles style, System.IFormatProvider? provider) -> Funcky.Monads.Option<decimal>
static Funcky.Extensions.ParseExtensions.ParseDecimalOrNone(this System.ReadOnlySpan<byte> candidate, System.IFormatProvider? provider) -> Funcky.Monads.Option<decimal>
static Funcky.Extensions.ParseExtensions.ParseDecimalOrNone(this System.ReadOnlySpan<byte> candidate) -> Funcky.Monads.Option<decimal>
static Funcky.Extensions.ParseExtensions.ParseDoubleOrNone(this System.ReadOnlySpan<byte> candidate, System.Globalization.NumberStyles style, System.IFormatProvider? provider) -> Funcky.Monads.Option<double>
static Funcky.Extensions.ParseExtensions.ParseDoubleOrNone(this System.ReadOnlySpan<byte> candidate, System.IFormatProvider? provider) -> Funcky.Monads.Option<double>
static Funcky.Extensions.ParseExtensions.ParseDoubleOrNone(this System.ReadOnlySpan<byte> candidate) -> Funcky.Monads.Option<double>
static Funcky.Extensions.ParseExtensions.ParseInt16OrNone(this System.ReadOnlySpan<byte> candidate, System.Globalization.NumberStyles style, System.IFormatProvider? provider) -> Funcky.Monads.Option<short>
static Funcky.Extensions.ParseExtensions.ParseInt16OrNone(this System.ReadOnlySpan<byte> candidate, System.IFormatProvider? provider) -> Funcky.Monads.Option<short>
static Funcky.Extensions.ParseExtensions.ParseInt16OrNone(this System.ReadOnlySpan<byte> candidate) -> Funcky.Monads.Option<short>
static Funcky.Extensions.ParseExtensions.ParseInt32OrNone(this System.ReadOnlySpan<byte> candidate, System.Globalization.NumberStyles style, System.IFormatProvider? provider) -> Funcky.Monads.Option<int>
static Funcky.Extensions.ParseExtensions.ParseInt32OrNone(this System.ReadOnlySpan<byte> candidate, System.IFormatProvider? provider) -> Funcky.Monads.Option<int>
static Funcky.Extensions.ParseExtensions.ParseInt32OrNone(this System.ReadOnlySpan<byte> candidate) -> Funcky.Monads.Option<int>
static Funcky.Extensions.ParseExtensions.ParseInt64OrNone(this System.ReadOnlySpan<byte> candidate, System.Globalization.NumberStyles style, System.IFormatProvider? provider) -> Funcky.Monads.Option<long>
static Funcky.Extensions.ParseExtensions.ParseInt64OrNone(this System.ReadOnlySpan<byte> candidate, System.IFormatProvider? provider) -> Funcky.Monads.Option<long>
static Funcky.Extensions.ParseExtensions.ParseInt64OrNone(this System.ReadOnlySpan<byte> candidate) -> Funcky.Monads.Option<long>
static Funcky.Extensions.ParseExtensions.ParseNumberOrNone<TNumber>(this string! value, System.Globalization.NumberStyles style, System.IFormatProvider? provider) -> Funcky.Monads.Option<TNumber>
static Funcky.Extensions.ParseExtensions.ParseNumberOrNone<TNumber>(this System.ReadOnlySpan<char> value, System.Globalization.NumberStyles style, System.IFormatProvider? provider) -> Funcky.Monads.Option<TNumber>
static Funcky.Extensions.ParseExtensions.ParseOrNone<TParsable>(this string? value, System.IFormatProvider? provider) -> Funcky.Monads.Option<TParsable>
static Funcky.Extensions.ParseExtensions.ParseOrNone<TParsable>(this System.ReadOnlySpan<char> value, System.IFormatProvider? provider) -> Funcky.Monads.Option<TParsable>
static Funcky.Extensions.ParseExtensions.ParseOrNone<TParsable>(this System.ReadOnlySpan<byte> utf8Text, System.IFormatProvider? provider) -> Funcky.Monads.Option<TParsable>
static Funcky.Extensions.ParseExtensions.ParseSByteOrNone(this System.ReadOnlySpan<byte> candidate, System.Globalization.NumberStyles style, System.IFormatProvider? provider) -> Funcky.Monads.Option<sbyte>
static Funcky.Extensions.ParseExtensions.ParseSByteOrNone(this System.ReadOnlySpan<byte> candidate, System.IFormatProvider? provider) -> Funcky.Monads.Option<sbyte>
static Funcky.Extensions.ParseExtensions.ParseSByteOrNone(this System.ReadOnlySpan<byte> candidate) -> Funcky.Monads.Option<sbyte>
static Funcky.Extensions.ParseExtensions.ParseSingleOrNone(this System.ReadOnlySpan<byte> candidate, System.Globalization.NumberStyles style, System.IFormatProvider? provider) -> Funcky.Monads.Option<float>
static Funcky.Extensions.ParseExtensions.ParseSingleOrNone(this System.ReadOnlySpan<byte> candidate, System.IFormatProvider? provider) -> Funcky.Monads.Option<float>
static Funcky.Extensions.ParseExtensions.ParseSingleOrNone(this System.ReadOnlySpan<byte> candidate) -> Funcky.Monads.Option<float>
static Funcky.Extensions.ParseExtensions.ParseUInt16OrNone(this System.ReadOnlySpan<byte> candidate, System.Globalization.NumberStyles style, System.IFormatProvider? provider) -> Funcky.Monads.Option<ushort>
static Funcky.Extensions.ParseExtensions.ParseUInt16OrNone(this System.ReadOnlySpan<byte> candidate, System.IFormatProvider? provider) -> Funcky.Monads.Option<ushort>
static Funcky.Extensions.ParseExtensions.ParseUInt16OrNone(this System.ReadOnlySpan<byte> candidate) -> Funcky.Monads.Option<ushort>
static Funcky.Extensions.ParseExtensions.ParseUInt32OrNone(this System.ReadOnlySpan<byte> candidate, System.Globalization.NumberStyles style, System.IFormatProvider? provider) -> Funcky.Monads.Option<uint>
static Funcky.Extensions.ParseExtensions.ParseUInt32OrNone(this System.ReadOnlySpan<byte> candidate, System.IFormatProvider? provider) -> Funcky.Monads.Option<uint>
static Funcky.Extensions.ParseExtensions.ParseUInt32OrNone(this System.ReadOnlySpan<byte> candidate) -> Funcky.Monads.Option<uint>
static Funcky.Extensions.ParseExtensions.ParseUInt64OrNone(this System.ReadOnlySpan<byte> candidate, System.Globalization.NumberStyles style, System.IFormatProvider? provider) -> Funcky.Monads.Option<ulong>
static Funcky.Extensions.ParseExtensions.ParseUInt64OrNone(this System.ReadOnlySpan<byte> candidate, System.IFormatProvider? provider) -> Funcky.Monads.Option<ulong>
static Funcky.Extensions.ParseExtensions.ParseUInt64OrNone(this System.ReadOnlySpan<byte> candidate) -> Funcky.Monads.Option<ulong>
static Funcky.Extensions.StringExtensions.Chunk(this string! source, int size) -> System.Collections.Generic.IEnumerable<string!>!
static Funcky.Extensions.StringExtensions.SlidingWindow(this string! source, int width) -> System.Collections.Generic.IEnumerable<string!>!
static Funcky.UpCast<TResult>.From<T>(System.Lazy<T>! lazy) -> System.Lazy<TResult>!
static Funcky.UpCast<TResult>.From<TItem>(Funcky.Monads.Option<TItem> option) -> Funcky.Monads.Option<TResult>
static Funcky.UpCast<TResult>.From<TLeft, TRight>(Funcky.Monads.Either<TLeft, TRight> either) -> Funcky.Monads.Either<TLeft, TResult>
static Funcky.UpCast<TResult>.From<TValidResult>(Funcky.Monads.Result<TValidResult> result) -> Funcky.Monads.Result<TResult>

54 changes: 54 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,56 @@
All notable changes to this project will be documented in this file.
Funcky adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Funcky 3.4.0 | Funcky.Async 1.3.0 | Funcky.XUnit 2.0.2

This update is mainly to update to .NET 8 but also has several smaller improvements.

### Native AOT

Both Funcky and Funcky.Async have been annotated to be compatible with [Native AOT](https://learn.microsoft.com/en-gb/dotnet/core/deploying/native-aot).
The only exception is `OptionJsonSerializer` which is not compatible with Native AOT.

### .NET 8

We use the new C#12 and .NET features in the code, and expose new features through our API.

* .NET 8 added new overloads to their `TryParse` APIs. These changes are reflected in Funcky's `ParseOrNone` APIs.
* `ParseByteOrNone` overloads with `ReadOnlySpan<byte>` and `string?`
* `ParseSByteOrNone` overloads with `ReadOnlySpan<byte>`
* `ParseSingleOrNone` overloads with `ReadOnlySpan<byte>`
* `ParseDoubleOrNone` overloads with `ReadOnlySpan<byte>`
* `ParseDecimalOrNone` overloads with `ReadOnlySpan<byte>`
* `ParseInt16OrNone` overloads with `ReadOnlySpan<byte>`
* `ParseInt32OrNone` overloads with `ReadOnlySpan<byte>`
* `ParseInt64OrNone` overloads with `ReadOnlySpan<byte>`
* `ParseUInt16OrNone` overloads with `ReadOnlySpan<byte>`
* `ParseUInt32OrNone` overloads with `ReadOnlySpan<byte>`
* `ParseUInt64OrNone` overloads with `ReadOnlySpan<byte>`
* `ParseNumberOrNone<TNumber>` overloads
* `ParseOrNone<TParsable>` overloads

### String Extensions

We implemented a few of the IEnumerable extensions which are very useful on strings.

* `Chunk` on `string`.
* `SlidingWindow` on `string`.

### Monads

* Implemented `UpCast` for the monds `Option`, `Either`, `Result` and `System.Lazy`.
* Implemented `InspectEmpty` on `IEnumerable` and `IAsyncEnumerable`
* Implemented `ToAsyncEnumerable` extension on `Option`

### IEnumerator

* `MoveNextOrNone` extension on `IEnumerator<T>`

### Consistency

* `FindIndexOrNone` and `FindLastIndexOrNone` extensions on `List`


bash marked this conversation as resolved.
Show resolved Hide resolved
## Funcky 3.3.0 | Funcky.Analyzers 1.3.0 | Funcky.Xunit 2.0.1
This is a relatively minor release focuses on convenience for our monads `Option`, `Either` and `Result`.

Expand All @@ -17,6 +67,10 @@ All three alternative monads `Option`, `Either` and `Result` now support inspect

These methods are particularly useful for logging warnings/errors.

### Funcky.XUnit

* Funcky.XUnit is only compatible with XUnit 2.4, this is now correctly declared.

## Funcky 3.2.0 | Funcky.Async 1.2.0
### List Pattern for Option
We've added support for C# 11's List Patterns to `Option<T>`.
Expand Down
Loading