From 35520f7cd840357f931f84f11754c97d8e3095d3 Mon Sep 17 00:00:00 2001 From: Marin Atanasov Nikolov Date: Mon, 19 Aug 2024 15:37:18 +0300 Subject: [PATCH] CHANGELOG: document v4.0.0 --- CHANGELOG.org | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/CHANGELOG.org b/CHANGELOG.org index 13797d4..a74eca9 100644 --- a/CHANGELOG.org +++ b/CHANGELOG.org @@ -1,3 +1,45 @@ +* 2024-08-19 + +Release =v4.0.0= has been tagged. + +This release contains breaking changes. + +Minimum Go version required to use =go-vcr= is set to =1.22=. + +The import path for =recorder= and =cassette= packages has changed and now they +reside in: + +- =gopkg.in/dnaeon/go-vcr.v4/pkg/cassette= +- =gopkg.in/dnaeon/go-vcr.v4/pkg/recorder= + +Only version =2= of the cassette format is now supported. + +The =recorder.Options= struct has been removed. Instead of it, we can now use +functional options to configure the recorder. + +The following =recorder.Option= functions may be used to configure the recorder. + +- =recorder.WithCassette= - sets the name of the cassette +- =recorder.WithMode= - sets the mode of the recorder +- =recorder.WithRealTransport= - sets the underlying transport used by =go-vcr=. +- =recorder.WithBlockUnsafeMethods= - blocks unsafe methods, if set to =true=. +- =recorder.WithSkipRequestLatency= - simulates request/response latency, if set to =true=. +- =recorder.WithPassthrough= - configures passthrough handlers +- =recorder.WithHook= - configures recorder hooks +- =recorder.WithMatcher= - configures the matcher to be used +- =recorder.WithReplayableInteractions= - allows interactions to be replayed multiple times, if set to =true=. + +The =cassette.OnRequestReplayFunc= type has been removed. Instead of it, users +should use a =recorder.BeforeResponseReplayHook=. + +The =cassette.DefaultMatcher= is now stricter. See [[https://github.com/dnaeon/go-vcr/pull/98][#98]] and [[https://github.com/dnaeon/go-vcr/pull/99][#99]] for more details. + +Added support for blocking Unsafe HTTP Methods. The definition of Safe Methods +comes from [[https://datatracker.ietf.org/doc/html/rfc9110#name-safe-methods][RFC 9110, section 9.2.1]]. See [[https://github.com/dnaeon/go-vcr/pull/100][#100]] for more details. + +Added support for server-side recording and replaying. See [[https://github.com/dnaeon/go-vcr/pull/101][#101]] for more +details. + * 2024-03-13 Release =v3.2.0= has been tagged.