Releases: jbwheatley/pact4s
v0.7.0-java8
What's Changed
- Update sbt to 1.7.3 in java8 by @jbwheatley in #313
- Update scalafmt-core to 3.6.1 in java8 by @jbwheatley in #314
- add tests for auth injection by @jbwheatley in #315
- Update scala3-library to 3.2.1 in java8 by @jbwheatley in #319
- Update sbt to 1.8.0 in java8 by @jbwheatley in #320
- Update sbt-header to 5.9.0 in java8 by @jbwheatley in #328
- Update mockito-core to 4.9.0 in java8 by @jbwheatley in #329
- Update sbt-scalafmt to 2.5.0 in java8 by @jbwheatley in #330
- Update logback-classic to 1.4.5 in java8 by @jbwheatley in #327
Full Changelog: v0.6.0-java8...v0.7.0-java8
v0.7.0
What's Changed
- Update sbt to 1.8.0 in main
- Update scalafmt-core to 3.6.1 in main by @jbwheatley in #312
- add tests for auth injection by @jbwheatley in #316
- Update scala3-library to 3.2.1 in main by @jbwheatley in #317
- Update sbt to 1.8.0 in main by @jbwheatley in #318
- Update logback-classic to 1.4.5 in main by @jbwheatley in #322
- Update sbt-header to 5.9.0 in main by @jbwheatley in #323
- Update mockito-core to 4.9.0 in main by @jbwheatley in #324
- Update sbt-scalafmt to 2.5.0 in main by @jbwheatley in #325
- Update pact-jvm to 4.4.0 in main
Full Changelog: v0.6.0...v0.7.0
v0.6.0-java8
What's Changed
- Update scalafmt-core to 3.0.6 by @scala-steward in #84
- Update consumer to 4.2.14 by @scala-steward in #85
- Update http4s-circe, http4s-dsl, ... to 1.0.0-M28 by @scala-steward in #86
- Update mockito-scala to 1.16.46 by @scala-steward in #88
- Update http4s-circe, http4s-dsl, ... to 1.0.0-M29 by @scala-steward in #90
- Update sbt-ci-release to 1.5.10 by @scala-steward in #91
- Update weaver-cats, weaver-core to 0.7.7 by @scala-steward in #92
- Update scalafmt-core to 3.0.7 by @scala-steward in #93
- Don't need to add munit as a TestFramework by @agustafson in #95
- build.sbt: extract
withStandardSettings
by @agustafson in #96 - Update scalafmt-core to 3.0.8 by @scala-steward in #98
- add configurable timeout to verification step (that actually fails the tests) by @jbwheatley in #99
- Update scala-library to 2.13.7 by @scala-steward in #100
- Update sbt-projectmatrix to 0.9.0 by @scala-steward in #101
- Update sbt-commandmatrix to 0.0.5 by @scala-steward in #102
- Update scala-collection-compat to 2.6.0 by @scala-steward in #103
- Update logback-classic to 1.2.7 by @scala-steward in #105
- Update consumer to 4.1.29 by @scala-steward in #106
- Update consumer to 4.2.15 by @scala-steward in #107
- Update scalafmt-core to 3.1.1 by @scala-steward in #108
- Update scalafmt-core to 3.1.2 by @scala-steward in #112
- Update weaver-cats, weaver-core to 0.7.9 by @scala-steward in #116
- feat: 🚀 Provide Play-JSON body encoder by @gaeljw in #114
- Update http4s-circe, http4s-dsl, ... to 1.0.0-M30 by @scala-steward in #128
- Update consumer to 4.1.31 by @scala-steward in #130
- Update munit-cats-effect-3 to 1.0.7 by @scala-steward in #126
- Update sbt-scalafmt to 2.4.5 by @scala-steward in #117
- Update scalafmt-core to 3.2.1 by @scala-steward in #132
- Java8 rebase by @jbwheatley in #152
- Java8 rebase by @jbwheatley in #172
- Update weaver-cats, weaver-core to 0.7.12 in java8 by @jbwheatley in #209
- Update sbt-tpolecat to 0.3.3 in java8 by @jbwheatley in #210
- Update mockito-scala to 1.17.7 in java8 by @jbwheatley in #211
- Update scala-library to 2.12.16 in java8 by @jbwheatley in #212
- Update scalafmt-core to 3.5.8 in java8 by @jbwheatley in #213
- Update consumer to 4.1.38 in java8 by @jbwheatley in #208
- Update weaver-cats, weaver-core to 0.7.13 in java8 by @jbwheatley in #219
- Update mockito-core to 4.6.1 in java8 by @jbwheatley in #220
- Update sourcecode to 0.3.0 in java8 by @jbwheatley in #228
- Update scala-collection-compat to 2.8.0 in java8 by @jbwheatley in #229
- Update sbt-tpolecat to 0.4.0 in java8 by @jbwheatley in #233
- Update sbt to 1.7.1 in java8 by @jbwheatley in #234
- Update sbt-tpolecat to 0.4.1 in java8 by @jbwheatley in #236
- Update weaver-cats, weaver-core to 0.7.14 in java8 by @jbwheatley in #242
- Update scala-collection-compat to 2.8.1 in java8 by @jbwheatley in #243
- Update scalatest to 3.2.13 in java8 by @jbwheatley in #244
- Update consumer to 4.1.39 in java8 by @jbwheatley in #246
- Update weaver-cats, weaver-core to 0.7.15 in java8 by @jbwheatley in #251
- Update mockito-core to 4.7.0 in java8 by @jbwheatley in #252
- Update scalafmt-core to 3.5.9 in java8 by @jbwheatley in #253
- immediate shutdown of test ember server by @jbwheatley in #255
- Consumer version selectors v2 java8 by @jbwheatley in #260
- Update logback-classic to 1.4.0 in java8 by @jbwheatley in #264
- Update play-json to 2.9.3 in java8 by @jbwheatley in #265
- Update mockito-core to 4.8.0 in java8 by @jbwheatley in #268
- Update scala3-library to 3.2.0 in java8 by @jbwheatley in #269
- Update logback-classic to 1.4.1 in java8 by @jbwheatley in #274
- Update weaver-cats, weaver-core to 0.8.0 in java8 by @jbwheatley in #275
- Update scala-library to 2.12.17 in java8 by @jbwheatley in #277
- Update circe-core, circe-parser to 0.14.3 in java8 by @jbwheatley in #276
- implement default timelimiter using scala future by @jbwheatley in #280
- Update scalatest to 3.2.14 in java8 by @jbwheatley in #286
- Update logback-classic to 1.4.3 in java8 by @jbwheatley in #289
- Update sbt to 1.7.2 in java8 by @jbwheatley in #290
- Update logback-classic to 1.4.4 in java8 by @jbwheatley in #294
- Update scala-library to 2.13.10 in java8 by @jbwheatley in #295
- Handle empty params (JsonValue null) in StateChanger - java8 by @dduleba in #305
- Update sbt-ci-release to 1.5.11 in java8 by @jbwheatley in #301
- Update sbt-header to 5.8.0 in java8 by @jbwheatley in #302
- Update mockito-core to 4.8.1 in java8 by @jbwheatley in #303
- Update scalafmt-core to 3.6.0 in java8 by @jbwheatley in #304
- refactoring models to own submodule for reusable test models by @jbwheatley in #309
New Contributors
Full Changelog: v0.0.19...v0.6.0-java8
v0.6.0
What's Changed
- Update consumer to 4.3.15 in main by @jbwheatley in #283
- Update scalatest to 3.2.14 in main by @jbwheatley in #284
- Update logback-classic to 1.4.3 in main by @jbwheatley in #287
- Update sbt to 1.7.2 in main by @jbwheatley in #288
- refactoring models to own submodule for reusable test models by @jbwheatley in #308
- Update sbt-ci-release to 1.5.11 in main by @jbwheatley in #297
- Update sbt-header to 5.8.0 in main by @jbwheatley in #298
- Update mockito-core to 4.8.1 in main by @jbwheatley in #299
- Update scalafmt-core to 3.6.0 in main by @jbwheatley in #300
- Update consumer to 4.3.16 in main by @jbwheatley in #306
Full Changelog: v0.5.1...v0.6.0
v0.5.0
equivalent java 8 version is v0.5.0-java8
What's Changed
- Update consumer to 4.3.14 in main by @jbwheatley in #247
- Update weaver-cats, weaver-core to 0.7.15 in main by @jbwheatley in #248
- Update mockito-core to 4.7.0 in main by @jbwheatley in #249
- Update scalafmt-core to 3.5.9 in main by @jbwheatley in #250
- immediate shutdown of test ember server by @jbwheatley in #254
- try weaver tests in CI again by @jbwheatley in #256
- Consumer versions selectors v2 by @jbwheatley in #258
Full Changelog: v0.4.1...v0.5.0
v0.4.0
This is the first release that targets scala 3. This has been a long time coming - I first tried this in April 2021 using 3.0.0-RC2 and discovered this compiler bug that prevented moving forward: scala/scala3#12086
This has now been fixed in 3.1.3!
As usual, the java8 compatible version is available as 0.4.0-java8
.
v0.3.1
Fixes issue with provider state callbacks not inserting parameters into requests. issues #197 #122, fixed in #200 @jbwheatley
0.3.0
This version should be source compatible with 0.2.0
. Apart from version updates, in this release:
- #176 changed how data classes are defined internally and added additional convenient to use constructors for many of the models.
- #181 addressed an issue with pact forging.
pact-jvm
will not write pacts to a file if not all interactions have been registered by the mock server - e.g. if you don't have a test for each interaction. This error is now surfaced to the user and will cause the forger suite to fail if not all interactions are tested.
What's Changed
- Update weaver-cats, weaver-core to 0.7.11 by @scala-steward in #173
- Update logback-classic to 1.2.11 by @scala-steward in #175
- model class styling by @jbwheatley in #176
- Update sbt-api-mappings to 3.0.2 by @scala-steward in #179
- stabilising pact forger classes by @jbwheatley in #181
- Update consumer to 4.3.6 by @scala-steward in #182
- Update scala-collection-compat to 2.7.0 by @scala-steward in #183
- Update sbt-tpolecat to 0.2.2 by @scala-steward in #186
- Update scalafmt-core to 3.5.0 by @scala-steward in #187
- Update scalafmt-core to 3.5.1 by @scala-steward in #188
- Update sbt-tpolecat to 0.2.3 by @scala-steward in #189
Full Changelog: v0.2.0...v0.3.0
v0.2.0
- Added support for branches in consumer version selectors - see #89
Added the following methods on ConsumerVersionSelector
to facilitate these additions:
ConsumerVersionSelector().
withBranch(Branch("foo"))
For convenience we include Branch.MAIN
and Branch.MASTER
for main
and master
resp.
ConsumerVersionSelector().
withMainBranch(true)
ConsumerVersionSelector().
withMatchingBranch(true) //gets pacts with branch that is the same as the current branch name.
- Added support for consumer version selectors for deployed and released versions - see #68
As the selectors in this issue are subject to change, and more may be made available to the broker in the future, additional selectors such as these can be provided with the following method on ConsumerVersionSelector
:
ConsumerVersionSelector().
withAdditionalSelectors(Map("deployed" -> true, "environment" -> "stg"))
- Added support for publishing verification results with a branch - see #87
When verifying pacts, the argumentpublishVerificationResults
provided to the test functionverifyPacts
can be modified to specify the branch that will be associated with the verification results when they are published:
verifyPacts(
publishVerificationResults = Some(
PublishVerificationResults(
providerVersion = "ABC",
branch = Branch("feature/x")
)
)
)
- Added
apply
method forProviderInfoBuilder
apply(name: String, providerUrl: URL, pactSource: PactSource)
that takes aURL
v0.1.0
This release is quite large, including bug fixes, model changes, additional features and some major rearranging of the core
module, including many package changes.
Bug fixes
New features
- module for
play-json
support for json helpers - #114 @gaeljw - Pact spec v4 is now the default, following the upgrade to
pact-jvm
version4.3.x
for java11+ - #125 @gaeljw params
field of typeMap[String, String]
added toProviderState
class - #136 @gaeljw- Configurable optional timeout for pact verification - @jbwheatley. This will cause the test class to fail after the timeout has completed, regardless of whether the pacts are pending or not. The default timeout is 30 seconds.
//e.g.
verifyPacts(
verificationTimeout = Some(10.seconds)
)
ProviderRequestFilters
can now be composed with.andThen
- @jbwheatley. This is now the preferred method of adding the filters toProviderInfoBuilder
, e.g.:
.withRequestFiltering(
req =>
ProviderRequestFilter.SetHeaders(("Authorization", "Bearer token")) andThen
ProviderRequestFilter.RemoveHeaders("fooHeader")
)
- Provider state change can now be applied using a state change function, in addition to the current method of using a state change endpoint - #143 @jbwheatley. This can be added to the
ProviderInfoBuilder
in a pact verification suite usingProviderInfoBuilder#withStateChangeFunction(stateChange: PartialFunction[ProviderState, Unit])
orProviderInfoBuilder#withStateChangeFunction(stateChange: ProviderState => Unit)
. This feature works by spinning up an additional state-change mock server thatpact-jvm
sends a request with theProviderState
json to before each interaction is run against the mock provider. The state-change server will apply the function to the deserialisedProviderState
. The default host for this server ishttp://localhost:64646/pact4s-state-change
. If you would like to use a different host for this functionality (e.g. if that port is already in use), then you can useProviderInfoBuilder#withStateChangeFunctionConfigOverrides
to update it. e.g.:
.withStateChangeFunction {
case ProviderState("bob exists", params) => updateStateForBob(params)
case _ => ???
}.withStateChangeFunctionConfigOverrides(_.withOverrides(portOverride = 64640))
Rearranging etc.
- support for
java 8
, i.e. building usingpact-jvm
version4.1.x
was moved to its own branch, drastically simplifying thepact4s
build. Thejava 8
versions of the modules are now no longer suffixed with-java8
, instead the version number is suffixed. i.e, if before you were adding"io.github.jbwheatley" %% "pact4s-scalatest-java8" % "0.1.0"
as a dependency, you would now add"io.github.jbwheatley" %% "pact4s-scalatest" % "0.1.0-java8"
. - The
shared
module was renamed topact4s-core
. This shouldn't effect users as they shouldn't ever need to explicitly add it as a dependency - @jbwheatley - All classes that were used to define the provider information used during the pact verification suite have moved from package
pact4s
to packagepact4s.provider
- @jbwheatley. This has been done to improve the structuring of the core module. These include:
- Authentication
- ConsumerVersionSelector
- PactSource
- ProviderInfoBuilder
- ProviderRequest
- ProviderRequestFilter
- ProviderState
- ProviderTags
- ProviderVerificationOption
- PublishVerificationResults
- ResponseBuilder
- VerificationSettings
- WipPactsSince