Skip to content

Commit

Permalink
Release v1 (#153)
Browse files Browse the repository at this point in the history
* Bump to v1

* v1 release notes
  • Loading branch information
brcrista authored Sep 11, 2020
1 parent deeaf2b commit 25eefac
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
23 changes: 23 additions & 0 deletions docs/changelogs/v1.0.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# v1.0.0

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>`
- `InvalidOperationException`s 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.
6 changes: 3 additions & 3 deletions src/Recore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>7.3</LangVersion>
<RootNamespace>Recore</RootNamespace>
<AssemblyVersion>0.11.0.0</AssemblyVersion>
<FileVersion>0.11.0.0</FileVersion>
<Version>0.11.0</Version>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<FileVersion>1.0.0.0</FileVersion>
<Version>1.0.0</Version>
<GenerateDocumentation>true</GenerateDocumentation>
<DocumentationFile>bin/docs/Recore.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
Expand Down

0 comments on commit 25eefac

Please sign in to comment.