Repository navigation
Immutable
release. Only release title and notes can be modified.
⚠ BREAKING CHANGES
- json: validate numeric fractions and exponents
- json: cborg/json sorts map keys by UTF-8 bytes, not UTF-16 code units.
- encode: encoded float16 subnormals that are not powers of two (multiples of 2^-24 below 2^-14) are now a 3 byte f9 item, not 5 bytes. Anyone hashing or comparing those bytes sees different output.
- encode: anyone encoding boxed Number, String, Boolean or BigInt objects now gets the primitive's bytes. Before, they got an empty map or an index-keyed map (new String('a') gave {"0":"a"}).
- decode: the decode option strictUtf8 is removed. Callers still passing it get replacement-character decoding instead of an error. Rename it to rejectInvalidUtf8.
- encode: encode() of a Map whose keys encode to equal bytes, and encodeInto() with a destination that is not a Uint8Array, now throw. Both produced malformed or corrupt output before. Output from
- encode: type-level only. ByteWriter in cborg/interface drops chunks and requires pushArr(number[]) and pushBytes(Uint8Array). TypeScript code implementing ByteWriter or reading writer.chunks will not compile. No runtime export or encoded output changed.
Features
- bench: compare base and head in separate processes and comment on PRs (#237) (bc02bfd)
- cli: annotate tags and decode CIDs in diagnostic output (1db60bc)
- cli: expand tag 24 embedded CBOR in diagnostic output (2a66a4d)
Bug Fixes
- cli: make diagnostic output consistent and reject malformed input (#240) (e0b5a0d)
- cli: validate --width, reject lossy JSON output, drop stack traces (#238) (60f70da)
- decode: reject duplicate tagged-Map keys before values (cc8d7cb)
- decode: rename strictUtf8 to rejectInvalidUtf8 (#234) (fa82030)
- encode: encode all float16 subnormals as float16 (#236) (3b0ad88)
- encode: reject duplicate map keys and invalid encode inputs (#233) (1ca3eb7)
- encode: unbox Number, String, Boolean and BigInt objects (#235) (05d4420)
- json: sort map keys by UTF-8 bytes (24eb632)
- json: validate numeric fractions and exponents (3d175a0)
Performance Improvements
- encode: sort short ASCII object keys without tokens (#231) (716b14f)
- encode: use a flat byte writer, remove the chunk-list Bl (#229) (3d3fbed)
Code Refactoring
- cli: build diagnostic output from a diagnose() model (970b67f)