feat: V4 Asynchronous Messages (issue #1186) - #1482
Conversation
|
Thanks for this @valkolovos 🚀 I've popped myself and Matt on as reviewers and will aim to test it out early next week. Looks good from a quick eyeball. We will probably need to revisit the messaging docs, just to ensure they are correct and if any additions are required off the back of this change, they are included https://github.com/pact-foundation/pact-js/blob/master/docs/messages.md but that can hold off a bit until we've done a technical review. |
|
Added an example to the pact-workshop-message sample. pact-foundation/pact-workshop-message@main...valkolovos-feat/issue-1186_v4_async_messages I think we need to support the |
|
OK, I've taken a review of this today. Thanks very much. It definitely works as is, however we need to think about some of the extensibility angles (including the plugin interface). Some background With the introduction of V4, including plugins, the interface (including the use of FFI) got a bit more complicated. After some experimentation and feedback, we landed on a type-state builder approach, which meant that you could only call methods after pre-requisite methods were called - i.e. the interface itself attempted to address validation errors, rather than relying on lots of internal state handling and guards. In particular, you'll note this pattern is used to discriminate between regular and plugin-based interactions which have different setup requirements. With this in mind, there are a few changes required to be incorporated here, primarily for consistency with the rest of the V4 interface:
Most of those types exist in the other PR anyway, but your PR includes the Plan
I'll add you as a co-author to the commits. |
|
Thanks @mefellows! I originally planned to add the "withMetadata" functionality and just hadn't had time to do that yet. Do you still want me to get that done or are we good for now? |
|
As discussed, I'm going to close this in favour of the rebased changes here: #1520 |
npm run distworks locally (this will run tests, lint and build)This PR adds support for AsynchronousMessages to the V4 Pact