Currently, to make an update to core behaviour in the Pact JS library, we depend on the following upstream NPM dependencies to be updated before they are made available to pact-js:
These libraries in one way or another wrap the underlying Ruby libraries that provide core Pact functionality.
These capabilities have been amalgamated into a single Ruby package: https://github.com/pact-foundation/pact-ruby-standalone/ for convenience of library authors.
Pact Python and Pact Go take the simpler approach of embedding this directly in the main repository and do away with extra dependencies.
Pact Go has the advantage of distributing as a releasable binary package, and thus can create OS specific packages at release time.
Python pulls in the correct OS at install time.
Pros and Cons of each approach
Advantages of separate repositories:
Disadvantages
package-lock.json properly, as the optional dependency will lock in the incorrect OS. See https://github.com/pact-foundation/pact-node/issues/42 for backgroundOptions
pact-provider-verifier-npm, pact-mock-service-npm) into a single standalone wrapper, which uses preinstall to dynamically install the correct ruby standalone and postinstall to validate the installationpact-provider-verifier-npm and pact-mock-service-npm and bring into pact-nodepact-provider-verifier-npm, pact-mock-service-npm and pact-node and move _everything_ into pact-jsI'm all for going as flat as possible. Whichever model allows us to push out updates the most easily, I'm for.
As a starting point, I've just created a new repo to flatten the two npm repositories into one: https://github.com/pact-foundation/pact-standalone-npm.
As part of bringing this into pact-node, we'll transition over to using the service command (over start) which should start to resolve a number of Windows issues.
Stay tuned.
@mefellows you can merge the mock service and verifier together, potentially from the ruby side to make it easier, but you can't merge pact-node and the pact-x-npm repos. The latter creates and deploys separate OS/Architecture specific binaries, while pact-node just downloads the one that meets the user's criteria.
Personally, I'd prefer to spend that time to actually get the rust implementation ready and just use that instead.
How's your Rust @mboudreau ;-)
OK, see https://github.com/pact-foundation/pact-standalone-npm and https://github.com/pact-foundation/pact-node/pull/45. Things are moving.
Once this is done, I can pick back up some of the other key issues, namely #84, #81 and moving all commands to use 'service' to fix the windows forking issue.
Closing - the upgrade to pact-node 5.x.x (not too far away) will address this.
See https://github.com/pact-foundation/pact-js/tree/feat/pact-node-5xx for WIP branch.
Most helpful comment
I'm all for going as flat as possible. Whichever model allows us to push out updates the most easily, I'm for.