Skip to content

version 1.0.0

Latest
Compare
Choose a tag to compare
@aaronhuggins aaronhuggins released this 15 Jun 18:15
· 1 commit to main since this release

⚠️ BREAKING CHANGES IN THIS RELEASE ⚠️

  • Redesigned API to align with the JSON API in ECMAScript
    • Dropped support in the decoder for taggedValue and simpleValue callbacks
    • encode now takes an optional replacer function argument to align with JSON.stringify
    • decode now takes an optional reviver function argument to align with JSON.parse
    • decode not takes an optional object to set mode and dictionary behaviors
    • Aliases of parse for decode and binarify for encode are now exported
    • Added Sequence class for encoding and decoding CBOR Sequences
    • Improved TaggedValue to accept number or bigint tags
    • Improved SimpleValue for use as a round-trip encode/decode mechanism
  • Updates to decode and encode algorithms to conform very closely to RFC 8949, the latest CBOR revision
  • Adds lots of other RFCs
    • Typed Arrays (RFC 8746)
    • CBOR Sequences (RFC 8742)
    • Strictness (required for COSE RFC 8152)
  • Support for bigint; applications will now get bigint for integers outside the ECMAScript number safe range
  • Support for Map; applications may use Map to encode and decode non-string keys
  • Refactored code to target Deno
  • Code is transpiled for Node.js using both ES Modules and CommonJS

What's Changed

New Contributors

Full Changelog: 0.4.0...1.0.0