Repository navigation
Update module github.com/fxamacker/cbor/v2 to v2.10.0 - #224
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
renovate
Bot
force-pushed
the
renovate/github.com-fxamacker-cbor-v2-2.x
branch
2 times, most recently
from
September 1, 2026 17:16
79e6060 to
255e7fa
Compare
renovate
Bot
force-pushed
the
renovate/github.com-fxamacker-cbor-v2-2.x
branch
from
September 14, 2026 21:50
255e7fa to
b4a8b08
Compare
renovate
Bot
force-pushed
the
renovate/github.com-fxamacker-cbor-v2-2.x
branch
from
October 7, 2026 02:46
b4a8b08 to
926fcc3
Compare
Generated by renovateBot
renovate
Bot
force-pushed
the
renovate/github.com-fxamacker-cbor-v2-2.x
branch
from
October 28, 2026 16:55
926fcc3 to
ed0369d
Compare
Contributor
Author
ℹ️ Artifact update noticeFile name: go.modIn order to perform the update(s) described in the table above, Renovate ran the
Details:
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Note
This PR body was truncated due to platform limits.
This PR contains the following updates:
v2.2.0→v2.10.0Release Notes
fxamacker/cbor (github.com/fxamacker/cbor/v2)
v2.10.0Compare Source
v2.10 speeds up encoding by up to 2.88× and decoding by up to 1.87× with zero memory regressions (B/op, allocs/op), reduces memory use, adds the
toindefarraystruct tag option, and fixes bugs. The Contributing Guidelines, Security Policy, and templates were extensively updated.Encoding sorted nested maps of dynamic JSON-like data to CBOR drops from 70 allocs/op to 1 and from 7.2 KiB/op to 4.0 KiB/op in the benchmarks below. Encoding
time.Time,big.Int,TagandMarshalervalues, and decoding intotime.Time,big.IntandTag, use 1 to 2 fewer allocs/op (20% to 50% fewer).This release does not use Go's
unsafepackage. Performance in user apps depends on configuration and data.Tests were refactored and coverage increased to 97.7%. Fuzz tests (not yet public) were also extended. Internal checklists and procedures were updated to reduce potential mistakes.
Performance and Benchmarks
Across all 215 benchmarks, there are zero memory regressions (B/op, allocs/op). Just one benchmark showed a speed dip:
Marshal/struct_many_flds_all_omitempty_all_empty/mapis ~4-5% slower, but only when a struct has 32 fields that are bothomitzeroand empty (same scenario with an 8-field struct is now faster).Benchmarks ran with Go 1.26.10 on linux/amd64 (benchstat n=10, p=0.000):
CBOR Speedup by Data Type
¹ 2.54× speedup (-60.64%) when decoding into a named
[]bytetype that has methods.² For addressable values (reached through a pointer, struct field, slice element or map value).
³ Only when every field is omitempty and empty: 7.6 ns slower for a 32-field struct, 2.37 ns faster for an 8-field struct. This is the only performance regression in all 215 benchmarks.
CBOR Encoding Reflection-Free Speedup
PR #870 optimized common types:
int,int64,uint,uint64,float64,bool,string,nil,[]byte,[]any,map[any]any,map[string]any, andmap[string]string.v2.9.6 → v2.10
ΔSec/op
ΔB/op
ΔAllocs/op
SortBytewiseLexical. Memory improvements are from #774 and #860.Upgrade Notes
Marshalconfigured to useTagsForbiddenreturns an error for abig.Intoutside [-2^64, 2^64-1], andEncModecreation returns an error for settings that would emit tags ifTagsForbiddenis also set (#868).Decoderadvances past well-formed data items rejected byDecOptionsvalue or serialization restrictions (e.g.NaN,IndefLength), andSkipskips them without an error (#872).Marshalconfigured to emit text-based time returns an error fortime.Timeoutside RFC 3339 limits (#873).TinyGo (experimental)
TinyGo support for v2.10.0 is available in tag
tinygo-beta/v2.10.0-tinygo0.42(branchfeature/cbor-tinygo-beta). It requires TinyGo 0.42.0 or newer. It is experimental and not fuzz tested. For details, see TinyGo (https://github.com/fxamacker/cbor#tinygo) in the README.What's Changed
⭐ Features
🚀 Optimizations
🛠 Improvements
🐞 Bug Fixes
🧪 Testing
📖 Documentation
📖 Contributing Guidelines, Security Policy, and Templates
CI / GitHub Actions
🔎 Details
Other Changes
Ported from release-2.9
Already released in v2.9.3 through v2.9.6.
🔎 Details
Dependabot Updates
🔎 Details
New Contributors
Full Changelog: fxamacker/cbor@v2.9.6...v2.10.0
v2.9.6Compare Source
v2.9.6 fixes 12 bugs, including an important fix for apps that decode CBOR maps into Go maps, and has one behavior change. API is unchanged but more errors are detected.
Most of these bugs were identified while improving tests and reviewing code for an upcoming release.
Tests and fuzz tests were extended.
Upgrading to v2.9.6 from all prior versions is recommended.
🐞 Important Fix
For use cases outside the "not affected by this bug" list below, decoding a CBOR null or undefined map key or value (including
55799(null)) into a Go map whose key or value type is of bool, integer, float, or string kind kept the previous map entry's key or value (instead of the zero value). See PR #855 for details.Not affected by this bug:
map[any]any, and intoany(with unchangedDefaultMapType).Decoding CBOR null or undefined into an interface that holds a value now sets it to nil, matching encoding/json (v1 and v2). Previously, the interface kept its value (PR #827), which was not the intended behavior.
🛠 Bug fixes
Some of these bugs could only be triggered by incorrect usage in user apps, such as invalid struct tags or an unsupported DefaultByteStringType setting, etc. None of these bugs were reported by a project affected by them.
Decoding
Encoding
📖 Documentation
Full Changelog: fxamacker/cbor@v2.9.4...v2.9.6
v2.9.5Compare Source
This version was tagged from the default branch by mistake and is retracted.
Use v2.9.6 (https://github.com/fxamacker/cbor/releases/tag/v2.9.6) instead.
v2.9.4Compare Source
This release fixes potential panics when decoding a CBOR map whose key decodes to an uncomparable Go value under certain conditions.
Not affected: user apps that don't register tag types and don't use map key types that are either named empty interfaces (e.g.
type MyAny any) or contain interfaces.These potential panics can be encountered when one of these two conditions is met:
TagSetinterface) that is an array or struct with uncomparable orinterface{}element or field type, orThis was identified while improving tests and reviewing code for an upcoming release.
Tests and fuzz tests were extended to cover this bug.
Upgrading to v2.9.4 is recommended.
What's Changed
Full Changelog: fxamacker/cbor@v2.9.3...v2.9.4
v2.9.3Compare Source
This release fixes a potential panic when decoding into a
time.Timefrom a CBOR byte string, map, or array under certain conditions.Not affected: standard CBOR time data (RFC 8949 tag 0 or tag 1), and decoders configured with
timeTag = DecTagRequired.Upgrading to v2.9.3 is recommended.
The panic stack trace was publicly reported on 2026-08-17, and the fix was released the same day. Fuzz testing was extended to cover this class of bug, and fuzzing of v2.9.3 is ongoing.
What's Changed
Full Changelog: fxamacker/cbor@v2.9.2...v2.9.3
v2.9.2Compare Source
This release refactors and hardens the streaming encoder by adding stricter checks for encoding CBOR indefinite-length data. Other changes include minor bugfixes, defensive checks, and more tests.
Projects that don't use CBOR indefinite-length data may also want to upgrade (summary of prior releases).
The stricter checks in the encoder prevent improper use of the library and bad inputs from producing malformed CBOR indefinite-length data that would be rejected by the decoder.
This release passed fuzz tests (billions of execs) and it is production quality.
What's Changed
CI / GitHub Actions and Docs
🔎 Details...
Full Changelog: fxamacker/cbor@v2.9.1...v2.9.2
v2.9.1Compare Source
This release includes important bugfixes, defensive checks, improved code quality, and more tests. Although not public, the fuzzer was also improved by adding more fuzz tests.
🐞 Bug fixes related to the
keyasintfeatureThese changes only affect Go struct fields tagged with
keyasint:math.MaxInt64when decoding CBOR map to a struct withkeyasintfield (PR #757)keyasinttag values (PR #757)🐞 Other bug fixes and defensive checks
Some of the bugs fixed are related to decoding extreme values that cannot be encoded with this library. For example, the decoder checks if epoch time encoded as CBOR float value representing hundreds of billions of years overflows int64(seconds).
NOTE: It is generally good practice to avoid using floating point to store epoch time (even when not using CBOR).
RawMessagefromRawMessage.MarshalCBOR(PR #753)U+FFFDreplacement character (PR #753)What's Changed
TimeRFC3339NanoUTCby @fxamacker in #688CI / GitHub Actions and Docs
🔎 Details...
New Contributors
Full Changelog: fxamacker/cbor@v2.9.0...v2.9.1
v2.9.0Compare Source
v2.9.0 adds new features, refactors tests, and improves docs. New features improve interoperability/transcoding between CBOR & JSON.
v2.9.0 passed fuzz tests and is production quality. However, the new
TextUnmarshalerfeature will continue being fuzz tested a bit longer due to recent changes. The recent changes are limited and don't affect other parts of the codec that passed ~2 billion execs fuzzing.What's Changed
Docs
CI
🔎 Details
Special Thanks
Many thanks to @benluddy for adding these new features! 🎉
New Contributors
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.