Skip to content

Releases: dogmatiq/dapper

Version 0.6.0

20 Aug 22:00
v0.6.0
bfd2f7e
Compare
Choose a tag to compare
Version 0.6.0 Pre-release
Pre-release

This release is largely centered around a refactoring of the Config type and the way that a Printer is configured. It should not affect most users, but does introduce some breaking changes for filter authors.

Added

  • Added Annotator, Config.Annotators and WithAnnotator, to add user-defined text annotations to rendered values.
  • Added NewPrinter() function, that accepts the following functional options:
    • WithFilter()
    • WithDefaultFilters()
    • WithAnnotator()
    • WithUnexportedStructFields()
    • WithPackagePaths()

Changed

  • [BC] Replaced Config.OmitUnexportedFields with RenderUnexportedStructFields, note the logic is inverted.
  • [BC] Replaced Config.OmitPackagePaths with RenderPackagePaths, note the logic is inverted.
  • Bumped the minimum supported Go version to 1.21.

Removed

  • [BC] Removed DefaultPrinter, use NewPrinter() instead.
  • [BC] Removed Config.Indent and DefaultIndent constant.
  • [BC] Removed Config.RecursionMarker and DefaultRecursionMarker constant.
  • [BC] Removed Config.ZeroValueMarker and DefaultZeroValueMarker constant.

Fixed

  • Renderer.Config() and Renderer.WithModifiedConfig() now properly clone the slices within Config.

Version 0.5.3

07 Apr 22:17
v0.5.3
83fb77d
Compare
Choose a tag to compare
Version 0.5.3 Pre-release
Pre-release

Fixed

  • Fixed rendering of named types that was accidentally removed in [0.5.2].

Version 0.5.2

07 Apr 21:47
v0.5.2
46fc3a7
Compare
Choose a tag to compare
Version 0.5.2 Pre-release
Pre-release

Changed

  • interface{} is now rendered as any.
  • Zero-valued arrays are now rendered with the "zero value marker", similarly to structs.

Fixed

  • Fixed inconsistent rendering of "element" type names within pointers, channels, maps, slices and functions.

Version 0.5.1

03 Mar 21:50
v0.5.1
c94407c
Compare
Choose a tag to compare
Version 0.5.1 Pre-release
Pre-release

Changed

  • Use zero-allocation natural sorting algorithm from dogmatiq/jumble.

Version 0.5.0

27 Jul 22:58
v0.5.0
11986ec
Compare
Choose a tag to compare
Version 0.5.0 Pre-release
Pre-release

This release includes several changes to the experimental Filter system in preparation for unification of built-in and custom rendering behavior.

Added

  • Added Renderer interface.
  • Added ErrorFilter. Output for types that implement error now include the error message.
  • Added Is(), AsConcrete() and AsImplementationOf() helpers for use in Filter implementations.

Changed

  • [BC] The signature of Filter has changed to accept a Renderer and Value.
  • [BC] Renamed ReflectTypeFilter to ReflectFilter, it now applies to the entire reflect package.
  • [BC] Renamed ProtobufFilter to ProtoFilter.
  • [BC] Changed Config.Indent to a string.

Removed

  • [BC] Removed DurationFilter. TimeFilter now applies to the entire time package.
  • Removed dependency on [Iago]

Fixed

  • Fixed duplicate application of Filter that apply to specific interfaces when when T and *T both implement the interface.

Version 0.4.6

27 Feb 03:35
v0.4.6
e024c9a
Compare
Choose a tag to compare
Version 0.4.6 Pre-release
Pre-release

Fixed

  • Fix rendering of sync.RWMutex under Go v1.20

Version 0.4.5

07 Aug 12:20
v0.4.5
69e7349
Compare
Choose a tag to compare
Version 0.4.5 Pre-release
Pre-release

Fixed

  • StringerFilter now takes precedence over all other filters
  • FilterPrinter.Fallback() now only skips the filter it was called from

Version 0.4.4

07 Aug 11:27
v0.4.4
0f9316f
Compare
Choose a tag to compare
Version 0.4.4 Pre-release
Pre-release

Added

  • Add dapper.Stringer interface for types that produce their own dapper representation

Changed

  • Rendering of Protocol Buffers messages is now consistent with other types

Version 0.4.3

27 Apr 22:09
Compare
Choose a tag to compare
Version 0.4.3 Pre-release
Pre-release

Added

  • Improved rendering of protocol buffers messages (thanks @mrubiosan)

Version 0.4.2

22 Apr 05:30
Compare
Choose a tag to compare
Version 0.4.2 Pre-release
Pre-release

Added

  • Add OmitUnexportedFields option (thanks @mrubiosan)