pact-foundation / pact-js-cli

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

feat: create os/arch specific npm optional deps for pact-ruby-standalone #14

Closed YOU54F closed 2 months ago

YOU54F commented 4 months ago

Motivation

Currently we provide a fat npm package, with the associated pact ruby standalone library for each supported os/arch combo.

It would be neat to leverage the NPM ecosystems optional dependencies and os/arch resolver, in order to reduce the payload delivered for any particular install (which will be for a single os/arch system anyway when executed)

Related issues

Approach

As documented in https://blog.orhun.dev/packaging-rust-for-npm/

Related repo - https://github.com/orhun/packaging-rust-for-npm

Testing

my target platform darwin-arm64

npx --package=@you54f/pact-cli@17.0.0 -c 'pact-broker version'

npx --package=@you54f/pact-cli@17.0.0 -c 'pact-broker version'

1.75.3