nestjs-pact icon indicating copy to clipboard operation
nestjs-pact copied to clipboard

Update interface to use PactV3

Open tomerslice opened this issue 1 year ago • 5 comments

Added PactV3 and testing agains nestjs-10 and pact-12

Description

Updated interface and dependencies.

Motivation and Context

I want to use new API so I need this update.

The original issue was closed, but I hope that this PR will be merged: https://github.com/pact-foundation/nestjs-pact/issues/31

How Has This Been Tested?

Using the old tests.

Types of changes

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [X] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • [ ] My change requires a change to the documentation.
  • [ ] I have updated the documentation accordingly.
  • [ ] I have added tests to cover my changes.
  • [X] All new and existing tests passed.

tomerslice avatar Dec 31 '23 09:12 tomerslice

thanks for the contrib. this is a breaking change for users and isn't transparent as you are renaming a new import under the same export.

it would need to be documented, or catered to support the v2 and v3 interfaces.

there is a choice if supporting both interfaces, how is it presented to the user. eg is it abstracted away?

please note the v4 pact js interface is now exposed and it supports async/sync messages and plugins, so this may impact any design decisions

YOU54F avatar Apr 03 '24 23:04 YOU54F

sorry for delay in getting a response over to you! if you or others do want to push this forward, we can support you. we tend to be more active over via slack.pact.io if we miss you in gh

YOU54F avatar Apr 03 '24 23:04 YOU54F

I read the docs here: Migration from pact v2 to v3 in js From my understanding, there are no breaking changes in the Provider api, which nestjs-pact uses.

tomerslice avatar Apr 21 '24 08:04 tomerslice

it uses both the consumer and provider api. you've updated the consumer in this pr as well as the provider

YOU54F avatar Apr 21 '24 16:04 YOU54F

I will update the PR to support the consumer

tomerslice avatar Apr 28 '24 06:04 tomerslice