Skip to content

Releases: recorefx/RecoreFX

v2.0.0

06 Dec 01:19
Compare
Choose a tag to compare

Breaking changes

  • RecoreFX now targets .NET 5.0
  • Removes IReadOnlyDictionaryExtensions, which contained two overloads of GetValueOrDefault(), preferring the now-standard method
  • Also removes IDictionaryExtensions.GetValueOrDefault<TKey, TValue>(Dictionary<TKey, TValue>, TKey), which is no longer needed to resolve ambiguity
  • Of<T>.Value is now init-only
  • Token and Ciphertext<THash> are now record types instead of subtypes of Of<string>

New features

  • The API now has type annotations for nullable references
  • Add Apply() and ApplyAsync()
  • Add Equals() overloads with IEqualityComparer<T> for Optional<T>, Either<TLeft, TRight>, and Result<TValue, TResult>
  • Add ToAsyncEnumerable<T>(Task<IEnumerable<T>>) and ToAsyncEnumerable(IEnumerable<Task<T>>)

Bug fixes

  • Fixed the equality and comparison methods of Token, MappedComparer, and MappedEqualityComparer so that they no longer throw NullReferenceException when passed null as an argument
  • Fixed Of<T>.ToString() not to throw NullReferenceException when the underlying value is null

v2.0.0 Release Candidate 2

11 Nov 22:40
Compare
Choose a tag to compare
Pre-release

2.0.0

Breaking changes

  • RecoreFX now targets .NET 5.0
  • Removes IReadOnlyDictionaryExtensions, which contained two overloads of GetValueOrDefault(), preferring the now-standard method
  • Also removes IDictionaryExtensions.GetValueOrDefault<TKey, TValue>(Dictionary<TKey, TValue>, TKey), which is no longer needed to resolve ambiguity
  • Of<T>.Value is now init-only

New features

  • The API now has type annotations for nullable references
  • Add Equals() overloads with IEqualityComparer<T> for Optional<T>, Either<TLeft, TRight>, and Result<TValue, TResult>
  • Add ToAsyncEnumerable<T>(Task<IEnumerable<T>>) and ToAsyncEnumerable(IEnumerable<Task<T>>)

Bug fixes

  • Fixed the equality and comparison methods of Token, MappedComparer, and MappedEqualityComparer so that they no longer throw NullReferenceException when passed null as an argument
  • Fixed Of<T>.ToString() not to throw NullReferenceException when the underlying value is null

v2.0.0 Release Candidate 1

26 Sep 18:55
Compare
Choose a tag to compare
Pre-release

Breaking changes

  • RecoreFX now targets .NET 5.0
  • Removes IReadOnlyDictionaryExtensions, which contained two overloads of GetValueOrDefault(), preferring the now-standard method
  • Also removes IDictionaryExtensions.GetValueOrDefault<TKey, TValue>(Dictionary<TKey, TValue>, TKey), which is no longer needed to resolve ambiguity
  • Of<T>.Value is now init-only

New features

  • The API now has type annotations for nullable references
  • Add Equals() overloads with IEqualityComparer<T> for Optional<T>, Either<TLeft, TRight>, and Result<TValue, TResult>
  • Add ToAsyncEnumerable<T>(Task<IEnumerable<T>>) and ToAsyncEnumerable(IEnumerable<Task<T>>)

Bug fixes

  • Fixed the equality and comparison methods of Token, MappedComparer, and MappedEqualityComparer so that they no longer throw NullReferenceException when passed null as an argument
  • Fixed Of<T>.ToString() not to throw NullReferenceException when the underlying value is null

v1.0.1

12 Sep 21:52
2d540ba
Compare
Choose a tag to compare
  • The Either<TLeft, TRight> and Result<TValue, TResult> constructors no longer throw ArgumentNullException. This prevented them from working with nullable types.

v1.0.0

11 Sep 00:42
25eefac
Compare
Choose a tag to compare

First major release! This release is considered production-ready, and subsequent breaking changes will require bumping the major version.

Also, v0 is now frozen and will not be receiving any more updates.

This changelog lists the changes relative to v0.11.0.

