Changelog
This is the current borer CHANGELOG:
sourceVersion 1.15.0 (2024-12-06)
---------------------------
- Added support for scala native (#633, thanks to @PhoenixmitX)
- Added support for pretty JSON rendering
- Made `alphabet` of `LookupBaseEncoding` publicly accessible
- Made `DecodingError[E]` type class contravariant
- Upgraded to Scala 3.3.4 and Scala.js 1.17.0
Version 1.14.1 (2024-07-01)
---------------------------
- Fixed codec derivation of Enums extending other types (#685)
- Improved `deriveAll` error message for simple enums
Version 1.14.0 (2024-01-27)
---------------------------
- Enabled `derives Encoder.All`, `derives Decoder.All` and `derives Codec.All`
- Added `mapOption` and `mapEither` decoder transformers
- Added `bimapOption` and `bimapEither` to codecs
- Migrated from `implicit` to `given` and `using` where easily possible
- Removed @inline and replaced with `inline` where it seems like a good idea
- Switched ScalaJS source maps from local to globally reachable paths (#684)
Version 1.13.0 (2023-12-22)
---------------------------
- Point ScalaJS source maps to github (#684)
- Improve auto-generation of ADT type ids (#685)
Version 1.12.0 (2023-10-13)
---------------------------
- Upgraded to Scala 3.3.1 and Scala.js 1.14.0
- Added `derives` support for Encoder, Decoder and Codec
- Added check for correct ByteOrder when reading ByteBuffers (#675)
- Updated documentation site for Scala 3 (#625)
Version 1.11.0 (2023-07-31)
---------------------------
- Upgraded to Scala 3.3.0
- Added compat-pekko module in analogy to compat-akka (#657, thanks to @abrighton)
Version 1.10.3 (2023-05-12)
---------------------------
- Significantly improved `deriveAll` macros:
- detection of inter-ADT dependencies also in nested type arguments (#631)
- better detection and automatic resolution of cyclic inter-ADT dependencies (#630, #632)
- Further decreased stack pressure of derivation macros by moving all recursion onto the heap (#608)
Version 1.10.2 (2023-02-09)
---------------------------
- compat-circe: simplified map decoding (#584)
- Fixed decoding error on extra members for nullary case classes and objects with MapBasedCodecs (#600)
- Decreased stack pressure of derivation macros by partially unrolling loops (#608)
Version 1.10.1 (2022-07-43)
---------------------------
- Changed to Java-8-compatible build
Version 1.10.0 (2022-07-14)
---------------------------
- Upgraded to Scala 3, dropped support for Scala 2.13
(use version 1.8.0 for Scala 2.13)
- Added support for the new Scala enums
Version 1.8.0 (2022-07-12)
--------------------------
- Implemented DOM rendering, improve DOM API (breaking)
- Refactored Logging API and implementation for features and flexibility
- Fixed StringNumbers, StringBooleans not working for boxed values (#567)
- Enable StringNumber decoding also for BigInt and BigDecimal (#568)
Version 1.7.2 (2021-04-29)
--------------------------
- fixed broken `Dom.MapElem.to[Map]` and `Dom.MapElem.toStringKeyed[Map]`
- re-enabled cross-building for Scala 2.12 (removed in 1.7.0)
Version 1.7.1 (2021-04-27)
--------------------------
- fixed type aliasing of basic types tripping up derivation (#388)
- fixed macro hygiene problem around `scala.Unit` (#367)
Version 1.7.0 (2021-04-06)
--------------------------
- added transcoding feature
- improved DOM and DOM.Transformer
- removed unused `buffer` parameter from `ToOutputStreamOutput`
- removed support/cross-building for Scala 2.12
- upgraded to Scala 2.13.5 and latest versions of all dependencies
Version 1.6.3 (2020-11-06)
--------------------------
- reenabled build and publishing of `compat-circe-js` (#309)
- fixed missing map member errors not honoring @key annotations (#312)
- added `io.bullet.borer.derivation.DerivationConfig` (#311)
Version 1.6.2 (2020-10-08)
--------------------------
- compat-akka: add codecs for typed and classic ActorRefs (#208)
- added ConcatEncoder (#289)
- added Codec#withEncoder and Codec#withDecoder helpers
- fixed ArrayIndexOutOfBoundsException when logging certain illegal input or output
Version 1.6.1 (2020-07-24)
--------------------------
- fixed StackOverflowError during encoding of BigInt/BigDecimal with `borer-compat-circe` (#269)
- upgraded to Scala 2.12.12 / 2.13.3
Version 1.6.0 (2020-05-07)
--------------------------
- fixed decoding of non-primitive empty arrays (#227)
- fixed derivation failing for tagged basic types
- renamed `Default.get` to `Default.of`
- split out `borer-deriver` module (so far undocumented)
Version 1.5.0 (2020-03-06)
--------------------------
- upgraded to ScalaJS 1.0.0
- fixed buffer caching breaking nested encoding/decoding calls (#186)
- added `borer-compat-cats` module (#191)
- added `toByteArrayEither` and `toByteBufferEither` to `EncodingSetup.Api`
- extended default encoder coverage to IterableOnce on 2.13 and TraversableOnce on 2.12 (#182)
- renamed `Encoder.forIterable` to `Encoder.fromFactory`
- improved the default encoding for `Either` (breaking change!)
Version 1.4.0 (2020-01-23)
--------------------------
- compat-akka: made marshalling target format preference configurable, switch default to JSON (#148)
- fixed generation of stacked type ids in certain cases (#145)
- fixed derived ADT decoders not reading type ids with certain mixed (String/Long) keys
Version 1.3.0 (2020-01-10)
--------------------------
- added fully automatic codec derivation for ADT hierarchies (#36)
- added `Dom.Transformer` and `Dom.Transformer.ToJsonSubset` (#143)
- added `CompactMapBasedCodecs`
- removed `ArrayBasedCodecs.deriveUnaryXXX`
- fixed `AdtEncodingStrategy.flat` defunct within certain wrapping elements (#142)
- fixed `AdtEncodingStrategy.flat` broken for stacked ADTs (#144)
Version 1.2.1 (2019-12-05)
--------------------------
- improved JSON parsing performance (numbers by about 20%)
Version 1.2.0 (2019-12-04)
--------------------------
- added `borer-compat-circe` module (#113)
- renamed `Decoder.forBigInteger` to `Decoder.forBigInt` for consistency
- optimized JSON number parsing (#114, thanks to @plokhotnyuk)
- fixed missing type bound on `Reader` type alias
Version 1.1.0 (2019-10-17)
--------------------------
- added `ByteStringArrayCodecs` for compact encoding of primitive arrays
- added configurable ThreadLocal caching of char- and byte buffers (#78)
- added support for reading directly from `InputStream` instances
- enabled easy summoning of implicit Encoder/Decoder type classes (#77)
- removed codec for `Either` from default implicit scope (#64)
- renamed `Codec.implicitly` to `Codec.of`
- improved akka-http compat (#62)
- improved debug logging w/ ability to collapse long arrays/maps (#74)
- simplified and cleaned-up top-level decoding- and `Input` API
Version 1.0.0 (2019-09-18)
--------------------------
- fixed two bugs in `AdtEncodingStrategy.flat` (#55)
- added missing `ArrayBasedCodecs.deriveUnaryDecoder` (#54)
- added automatic akka-http (un)marshaller construction
- removed unused type parameter from EncodingSetup.Api
Version 0.11.1 (2019-08-13)
---------------------------
- fixed bug in ToByteBufferOutput (#52)
- added encoders and decoders for "as-string" support of numbers, booleans and `null`
- enabled custom codecs for basic types (#42)
- further improved JSON parsing performance from byte arrays on JVM
Version 0.11.0 (2019-08-05)
---------------------------
- renamed `deriveXXXForUnaryCaseClass` to `deriveUnaryXXX`
- added support for deriving codecs for case objects (#44)
- added alternative "flat" encoding for ADTs (#38)
- added selection of base encodings and default json codec for Array[Byte] (#40)
- added helpers for target-specific codecs (#41)
- added support for efficiently reading/writing char arrays
- added missing `implicit` marker on `Codec.bimap`
- made MapBased encoding skip basic members matching default value (#50)
Version 0.10.0 (2019-07-11)
---------------------------
- renamed method `bytes` (and friends) of `EncodingSetup#Sealed` to `result`
- renamed `...Bool` to `...Boolean` everywhere, for consistency
- removed `forCaseClass` macros from `core` module (use array-based derivation instead)
- removed dependendy on magnolia
- added alternative codec for Options (`NullOptions`) (#29)
- added `Codec.bimap` (#25)
- added support for directly reading from and writing to files
- added support for reading from `Iterator[Input]`
- added support for writing to `java.io.OutputStream`
- improved codec derivation (#28, #31)
- fixed key collision error when deriving codec for diamond ADT (#34)
- extended `Decoder[Array[Byte]]` to also accept arrays (#15)
- expanded benchmarking scope to also include upickle and jsoniter-scala
- enabled unified Scala 2.12/2.13 cross-building
- added paradox-based project website
Version 0.9.0 (2019-05-11)
--------------------------
- significantly improved JSON support on all fronts
- changed map-based ADT encoding to single-element map
- renamed `Encoder.compose` to `Encoder.contramap`
- renamed @TypeId to @key, add support for custom map-key naming
- fixed MapBasedCodecs to properly skip complex, extra data elements
- fixed failing derivation for types with java annotations (#13)
- fixed `Codec.forCaseClass` failing for generic case classes (#16)
- added `Input`, `Output` and `ByteAccess` for `java.nio.ByteBuffer`
- added configurable automatic conversion of integers to floating point values (#3)
- added `Nullable[T]` and `Default[T]` abstraction
- added special support for Options with default value `None`
- added support for up to 128 case class members
- hardened CBOR BigInteger and BigDecimal decoding (#8)
- improved error position reporting
- refactored `Input` design for more flexbility in supporting diverse input sources
- internalized magnolia for various patches and Scala 2.13 support
- added Scala 2.13 build (in the `scala2.13` branch, for now)
Version 0.8.0 (2019-04-13)
--------------------------
- added JSON support
- simplified package structure (`io.bullet.borer.core.Cbor` is now `io.bullet.borer.Cbor`)
- added @inline annotations to selected methods likely relevant for JS perf
- flexibilized derived codecs to always accept indefinite-length as well
- added comparative performance benchmarks (JSON only so far)
- introduced "NumberString" abstraction for cleaner & faster JSON decoding
- added missing pre-defined decoder for `HashMap[T]`
- extended pre-defined `Array` codec to also support primitives (issue #2)
- many other larger and smaller improvements across the whole library
Version 0.7.0 (2019-03-08)
--------------------------
borer-core:
- simplified API by removing explicit `Bytes` type parameter from all abstractions
- allowed for mixed `ByteAccess` in a single encoding / decoding run
- various smaller improvements
borer-akka & border-scodec:
- added missing Codecs for akka ByteString and scodec ByteVector
Version 0.6.0 (2019-03-06)
--------------------------
borer-core:
- refactored main entry-point DSL for clarity and convenience
borer-core & borer-derivation:
- Removed array-wrapping of derived codecs for `Product1` types
Version 0.5.1 (2019-03-05)
--------------------------
borer-derivation:
- Fixed broken round-trip of `deriveCaseClassCodec` for zero- and single-member case classes
Version 0.5.0 (2019-03-04)
--------------------------
first public release
1.15.0