Hey all, what is the difference between `Pact` and...
# pact-js
j
Hey all, what is the difference between
Pact
and the versioned exports in this case? How do I determine which one to use?
Copy code
import { Pact, PactV3, PactV4 } from '@pact-foundation/pact';
1
I ask here because this is somehow unclear in the repository and any docs surfaced via search.
m
They represent spec version compatibility.
j
Indeed, but what is the version of
Pact
?
m
V2. It's a legacy version. I would use the V3 as a default as it has wider support with other languages https://github.com/pact-foundation/pact-js/blob/master/docs/consumer.md V4 has yet to be fully documented
The docs could be clearer on this point
j
Works for me, thank you @Matt (pactflow.io / pact-js / pact-go)!
m
I'll review those docs next week, and try to make it clearer. They were introduced with each new spec version, but support serialising multiple versions (adding to this confusion)
🙌 1