[RRFC] Add package.json support to require a minimum Node.js N-API version
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 777
- Forks
- 267
- PR merge metrics
- No merged PRs in 30d
Description
Motivation ("The Why")
Node.js binary add-ons that depend on the N-API interface are coded to an N-API version. There is no good way to prevent npm installing on an incompatible Node.js version. The package.json engines specification can be seen as a partial solution, but isn't ideal.
Example
npm install mymodule should fail to install into Node.js if the N-API required by mymodule is not supported by the Node.js engine.
How
Desired Behaviour
Add package.json syntax to allow installation of a Node.js add-on only for a given (or greater) N-API ABI version, and to gracefully fail otherwise.
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 file, test, or entry point is named in the issue. Start by reviewing the proposed package.json syntax, npm install behavior, and the linked N-API version matrix; done means the proposal defines how incompatible Node.js versions are rejected gracefully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100