feat: create os/arch specific npm optional deps for pact-ruby-standalone#14
Merged
YOU54F merged 1 commit intopact-foundation:mainfrom Sep 6, 2024
YOU54F:feat/opt_deps_platform_specific
Merged
feat: create os/arch specific npm optional deps for pact-ruby-standalone#14YOU54F merged 1 commit intopact-foundation:mainfrom YOU54F:feat/opt_deps_platform_specific
YOU54F merged 1 commit intopact-foundation:mainfrom
YOU54F:feat/opt_deps_platform_specific
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
package-lock.jsonwhen reinstalling withnode_modulespresent npm/cli#4828Approach
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'