Renaming of N-API to Node-API: What Changes to Expect for your Next Project?

Renaming of N-API to Node-API: What Changes to Expect for your Next Project?

This blog post will explain the real reason behind renaming the N-API to Node-API was. We all might have seen the change from N-API to Node-API in the documentation within the Node.js project. Earlier pronounced as NAPI, N-API has always supported Node-API. However, many raised the concern about how it is pronounced. It was taken more like a derogatory term, due to which the change in the name was thought of. Hence, N-API is Node-API without really breaking the changes. 

Let’s start with What’s Not Changing

Node.js Development Services

  1. The first thing that will remain constant is the old symbols. Existing symbols like napi_create_reference will stay as it was earlier. It will ensure the ABI stability in such a way that the add-ons compiled earlier will remain as it is even in the new Node versions. It will load the same way as it used to earlier. 

  1. Another thing that will remain the same is names like NAPI_MODULE, in node-addon-api the namespace, and the napi_status. The reason to keep it the same is to make sure the existing code is easily recompiled with almost no changes at all.

Now, What Has Really Changed? 

Node.js Developers

Now, let’s see what is changing in the more recent versions!

  1. Node-API configuration via node command-line arguments will now be known as a new name. For instance, 

-force-node-api-uncaught-exceptions-policy

  1. The names of the internally referenced folders have been changed. For example, the test folders, which were earlier named n-api, will now be known as node-api. 

  1. The next on the list of what has changed is the API names like the features guards. They used to start with NAPI_ earlier and now will be renamed to NODE_API_. These are the externally facing API names.

  1. What also will be called Node-API now are the references such as blog posts and documentation.

  1. Now, let’s talk about the new symbols. These additions to Node-API and all other related projects will continue with the different prefixes like node_api_get_module_file_name

  1. Apart from that, the existing badges’ image content will be changed/updated to Node-API. However, this change will barely impact the URLs, as that will remain unchanged. 

Hence, the change in the name was intended to avoid the concern of pronouncing it as a derogatory name and change it so something better. Also, the motive to change the name aimed at limiting the impact to users of Node-API. Besides, if you think you have any queries regarding this, you can always refer to this reliable source called Github right here. 

ABI Stable Node:

Node Addon API

Conclusion 

The renaming from N-API to Node-API seems to be better due to the pronunciation of the existing name. This name change has happened but without majorly impacting or breaking what we already had. These are just a few yet critical changes that one must know before using Node.js. We hope you will follow through with these changes and will be able to utilize them in the best way possible for all your upcoming projects.

At Your Team In India, we have a pool of certified Node.js engineers. Need help setting up a dedicated team of developers in India? Connect with us our business head now and get a free consultation.

Mangesh Gothankar

Mangesh Gothankar

Seasoned technology professional with over 19 years of experience leading technology innovation and execution with startups and MNCs. Experience in hiring and creating multiple world-class technology teams. Results-oriented with a passion for technology, recognized for successfully planning and executing major initiatives.