Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish '@socketsupply/socket' on NPM (and GH) #90

Closed
trevnorris opened this issue Jan 5, 2023 · 3 comments · Fixed by #103
Closed

Publish '@socketsupply/socket' on NPM (and GH) #90

trevnorris opened this issue Jan 5, 2023 · 3 comments · Fixed by #103
Assignees
Labels
build An issue, discussion, or pull request related to building the source

Comments

@trevnorris
Copy link
Contributor

trevnorris commented Jan 5, 2023

There are two options for releasing on npm:

  1. Include all the static libraries for all supported platforms in the npm module.
  2. Post-install script to download the artifacts directly from someplace like S3.
  3. Publish npm modules for each supported architecture and use a post-install script to npm i the module for the specific architecture.

Another consideration is ensuring developers have a comprehensive list of what they need. It's very possible that they npm install ssc just to have building an application fail since they don't have everything necessary.

@trevnorris trevnorris added the build An issue, discussion, or pull request related to building the source label Jan 5, 2023
@jwerle jwerle changed the title Install ssc via npm Publish '@socketsupply/socket' on NPM (and GH) Jan 9, 2023
@jwerle
Copy link
Member

jwerle commented Jan 9, 2023

I did this for the tusd-static module a while ago which was just:

const { platform } = process

try {
  module.exports = require(`tusd-static-${platform}`)
} catch (err) {
  const message = 'Unable to resolve a static `tusd(1)` binary for platform: ' + platform
  throw new Error(message)
}

where tusd-static-{darwin,linux,win32} were the variants

@trevnorris
Copy link
Contributor Author

If we plan on supporting ARM in the future, even though we don't support it now, might want to make it ${platform}-${architecture} to future-proof it.

@jwerle
Copy link
Member

jwerle commented Jan 9, 2023

If we plan on supporting ARM in the future, even though we don't support it now, might want to make it ${platform}-${architecture} to future-proof it.

yeah we could have a triple: socket-{darwin,linux,win32}-{x86,x64,arm64,amd64} etc

@jwerle jwerle mentioned this issue Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build An issue, discussion, or pull request related to building the source
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants