Replies: 2 comments 8 replies
-
Allowing them to be added at any time seems like it’d be a risk that a compromised author could add malicious binaries to existing versions. |
Beta Was this translation helpful? Give feedback.
-
Hey @reconbot thanks for opening this discussion! Definitely an interesting problem space. I'm going to spend some cycles thinking about solutions to this. One thing I'm wondering, GitHub does allow you to upload artifacts to a release... I wonder if there is a way we could use a release triggered action to upload these resources to the GitHub release, which should be a canonical URL. I recognize this is not an integrated solution, but i'm thinking it might be sufficient. Thoughts? |
Beta Was this translation helpful? Give feedback.
-
As of today, the state of the art of distributing binary packages is done using node-pre-gyp or prebuild. They require pre-compiling all the platforms and ABI versions you want to support and uploading them to github or s3.
While it's technically possible for users to compile modules themselves it's usually a large burden for users and a primary source of support issues in my case. Additionally while it's technically possible to ship all precompiled binaries in the npm package itself, it requires a bit of operations work as you have to somehow consolidate all builds onto a publishing machine.
So prebuilding the binaries works but it requires external web hosting (sually s3 or github releases) to host the binary files. With github releases I've had org and repo changes break the download for old modules. And I've seen projects loose their aws account and now old versions wont install.
I'd like to propose that NPM host the binary files and allow them to be added to a package at any time post publishing. This would allow standardizing hosting of modules alongside the javascript. I think whatever the future holds for seamless binary support for nodejs, this is a good first step.
Beta Was this translation helpful? Give feedback.
All reactions