pact-foundation / pact-js-cli

The Broker CLI for Pact, but available to your node scripts
MIT License
2 stars 0 forks source link

Chore/reinstate api #4

Closed YOU54F closed 3 months ago

YOU54F commented 3 months ago

relates to

https://github.com/pact-foundation/pact-js-core/issues/488

Given this consideration

Many users are using this API for pact publishing, and it is re-exported by Pact-JS (or, at least, it used to be). There should be a discussion on whether it is acceptable to remove the programmatic use of Pact before merging.

and the lack of input, I would prefer to err on the side on caution to avoid breaking users existing workflows, in intrusive ways.

So the proposal is to migrate both the cli/api to pact-js-cli, removing all traces from pact-js-core.

Users will be prompted to switch to pact-cli in thier api imports, or pact-cli for npx/cli based access in bin stubs, and import both packages (pact-js & pact-js-cli, if their workflows require the pact cli tools, or access to the pact-js-core api over the cli)

Regular users of pact-js not leveraging the ruby based pact-cli functionality will benefit from smaller packages, and can choose to install the pact-cli via other mechanisms, which would reduce the payload they need to download (as pact-cli will follow the current packaging to date, in providing all supported ruby platform/arch combos in a single package)

As this will be a breaking change in pact-js-core, I propose that we release v15 in lockstep of pact-js / pact-cli, so at least at the point of most friction (our breaking change) the imports will have the same version numbers, so it will feel nice and neat.

I would like to release this first to npm, update a few of our consuming projects to point at it, before releasing the pact-js-core change, as we can provide deltas from each consuming change, as part of our pact-js-core/pact-js release notes