github.com/jxskiss/gopkg/v2@v2.14.9-0.20240514120614-899f3e7952b4/CHANGELOG.md (about)

     1  # Changelog
     2  
     3  Notable changes to this project will be documented in this file.
     4  
     5  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
     6  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
     7  
     8  ## [Unreleased]
     9  
    10  TBD.
    11  
    12  ## [2.14.0] - 2024-02-07
    13  
    14  * Feat: support Go1.22 (#76)
    15  * Feat: [zlog] support color for console output (#74)
    16  * Fix: [zlog] multiFilesCore.Sync should sync all writers
    17  * Change: [perf/gopool] change defaultPool to not limit adhoc worker count
    18  * Change: refactor package [infra/acache] (#75)
    19  * Chore: add more tests
    20  
    21  ## [2.13.0] - 2024-02-03
    22  
    23  * Feat: [perf/gopool] minor improvements
    24  * Feat: [unsafe/reflectx] make IsIdenticalThriftType be compatible with `frugal` tag
    25  * Feat: new package [collection/listx] providing generic List, Queue, Stack data structures (#68)
    26  * Feat: [easy/ezdbg] support filter rule (#69)
    27  * Feat: [easy/yamlx] support variable to function result
    28  * Feat: [easy/yamlx] support relative reference
    29  * Fix: fix [easy/ezdbg] print nil pointers
    30  * Fix: fix [infra/acache] ticker may not be fired bug
    31  
    32  There are several **breaking changes** in this release, which may break some programs.
    33  
    34  * Breaking change: improvements to package [collection/heapx] (#67)
    35  * Breaking change: [infra/logid] re-design (#70)
    36  * Breaking change: move the rarely used package [perf/mselect] to standalone repo
    37  * Breaking change: simplify package [zlog] (#71)
    38  * Breaking change: change `zlog.CtxFunc` to be `zlog.CtxHandler`
    39  * Breaking change: remove Go-version-specific unsafe usage for better maintainability (#72)
    40  * Breaking change: refactor [perf/json] to be impl-change-able on-the-fly (#73)
    41  * Breaking change: move some rarely used features to be examples to reduce dependencies
    42  
    43  ## [2.12.0] - 2023-12-27
    44  
    45  * Feat: [exp/kvutil] add big value sharding implementation (#61)
    46  * Feat: [utils/vdutil] add Result.IsValidationError to distinct validation error
    47  * Feat: simplify [perf/gopool] code
    48  * Feat: new package [easy/yamlx] to extend the YAML unmarshaler with extra features (#63)
    49  
    50  There are several **breaking changes** in this release, which were not used by anybody AFAIK.
    51  
    52  * Breaking change: move `retry.AddJitter` and `retry.Backoff` to package [utils/timeutil]
    53  * Breaking change: rewrite and move package [perf/rthash] to be an internal package
    54  * Breaking change: simplify package [perf/fastrand] in favor of math/rand/v2 available in Go 1.22+
    55  * Breaking change: remove package [perf/syncx]
    56  * Breaking change: new function `unsafe/forceexport.ScanTypes` to replace
    57    `unsafe/forceexport.ScanType` with better performance
    58  * Breaking change: [infra/logid] change base32 encoding, redesign APIs and log ID formats
    59  * Breaking change: move `easy.GetOutboundIP` to new package [utils/netutil]
    60  * Breaking change: remove the deprecated package [unsafe/monkey],
    61    users are recommended to use [bytedance/mockey](https://github.com/bytedance/mockey)
    62  
    63  ## [2.11.0] - 2023-12-02
    64  
    65  * Feat: [ezhttp] allow merge request data (#57)
    66  * Feat: refactor [exp/mselect] and promote to be a stable package (#58, #60)
    67  * Feat: refactor [exp/singleflight] and promote to be a stable package (#59)
    68  
    69  ## [2.10.0] - 2023-11-20
    70  
    71  * Fix: [perf/bbp] drop cgo arena implementation, which doesn't work on Windows (#54)
    72  * Feat: [utils/timeutil] new time related utilities
    73  * Feat: [easy] new utility functions
    74  * Change: drop support for Go 1.18, requires 1.19+
    75  * Change: [utils/vdutil] update and simplify validating utilities (#56)
    76  * Change: [perf/json] add new api `MarshalFastest`, and remove old api `MarshalNoMapOrdering`
    77    which is considered a bad design and there should be nobody using it
    78  
    79  ## [2.9.0] - 2023-08-11
    80  
    81  * Feat: support go1.21
    82  * Feat: new package [collection/heapx] with easy heap data structures
    83  * Change: mark package [unsafe/monkey] as DEPRECATED
    84  
    85  ## [2.8.1] - 2023-05-20
    86  
    87  * Fix: [perf/json] change to jsoniter as default JSON impl
    88  
    89  ## [2.8.0] - 2023-04-22
    90  
    91  * Feat: [unsafe/monkey] support arm64 with bugfix and more tests (#48)
    92  * Change: [perf/json] force fallback to jsoniter when bytedance/sonic is using compat implementation
    93  
    94  ## [2.7.5] - 2023-04-12
    95  
    96  * Fix: [perf/json] build failure on arm64 (MacBook M1)
    97  
    98  ## [2.7.4] - 2023-04-10
    99  
   100  * Feat: [utils/vdutil] new utility package helping data validation (#43)
   101  * Feat: [zlog] utils to work with `context.Context` (#44)
   102  * Feat: new util functions `easy.CreateNonExistingFolder` and `easy.WriteFile`
   103  
   104  ## [2.7.3] - 2023-03-21
   105  
   106  * Feat: [utils/ptr] support converting integer to string pointer
   107  
   108  ## [2.7.1] - 2023-03-20
   109  
   110  Minor improvements.
   111  
   112  ## [2.7.0] - 2023-03-06
   113  
   114  * Feat: [perf/bbp] use slice to manage arena memory chunks which gives better performance
   115  * Feat: [zlog] add logr support (#41)
   116  * Feat: [zlog] tweak log format to be more friendly with the console format
   117  * Fix: [perf/gopool] fix potential starving of task worker
   118  * Change: Remove deprecated util functions `easy.All` and `easy.Any`
   119  
   120  ## [2.6.1] - 2023-03-03
   121  
   122  * Feat: update CI workflow to support Go 1.20 (#37)
   123  * Feat: update bytedance/sonic to v1.8.3
   124  * Feat: [perf/bbp] new arena feature for perf/bbp (#40)
   125  * Fix: code-style issues reported by golangci-lint (#37)
   126  * Change: simplify perf/bbp implementation, notably that the signature of bbp.Grow and bbp.Buffer.Grow, bbp.Buffer.Append have been changed (#38)
   127  
   128  ## [2.5.1] - 2023-02-22
   129  
   130  * Feat: new utility function `easy.InSlice`
   131  * Feat: upgrade sonic to v1.8.1 to support Go 1.20 and better fallback strategy
   132  
   133  ## [2.5.0] - 2023-02-20
   134  
   135  * Refactor: replace `interface{}` to `any` for cleaner code
   136  * Feat: new utility function `easy.MergeMapsToPtr`
   137  * Feat: [easy/ezhttp] allow to specify custom function to dump request/response
   138  * Feat: fix `exp/perf/gopool` issues and move to `perf/gopool`
   139  * Change: use value fields for `zlog.FileLogConfig`
   140  
   141  ## [2.4.0] - 2023-02-07
   142  
   143  * Feat: [zlog] optimize std log redirection (#31)
   144  * Feat: fork `github.com/bytedance/gopkg/util/gopool` with opinionated changes (#32)
   145  * Feat: optimize performance of utility `easy.Unique`
   146  * Feat: new utility function `easy.SumFloat`
   147  * Fix: [perf/lru] `walbuf` does not reuse hashset memory
   148  * Change: [perf/bbp] remove `ObjectPool`
   149  
   150  ## [2.3.6] - 2023-01-30
   151  
   152  * Feat: [zlog] make param ctx being optional to `zlog.B`
   153  * Feat: [zlog] export `zlog.Level`'s method `ToZapLevel`
   154  * Feat: new utility function `easy.SplitMap` to split a large map into batches
   155  
   156  ## [2.3.4] - 20223-01-19
   157  
   158  * Feat: [confr] supports custom logging function
   159  * Feat: [confr] supports parsing `time.Duration` value
   160  
   161  ## [2.3.3] - 2023-01-10
   162  
   163  * Fix: [perf/json] `HumanFriendly` indentation
   164  
   165  ## [2.3.2] - 2023-01-08
   166  
   167  * Feat: http utility to reader response
   168  * Feat: [perf/json] new config `HumanFriendly` which generates data that is more friendly
   169    for human reading
   170  * Feat: new utility function `easy.LastIndex` to index value in a slice from last
   171  * Change: rename `easy.ToHashSet` to `easy.ToBoolMap`
   172  
   173  ## [2.3.1] - 2023-01-07
   174  
   175  * Feat: new util function `utils/ptr.NotZero`
   176  
   177  ## [2.3.0] - 2023-01-07
   178  
   179  * Feat: new package `exp/mselect` to dynamically waiting many channels
   180  * Feat: `easy.JSON` supports encoding map with `interface{}` as key type
   181  * Feat: `perf/json` add new config option to use jsoniter as underlying implementation
   182  
   183  ## [2.2.0] - 2023-01-02
   184  
   185  * Feat: rename package `easy/gemap` to `easy/ezmap`
   186  * Feat: new `GetTyped` api for `easy/ezmap`
   187  * Feat: ptr utils accept param of generic types
   188  * Feat: change `unsafejson` implementation to bytedance/sonic (#29)
   189  
   190  ## [2.1.1] - 2022-12-10
   191  
   192  * Feat: sync zap logfmt encoder from upstream
   193  * Fix: bbp.indexPut get incorrect pool index
   194  
   195  ## [2.1.0] - 2022-12-10
   196  
   197  Features:
   198  
   199  * Feat: add support for Go 1.20
   200  * Feat: update dependencies to latest
   201  * Feat: update CI workflow to test under all linux/mac/windows platforms
   202  * Feat: new api `easy.Glob` supporting double-star pattern
   203  * Feat: new api `easy.LazyJSON` helps to avoid unnecessary marshaling in some use case
   204  * Feat: new api `fastrand.Fastrand64`, `fastrand.ExpFloat64`, `fastrand.NormFloat64` and `fastrand.NewZipf`
   205  * Feat: new api `zlog.Println`, `zlog.TRACE1` and `zlog.TRACESkip1`
   206  * Feat: zlog support per logger output files
   207  * Feat: optimize spinlock implementation
   208  * Feat: make `errcode.Code` being compatible with `errors.Is`
   209  
   210  Bugfix:
   211  
   212  * Fix: test failures and bugs
   213  * Fix: some issues reported by `golangci-lint`
   214  
   215  Minor incompatible changes:
   216  
   217  * Change return value of `monkey.Mock` to be exported type `Mocker`
   218  * Remove deprecated type `json.InvalidUTF8Error`, `json.UnmarshalFieldError`,
   219    which are deprecated since Go 1.2
   220  * Remove api `monkey.Patch.Origin`, which does not work correctly
   221  
   222  ## [2.0.0] - 2022-09-10
   223  
   224  This release is a rewritten of the old v1 code, it features the generics feature
   225  available from Go 1.18+.