๐ Features
- Add a unified diff renderer
- Render pact diffs as unified diffs
Migration note: the pact diff endpoints return a standard unified diff.
This covers thediff/previous-distinct,diff/version/{version}and
pact-version/{sha}/diff/pact-version/{sha}resources under
/pacts/provider/{provider}/consumer/{consumer}, and the diff notice
thatPOST /contracts/publishreturns when a publish would modify an
existing pact. Clients that parse this output must handle@@hunk
headers and unchanged context lines. Keys that exist only in the newer
pact now appear as+lines.As an example, take an interaction whose request method changes from
post to get and which gains anAcceptheader. The diff was previously:"interactions": [ { "request": { - "method": "post" + "method": "get" } } ]It is now:
@@ -6,7 +6,10 @@ { "description": "a request", "request": { - "method": "post", + "headers": { + "Accept": "application/json" + }, + "method": "get", "path": "/" }, "response": {
๐ Bug Fixes
- Require date_helper in HtmlPactRenderer
๐ Refactor
- Remove unused pact/doc generator code
- Compare pact content with Hash equality
- Move lib/pact/doc under lib/pact_broker/api/renderers
- Move the markdown pact renderer under PactBroker
- Render pact HTML from the parsed hash
๐งช Testing
- Stop snapshotting non-determinate response headers
- Replace Pact::Matchers in spec helpers with a subset matcher
๐ ๏ธ Miscellaneous Tasks
- (ci) Standardize renovate config
- (ci) Remove stale internal workflow
- Remove the pact-support dependency
Migration note: pact_broker no longer depends on pact-support, so code
alongside the broker can no longer rely on Pact::* constants. Add
pact-support to your own Gemfile if that code needs them. - (release) Render Migration-Note footers in the changelog