A compatibility wrapper that enables v2-style CLI usage for mockery v3.
mockery v3 removed support for direct CLI flags like --name, --inpackage, etc., and requires a YAML config file instead. This proxy allows to continue using the v2-style CLI syntax without needing to rewrite existing scripts or Makefiles.
mockery-proxy internally invokes the actual v2 command implementation from the github.com/vektra/mockery/v2/cmd package.
go install github.com/vektra/mockery/v3@v3
go install github.com/spirin/mockery-proxy@latestmv "$GOPATH/bin/mockery" "$GOPATH/bin/mockery3"
mv "$GOPATH/bin/mockery-proxy" "$GOPATH/bin/mockery"with drop-in replacement:
mockery --name MyInterface --inpackage --case underscore ...etcor without drop-in replacement:
mockery-proxy --name MyInterface --inpackage --case underscore ...etcBehaves exactly as if you were using mockery v2.
If the --config flag is passed, or no arguments are provided, the proxy forwards the call directly to the mockery v3 binary installed in your system.
with drop-in replacement:
mockery --config .mockery.ymlmockeryor without drop-in replacement:
mockery-proxy --config .mockery.ymlmockery-proxyCommands like completion, help, init, migrate, showconfig, version are also passed to v3
MIT