Skip to content

Releases: dnaeon/go-vcr

v4.0.0

19 Aug 12:40
Compare
Choose a tag to compare

v3.2.0

13 Mar 13:29
Compare
Choose a tag to compare

v3.1.2

25 Oct 18:11
Compare
Choose a tag to compare

New field called DiscardOnSave has been added to the cassette.Interaction type, which allows for a hook to set it to true, and as a result to discard the interaction from saving it on disk.

See #80 for more details.

v3.1.1

27 Sep 09:37
Compare
Choose a tag to compare

Cassettes with no recorded interactions will be saved on disk. Previous behaviour was to skip saving the cassette at all.

See #79

v3.1.0

23 Aug 15:46
Compare
Choose a tag to compare

NOTE: This version contains breaking API change.

Summary of changes since previous release.

  • The recorder.FilterFunc has been removed. It is now replaced by recorder.HookFunc type.
  • The Recorder.AddFilter() and Recorder.AddPreSaveFilter() methods have been removed. They are now replaced by the Recorder.AddHook() method.
  • Added different kinds of hooks supported by the recorder - AfterCaptureHook, BeforeSaveHook and BeforeResponseReplayHook.

v3.0.1

19 Aug 19:21
Compare
Choose a tag to compare

Minor updates, adding two new utility methods to the recorder, which can be used to inspect the state of the recorder and the cassette.

  • IsRecording()
  • IsNewCassette()

See #76

v3.0.0

19 Aug 10:27
Compare
Choose a tag to compare

go-vcr v3 is ready.

NOTE: This release is not backwards-compatible with previous versions of the cassettes used by go-vcr. If you are upgrading to v3 you should re-create your test cassettes.

A summary of changes for this release:

  • API has been refactored and cleaned up
  • Custom recorder options are now specified as recorder.Options
  • The recorder modes which are now supported are ModeRecordOnly, ModeRecordOnce, ModeReplayOnly, ModeReplayWithNewEpisodes and ModePassthrough. Please refer to the API documentation for more details on their use cases
  • In order to create recorders with custom options you should use the recorder.NewWithOptions function from now on
  • The default mode of the recorder is now ModeRecordOnce
  • ModeDisabled has been removed and is now replaced by ModePassthrough
  • Cassette format has been changed and the supported version of the cassette from now on is v2.
  • Additional fields have been added to the cassette to allow developers to create more complex matchers based on the existing fields
  • Each interaction in the cassette now has a unique integer id, specifying the position of the interaction in the cassette
  • Utility method on the recorder can now return a pre-configured HTTP client with the recorder's transport - GetDefaultClient()
  • CI/CD pipeline has been transferred to Github actions
  • Closed out some long standing issues
  • Extended and refactored test cases
  • etc

v2.3.0

16 Aug 16:26
Compare
Choose a tag to compare
  • Cleaned up v2 package structure
  • Switched from gopkg.in/yaml.v2 to gopkg.in/yaml.v3. Closes #70 and #71
  • Package import path for go-vcr has changed from github.com/dnaeon/go-vcr to gopkg.in/dnaeon/go-vcr.v2. See #73
  • v2 of go-vcr resides in the v2 branch, which is now the default
  • Fixed a regression where the default mode of the recorder has been changed. See #72

v2.1.0

15 Aug 17:45
Compare
Choose a tag to compare

Update to gopkg.in/yaml.v3

v2.0.1

24 Jun 15:30
Compare
Choose a tag to compare

This release contains a breaking change. When upgrading to v2.0.0 make sure that you re-create your cassettes.

A new flag of the recorder.Recorder (the SkipRequestLatency one) is supported which allows to skip latency simulation during replay.

See #63 for more details.