{"name":"napi-build-utils","version":"2.0.0","description":"A set of utilities to assist developers of tools that build N-API native add-ons","main":"index.js","scripts":{"doc":"jsdoc2md index.js >index.md","test":"mocha test/ && npm run lint","lint":"standard","prepublishOnly":"npm run test"},"keywords":["n-api","prebuild","prebuild-install"],"author":{"name":"Jim Schlight"},"license":"MIT","homepage":"https://github.com/inspiredware/napi-build-utils#readme","repository":{"type":"git","url":"git+https://github.com/inspiredware/napi-build-utils.git"},"bugs":{"url":"https://github.com/inspiredware/napi-build-utils/issues"},"devDependencies":{"chai":"^4.1.2","jsdoc-to-markdown":"^4.0.1","mocha":"^5.2.0","standard":"^12.0.1"},"binary":{"note":"napi-build-tools is not an N-API module. This entry is for unit testing.","napi_versions":[2,2,3,10]},"_id":"napi-build-utils@2.0.0","gitHead":"29c3682f819178d70c58e5fdc40aa529fb75f7b7","_nodeVersion":"23.6.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-GEbrYkbfF7MoNaoh2iGG84Mnf/WZfB0GdGEsM8wz7Expx/LlWf5U8t9nvJKXSp3qr5IsEbK04cBGhol/KwOsWA==","shasum":"13c22c0187fcfccce1461844136372a47ddc027e","tarball":"http://registry-npm.ywwl.com/napi-build-utils/download/napi-build-utils-2.0.0.tgz","fileCount":6,"unpackedSize":12670,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDqW2khYCUMAzDACJOgeHkSZ8L6/nH2KrYIDzJ1zKmiNAiAYnzGyXwh6Ae6R9mRv3OydXTi6l+a/SsRtc3kix64ttg=="}],"size":4540,"noattachment":false,"key":"/napi-build-utils/-/napi-build-utils-2.0.0.tgz"},"_npmUser":{"name":"inspiredware","email":"jim@inspiredware.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/napi-build-utils_2.0.0_1737083220974_0.8132843464995596"},"_hasShrinkwrap":false,"readme":"# napi-build-utils\n\n[![npm](https://img.shields.io/npm/v/napi-build-utils.svg)](https://www.npmjs.com/package/napi-build-utils)\n![Node version](https://img.shields.io/node/v/prebuild.svg)\n![Build Status](https://github.com/inspiredware/napi-build-utils/actions/workflows/run-npm-tests.yml/badge.svg)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nA set of utilities to assist developers of tools that build [Node-API](https://nodejs.org/api/n-api.html#n_api_n_api) native add-ons.\n\n## Background\n\nThis module is targeted to developers creating tools that build Node-API native add-ons.\n\nIt implements a set of functions that aid in determining the Node-API version supported by the currently running Node instance and the set of Node-API versions against which the Node-API native add-on is designed to be built. Other functions determine whether a particular Node-API version can be built and can issue console warnings for unsupported Node-API versions.\n\nUnlike the modules this code is designed to facilitate building, this module is written entirely in JavaScript.\n\n## Quick start\n\n```bash\nnpm install napi-build-utils\n```\n\nThe module exports a set of functions documented [here](./index.md). For example:\n\n```javascript\nvar napiBuildUtils = require('napi-build-utils');\nvar napiVersion = napiBuildUtils.getNapiVersion(); // Node-API version supported by Node, or undefined.\n```\n\n## Declaring supported Node-API versions\n\nNative modules that are designed to work with [Node-API](https://nodejs.org/api/n-api.html#n_api_n_api) must explicitly declare the Node-API version(s) against which they are coded to build. This is accomplished by including a `binary.napi_versions` property in the module's `package.json` file. For example:\n\n```json\n\"binary\": {\n  \"napi_versions\": [2,3]\n}\n```\n\nIn the absence of a need to compile against a specific Node-API version, the value `3` is a good choice as this is the Node-API version that was supported when Node-API left experimental status.\n\nModules that are built against a specific Node-API version will continue to operate indefinitely, even as later versions of Node-API are introduced.\n\n## History\n\n**v2.0.0** This version was introduced to address a limitation when the Node-API version reached `10` in NodeJS `v23.6.0`. There was no change in the API, but a SemVer bump to `2.0.0` was made out of an abundance of caution.\n\n## Support\n\nIf you run into problems or limitations, please file an issue and we'll take a look. Pull requests are also welcome.\n","publish_time":1737083221150,"maintainers":[{"name":"inspiredware","email":"jim@inspiredware.com"}],"_cnpm_publish_time":1737083221150,"dist-tags":{"latest":"2.0.0"}}