Skip to content

Releases: petergtz/pegomock

v4.0.0

11 May 16:10
Compare
Choose a tag to compare

Changes

This release removes a lot of cruft from Pegomock. Reflection-based and sourced-based mock generation have been removed, because they don't support generics. The only and default method for mock generation is based on golang.org/x/tools/go/packages.

It also removes a lot matchers and matcher code, that is not necessary anymore, now that matchers can use generics too.

The README was updated to document these changes.

Migrating code from v3 to v4

Replace all matcher calls such as EqString(...) and EqInt(...) with the simpler Eq(...).

v3.0.1

04 May 12:12
Compare
Choose a tag to compare

Changes

  • Fix bug where generated files would have a wrong import name for the pegomock package

v3.0.0

03 May 19:26
Compare
Choose a tag to compare

This release drops support for non-Go modules based setups. For those still requiring this support, it's recommended to stick with version 2.

There are no breaking API changes with the switch to v3. Migration from version 1 or 2 involves two steps:

  1. Change import paths as follows:
    -import "github.com/petergtz/pegomock"
    +import "github.com/petergtz/pegomock/v3"
  2. Install the latest pegomock binary via
    go install github.com/petergtz/pegomock/v3/pegomock@latest

For step 1, make sure to change sub-packages as follows:

-import "github.com/petergtz/pegomock/ginkgo_compatible"
+import "github.com/petergtz/pegomock/v3/ginkgo_compatible"

v2.9.0

09 Dec 21:29
Compare
Choose a tag to compare

Changes

  • Fix empty unnamed struct matcher generation (#109)
  • Add NotEqualsMatcher and generated matcher factory (#113)
  • Extracting separate ArgumentMatcher ifc with no FailureMessage (#114)

v2.8.0

08 Jul 23:03
Compare
Choose a tag to compare

Changes

  • Fix "Too many open files" error in remove command (#99)
  • Fix a bug when multiple interfaces were parsed (#104)
  • Add issue template
  • Avoid duplicate imports when generating matchers of map types (#106)

v2.7.0

16 Oct 20:05
Compare
Choose a tag to compare

Sorry, this is basically a release with no changes, but I realized I had published 2.6.0 without having its commits on master and that seemed weird. However, I couldn't just fast-forward master, because it had already diverged. Hence, publishing this pseudo-release. Now everything should be in sync again. Yay!

v2.6.0

28 Sep 21:06
Compare
Choose a tag to compare

Changes

  • Fix logic when empty variadic arg is provided (#87)
  • Generate custom matchers for variadic types (#90)
  • Add missing matcher and InOrderContext to ginkgo_compatible (#80)
  • Commit generated matchers for pegomock tests (#91)

v2.5.0

21 May 22:03
Compare
Choose a tag to compare

Changes

  • Add support for recursively embedded interfaces.

v2.4.0

21 May 07:32
Compare
Choose a tag to compare

Changes

  • Add support for Go modules, i.e. pegomock can generate mocks in a directory outside of GOPATH (thanks, @MrCreosote)

v2.3.0

14 May 10:59
Compare
Choose a tag to compare

Changes

  • Allow channels with no direction as return value for callback stubs, even when return type has a direction.