Breaking changes

  • Return (TSource Argmax, TResult Max) from Argmax() instead of (TResult Max, TSource Argmax); likewise for Argmin()
  • Capitalize property names in the returned tuple for Enumerate()
  • Change the behavior of Argmin() and Argmax() to match Min() and Max(). Specifically:
    • null is never returned as the min or max unless all values in the input enumerable are null or the input enumerable's elements are of a nullable type and the enumerable is empty.
    • If either TSource or TResult is non-nullable, the Argmin() and Argmax() of an empty enumerable will throw InvalidArgumentException.

New features

  • New Optional.Of() and Optional.Flatten() overloads for Nullable<T>. These both work to prevent ending up with an Optional<Nullable<T>>.
  • Add a Collapse() extension method for Either<T, T>. and Result<T, T>
  • InvalidOperationExceptions thrown from calling Argmin() or Argmax() on an empty enumerable now contain an error message.
  • Add a set of Argmin() and Argmax() overloads for numeric types and the nullable versions of those types. This parallels Min() and Max() and is needed for the null-handling behavior mentioned above. Specifically, null is normally considered less than any number, but we want to avoid returning it as the minimum.
  • Add a set of Argmin() and Argmax() overloads that do not take a selector function and simply return the index of the minimizing or maximizing element along with that element.

v0.11.0

06 Sep 01:52
41dcaf5
Compare
Choose a tag to compare
v0.11.0 Pre-release
Pre-release

Breaking changes

  • Rename ValueOrDefault() to GetValueOrDefault() in IDictionaryExtensions and IReadOnlyDictionaryExtensions
  • Remove from Func: Memoize(), TupleArgs(), and UntupleArgs()
  • Serialize AbsoluteUri and RelativeUri as JSON in the same way as Uri (as a string instead of property-by-property)
  • Remove AnonymousComparer<T> (covered by Comparer<T>.Create())
  • In Renumerable.OnKeys() and OnValues(), throw ArgumentNullException when func is null instead of NullReferenceException
  • Remove LinkedListExtensions.Append() (will resolve to ICollectionExtions.Append() as long as it is called through extension method syntax)
  • Remove AbsoluteUri's constructors for combining URIs
  • Change AbsoluteUri.Combine() to work the same as Uri.ctor(Uri, Uri)
  • Remove RelativeUri.Combine()

v0.10.0

15 Aug 23:02
ccc0da3
Compare
Choose a tag to compare
v0.10.0 Pre-release
Pre-release

Breaking changes

  • Change the callback in Catcher.Catch from a predicate to a mapping function
  • Rename Result.Values() and Result.Errors() to Result.Successes() and Result.Failures()

New features

  • Add Result.TryAsync() and Result.AsyncCatcher
  • Add Optional<T>.AssertValue()

v0.9.0

08 Aug 00:27
Compare
Choose a tag to compare
v0.9.0 Pre-release
Pre-release

Breaking changes

  • Remove the StringUtil type and its methods.
    • JoinLines() was the only method on this type.
  • Remove the Lift type and move its methods onto their respective types:
    • Lift.OnEnumerable() -> Renumerable.Lift()
    • Lift.OnOptional() -> Optional.Lift()
    • Lift.OnEither() -> Either.Lift()
    • This increases coherence and is a more extensible pattern.
  • Move Composer and Pipeline into the System namespace.
    • The Recore.Functional namespace has now been deleted.
      This was the only namespace that didn't match an existing System namespace.
  • Replace Optional<T>'s IEnumerable<T> implementation with ToEnumerable().
    • All of the IEnumerable<T> extension methods polluted IntelliSense and made it hard to figure out what you could actually do with Optional<T>.
    • Iterating over Optional<T>'s "elements" breaks its encapsulation and null safety in the same way that putting a Value property on it would.

New features

  • Add support for serializing several types to and from JSON using
    System.Text.Json:
    • Of<T>
    • Optional<T>
    • Either<T>
    • Result<T>
  • Add AnonymousComparer<T> and AnonymousEqualityComparer<T>.

v0.8.0

27 Jul 13:09
Compare
Choose a tag to compare
v0.8.0 Pre-release
Pre-release

First GitHub release! Subsequent releases will include a changelog.

Note: for v0, minor version updates may include breaking changes.