Skip to content

Releases: petergtz/pegomock

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.

v2.2.0

10 Apr 19:27
550445b
Compare
Choose a tag to compare

Changes

  • Make sure numbered import paths have a stable sort order between generate commands to avoid unnecessary diffs. Thanks @hferentschik for the PR.

v2.1.0

05 Mar 19:58
Compare
Choose a tag to compare

Changes

  • Introduce new CLI flag --mock-name to customize the generated mock name (Thanks @relnod)
  • Fix channel directions in generated mocks when using flag --use-experimental-model-gen (Thanks @lkysow)
  • Use stable Go version in Travis CI build instead of tip

v2.0.3

13 Feb 23:33
Compare
Choose a tag to compare

Changes

Undo package name determination through AST parsing

This is not covering certain use cases and needs more testing before it can be made available.

See also: #77

v2.0.2

13 Feb 21:46
Compare
Choose a tag to compare

Changes

This release fixes the package name generation by using a smarter algorithm. Specifically directories with dashes in the directory base names have bitten people more than once in the past (including me).

Here's how the new algorithm works: It first checks if there are already _test.go files in the directory where the mock file is created and uses the test package name if possible. If no test files are present it looks for .go files and uses their package name + _test. If no .go files exist at all in the directory, it uses the directory base name and converts potential -s to _s to make Go happy.

This algorithm is a bit slower than code used to be, but also more robust. If people see a problem with that, please open an issue. A workaround is to simply provide the package name via --package. That will be very fast.

v2.0.1

01 Feb 15:01
Compare
Choose a tag to compare

Changes

  • Use goreleaser from now on to provide binaries along with releases

v2.0.0

17 Jan 21:39
Compare
Choose a tag to compare

Changes

This major release introduces non-global fail handlers. Check the documentation on how to set up the mocks. Also, please re-generate your mock files to make it compatible with this version of Pegomock.

v1.0.0

16 Jan 22:18
Compare
Choose a tag to compare

Pegomock has been in use by several people and organizations, and has stabilized over the time. It seems to be the right time to mark the current version as 1.0.0.

Versioning will also make it possible to introduce changes that will require re-generating existing mocks and communicate such changes to users by bumping the major version number.