Compare commits

..

No commits in common. "v1.2.0-rc.1" and "v1.1.1-rc.9" have entirely different histories.

5 changed files with 805 additions and 1674 deletions

View File

@ -1,21 +1,3 @@
## [1.2.0-rc.1](https://git.ext.icikowski.pl/go/generics/compare/v1.1.1-rc.9...v1.2.0-rc.1) (2024-05-21)
### Features
* **types:** add `Pairs` type ([658d8a7](https://git.ext.icikowski.pl/go/generics/commit/658d8a7fd6a032c65531b2a708da5c87417a7caf))
### Continuous Integrations
* **deps:** pin `conventional-changelog-conventionalcommits` to version 7.x ([e6fc7d8](https://git.ext.icikowski.pl/go/generics/commit/e6fc7d8d6564a8ccaad0b11e307bae400d3ebe61))
### Build system and dependencies
* **deps:** update all non-major dependencies ([8bd6307](https://git.ext.icikowski.pl/go/generics/commit/8bd63075f40e8126c42274985ec8fff33eda1751))
* **deps:** update dependency conventional-changelog-conventionalcommits to v8 ([c473983](https://git.ext.icikowski.pl/go/generics/commit/c4739832872f532adfdbaea724a756f6abcb86f7))
## [1.1.1-rc.9](https://git.ext.icikowski.pl/go/generics/compare/v1.1.1-rc.8...v1.1.1-rc.9) (2024-04-12)

View File

@ -6,11 +6,8 @@ type Pair[K comparable, V any] struct {
Value V
}
// Pairs represents collection of key-value pairs
type Pairs[K comparable, V any] []Pair[K, V]
// MapPairs returns list of map's key-value pairs
func MapPairs[K comparable, V any](src map[K]V) Pairs[K, V] {
func MapPairs[K comparable, V any](src map[K]V) []Pair[K, V] {
dst := make([]Pair[K, V], len(src))
idx := 0
for k, v := range src {

View File

@ -13,11 +13,11 @@ func TestMapPairs(t *testing.T) {
}{
"nil map": {
src: nil,
dst: Pairs[string, int]{},
dst: []Pair[string, int]{},
},
"empty map": {
src: map[string]int{},
dst: Pairs[string, int]{},
dst: []Pair[string, int]{},
},
"filled map": {
src: map[string]int{
@ -25,7 +25,7 @@ func TestMapPairs(t *testing.T) {
"bar": 2,
"baz": 3,
},
dst: Pairs[string, int]{
dst: []Pair[string, int]{
{
Key: "foo",
Value: 1,

2448
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
{
"private": true,
"name": "generics",
"version": "1.2.0-rc.1",
"version": "1.1.1-rc.9",
"scripts": {
"release": "./node_modules/.bin/semantic-release"
},