{"_id":"napi-build-utils","_rev":"3813574","name":"napi-build-utils","description":"A set of utilities to assist developers of tools that build N-API native add-ons","dist-tags":{"latest":"2.0.0"},"maintainers":[{"name":"inspiredware","email":"jim@inspiredware.com"}],"time":{"modified":"2025-06-05T11:19:25.000Z","created":"2018-09-12T23:11:05.603Z","2.0.0":"2025-01-17T03:07:01.150Z","1.0.2":"2020-03-05T22:43:13.884Z","1.0.1":"2018-09-12T23:55:07.569Z","1.0.0":"2018-09-12T23:11:05.603Z"},"users":{},"author":{"name":"Jim Schlight"},"repository":{"type":"git","url":"git+https://github.com/inspiredware/napi-build-utils.git"},"versions":{"2.0.0":{"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":{"shasum":"13c22c0187fcfccce1461844136372a47ddc027e","size":4540,"noattachment":false,"key":"/napi-build-utils/-/napi-build-utils-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/napi-build-utils/download/napi-build-utils-2.0.0.tgz"},"_npmUser":{"name":"inspiredware","email":"jim@inspiredware.com"},"directories":{},"maintainers":[{"name":"inspiredware","email":"jim@inspiredware.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/napi-build-utils_2.0.0_1737083220974_0.8132843464995596"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-01-17T03:07:01.150Z","publish_time":1737083221150,"_source_registry_name":"default","_cnpm_publish_time":1737083221150},"1.0.2":{"name":"napi-build-utils","version":"1.0.2","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 && npm run doc"},"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]},"gitHead":"220b7d37a1ccca05e6be9addff06a15bf0e523d2","_id":"napi-build-utils@1.0.2","_nodeVersion":"10.19.0","_npmVersion":"6.13.4","dist":{"shasum":"b1fddc0b2c46e380a0b7a76f984dd47c41a13806","size":4581,"noattachment":false,"key":"/napi-build-utils/-/napi-build-utils-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/napi-build-utils/download/napi-build-utils-1.0.2.tgz"},"maintainers":[{"name":"inspiredware","email":"jim@inspiredware.com"}],"_npmUser":{"name":"inspiredware","email":"jim@inspiredware.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napi-build-utils_1.0.2_1583448193765_0.7920376656517816"},"_hasShrinkwrap":false,"publish_time":1583448193884,"_cnpm_publish_time":1583448193884},"1.0.1":{"name":"napi-build-utils","version":"1.0.1","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 && npm run doc"},"keywords":["n-api"],"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]},"gitHead":"9258d6192437620313306cc143290dd39f652891","_id":"napi-build-utils@1.0.1","_npmVersion":"6.4.1","_nodeVersion":"9.8.0","_npmUser":{"name":"inspiredware","email":"jim@inspiredware.com"},"dist":{"shasum":"1381a0f92c39d66bf19852e7873432fc2123e508","size":32277,"noattachment":false,"key":"/napi-build-utils/-/napi-build-utils-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/napi-build-utils/download/napi-build-utils-1.0.1.tgz"},"maintainers":[{"name":"inspiredware","email":"jim@inspiredware.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napi-build-utils_1.0.1_1536796507380_0.010627767909799024"},"_hasShrinkwrap":false,"publish_time":1536796507569,"_cnpm_publish_time":1536796507569},"1.0.0":{"name":"napi-build-utils","version":"1.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 && npm run doc"},"keywords":["n-api"],"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]},"gitHead":"9258d6192437620313306cc143290dd39f652891","_id":"napi-build-utils@1.0.0","_npmVersion":"6.4.1","_nodeVersion":"9.8.0","_npmUser":{"name":"inspiredware","email":"jim@inspiredware.com"},"dist":{"shasum":"0a578fd10a75586b5ffd1d6b4a6ba81e4d27a119","size":4960,"noattachment":false,"key":"/napi-build-utils/-/napi-build-utils-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/napi-build-utils/download/napi-build-utils-1.0.0.tgz"},"maintainers":[{"name":"inspiredware","email":"jim@inspiredware.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/napi-build-utils_1.0.0_1536793865489_0.9390335545482287"},"_hasShrinkwrap":false,"publish_time":1536793865603,"_cnpm_publish_time":1536793865603}},"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","_attachments":{},"homepage":"https://github.com/inspiredware/napi-build-utils#readme","bugs":{"url":"https://github.com/inspiredware/napi-build-utils/issues"},"license":"MIT"}