Javascript Node

What’s new in NPM 8?2 min read

“The art of being wise is knowing what to overlook.”
― William James

I know, right? NPM 8 was released just a couple of months ago and you’re looking for a blog post that summarizes all the changes and new stuff in the new version because you want to be ahead of the curve or simply don’t want your app to crash when upgrading. You googled but nothing relevant appeared; only a document from Github blog that refers to this issue on the NPM organization. And getting into the depths of the repo itself to check the changelog and decipher its arcane liturgy is just too much work. Well, you’re so lucky because you came to the right place.

First off, if you only want the TL;DR, here it is (drum roll 🥁)…

About NPM 8

If you’re using the latest release of an active LTS version of Node.js and want to jump from [email protected] to [email protected], nothing much has changed; hence, your application most likely will stand the test of upgrading to the latest major version. That’s just about it. Seehttps://github.com/npm/rfcs/issues/445#issuecomment-945313849

Oh… still here? OK, I get it, either you’re utilizing a sunsetted version of Node.js or want to know more. Well, NPM 8.0.0 was released with the main purpose of dropping support for those no longer maintained Node versions and require(npm). Some sub dependencies that also dropped Node 10 support were also updated and the version of node-gyp is now 8.

So, you might ask -same as I did- > “why bother increasing the major number?”.
The answer is dead simple: the aforementioned breaking changes will require a bump up on the major number, as per semver’s guidelines.

New features in NPM 8

However, there are some neat features added in the subsequent minor releases, such as:

The –lockfile-version, –include-workspace-root, and explicit –no-workspaces config options (v8.1.0).
Streaming the debug logfile (v8.2.0).
Introducing overrides, output configured registry during publish, and display publishConfig during config list (v8.3.0).

We’ll talk about these and many others in the latest revision of our “NPM tips and tricks” guide coming out in the next few days. Stay tuned.😎

Wait!… Don’t leave just yet!… 😰

Have an older version of Node.js?

What about those of us still stuck into older Node.js versions?
Well then, your options are sticking to [email protected] or -most advisable- migrating to the latest Node LTS, which at the time of the writing of this post is v16. This process can get quite difficult oftentimes based on the complexity of your app and its dependencies but you can always hit us up and set some time to talk with our NodeSource Services Team who are keen to help and guide you through.

May the bits and bytes be ever in your favor.🖖

Leave a Reply

Your email address will not be published. Required fields are marked *

Pin It on Pinterest