This post was contributed by the Node-API team.
The reason for this blog post is to explain what motivated us to rename N-API to Node-API. The issue that is tracking the transition was: https://github.com/nodejs/abi-stable-node/issues/420
You may have noticed N-API changed to Node-API in the documentation within the Node.js project. N-API has always stood for Node-API but was often pronounced NAPI. A concern was raised, that when pronounced that way, it could be mistaken for a derogatory term. We therefore made it our goal to clarify that N-API is Node-API whenever possible without introducing breaking changes.
What’s changing (only in more recent versions):
- References: Documentation, blog posts, and similar will now refer to “Node-API”.
- Folders: Internally referenced folders (eg. test folders) have been renamed from
- Badges hosted on Node repositories: Existing badges’ image contents have been updated to “Node-API” without changing their URLs.
- New symbols: Additions to Node-API and related projects will now have a different prefix, eg.
- Types, macros, and defines: Externally-facing API names, such as features guards, will now start with
- New node arguments: Node-API configuration via node command line arguments, eg.
- -force-node-api-uncaught-exceptions-policy, will refer to the new name.
What’s not changing:
- Old symbols: Existing symbols (eg.
napi_create_reference) will remain the same. This ensures ABI stability, such that a previously compiled add-on will continue to load in newer Node versions.
- Types, macros and defines: Names like
napi_status, NAPI_MODULE, the
node-addon-api) will remain the same. This ensures existing code can be recompiled with no changes.
We believe that we’ve made this change in a way that addresses the issue while limiting the impact to users of Node-API and hope this post helps you understand the approach and what to look out for. As always if you have any questions/concerns please open an issue in https://github.com/nodejs/abi-stable-node or https://github.com/nodejs/node-addon-api.