Welcome to the Pact Open Source August 2022 update!
I have some awesome updates for you this month!
As always, thanks to all of the contributors who have made this happen, if you haven’t been mentioned here but wish to appear in a later update, feel free to reach out to me on Slack.
Pact JS 10.x.x is now live
Get it here 👉: https://github.com/pact-foundation/pact-js
Summary of the good stuff
- Speed! - It’s quick, blisteringly quick. You’ve probably heard people talk about just how good Rust is, they weren’t wrong.
- Full support for binary payloads (both HTTP and Async) and multi-part uploads
- For Async, the ability to specify and verify message metadata
- XML support
- Ability to create and verify both v2 and v3 specification pacts
- Support for all v3 matchers and generators, and other v3 items (such as multiple provider states with parameters)
- Improved support for Hypermedia APIs such as HAL and Siren through url and arrayContaining
- Support for dynamic IDs in requests via provider state injected values (fromProviderState matcher)
- arrayContaining and eachKeyLike matchers for improved array matching
- Ability to modify request bodies and headers during verification (via requestFilter on the provider)
- Migration guide: https://github.com/pact-foundation/pact-js/blob/master/docs/migrations/9-10.md
- Workshop: https://github.com/pact-foundation/pact-workshop-js
- In Browser Tutorials
- Injecting values in provider states
- Why it’s interesting: working with autogenerated database values can be difficult
Community corner – member shout outs
Big props to the many who have helped make Pact-JS such a success, but we wanted to take a moment to give a shout out for a few whose contributions have really propelled adoption and the beta, into GA. We of course, can't forget Matt Fellows who is a machine that never sleeps, each contribution, helps Matt get 5 more minutes with the kids. Save a Matt, make a contribution.
Ron has been diligently plugging away at the Rust core, a Pact implementation written in Rust. It supports the V3 Pact specification and V4 Pact specification and provides shared libraries that can be used in other languages via foreign function interfaces (FFI).
It has now been adopted in Pact-JVM, Pact.Net, Pact-JS and Pact-Go, and although we are still ironing out issues, we are so grateful for the time Ron spends in trying to improve the landscape. I’ll let Ron explain some of the journey
One of the strengths of Pact is its specification, allowing anybody to create a new language binding in an interoperable way. Whilst this has been great at unifying compatibility, the sprawl of languages makes it hard to add significant new features/behaviour into the framework quickly (e.g. GraphQL or Protobuf support).
We have attempted to combat this time-to-market problem, by focussing on a shared implementation (the "shared core") in many of the languages. We initially bundled Ruby, because it was convenient, but have been slowly moving to our Rust core which solves many of the challenges that bundling Ruby presented.
The "shared core" approach can only take us so far, and we need another mechanism for extending behaviour outside of the responsibilities of this core. This is where I see a plugin approach working with our "shared core" model.
Pact-JS wouldn’t be half of what it is today, without Tim Jones. Outside of the PactFlow co-founders and myself, Tim has the most GitHub and Slack contributions of anyone in the Pact community, it really is staggering. He always delivers gems of well thought advice with a smile, and is an absolute delight to work with. He took a well earned break from being a full-time Pact maintainer earlier this year, but if you’ve had the time to visit the Pact Slack group, you’ve probably seen him armed with Tim’s Tech Tidbits, which we all need to encourage him to make into a YouTube series.
What has the team at Aligntech been up to? Sponsoring some of the initial implementation and XML!
Much respect to Aligntech for sponsoring the initial implementation of Pact JS v3 and XML support, we are proud to show them on our website, along with other great companies and contributors who have helped Pact become as widely adopted as it is today.
Check out Aligntech and the great work they do.
Thanks to Artur Neumann for driving beta adoption and usage (via owncloud) and providing an incredible amount of feedback on the Pact V3 release. One look at the pact-js issues and PR list shows Artur's energy in raising issues in the V3 beta, or dropping in helping contributions to the codebase.
This feedback is critical in helping us improve the tooling for all of our users, and is also highly rewarding, seeing something you’ve created or had a hand in, helping others, even if it's not quite right.
Become a contributor
If you’re passionate about Open Source, Pact or a specific language, get involved as a maintainer. There’s no minimum time commitment and you can get involved on your own terms. One thing that does make the Pact OSS so great is regular, committer contributions.
Read our Contributing page to find out many of the different ways you can get involved in Open Source, no matter what role, or skillset you hold.
That's all for now, catch you next month!
- Yousaf Nabi — Developer Advocate at PactFlow and Community Shepherd at Pact.