Proposal/feature request: add API for adding custom versioning variables
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.2k
- Forks
- 271
- Avg merge
- 23h 40m
- Merged PRs (30d)
- 2
Description
I would like to be able to choose which binary package to download based on a criteria that is not currently represented in the versioning strings. In my particular case, I would like to be able to determine whether the version of OpenSSL that the Node executable is using is recent enough to support ALPN.
To accomplish this, I suggest the following API:
The `node-pre-gyp` would add an argument `--plugin` that takes the name of a JavaScript file. This file would be loaded as a module. That module's `checkVersion` function would be called, and a callback would be passed. The function should then call that callback with a plain JavaScript object mapping custom keys to detected values. For example, myplugin might call the callback with `{tls: 'alpn'}` or `{tls: 'npn'}`.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No implementation files or tests are named. Start by reviewing the existing command-line option handling and versioning-string behavior, then define how --plugin loading and the checkVersion callback integrate with that flow. Done means custom values can influence binary selection and the callback contract is covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- build-system, cli, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100