Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Latest compatible version for NPM and node

I am using nodist version 0.8.8 which is the latest one. By using this I installed latest node version 10.7.0 and latest NPM version 6.1.0. I assured it by reading the following document.

https://nodejs.org/en/download/releases/

Nw I surfed in Google to find whether NPM 6.2.0 is available? If it is I want to know the corresponding node version for it.

like image 911
Sundar Avatar asked Jul 27 '18 06:07

Sundar


1 Answers

Node.js and NPM versions aren't directly connected, otherwise they would have matching versions.

Semantic versioning assumes that minor versions don't introduce breaking changes:

Given a version number MAJOR.MINOR.PATCH, increment the:

MAJOR version when you make incompatible API changes,

MINOR version when you add functionality in a backwards-compatible manner, and

PATCH version when you make backwards-compatible bug fixes.

This means that if NPM 6.1.0 works with Node 10.7.0, NPM 6.2.0 works with it, too.

Node version requirements are usually listed in package.json engines section, which can be checked locally or in GitHub repository.

npm package.json doesn't contain this section, so actual Node version that is suitable for it has to be deduced.

npm code base currently uses ES6 but no higher. Latest Node 6 release covers 99% of ES6 spec, it's expected that NPM 6.2.0 is fully workable with Node 6.14 or higher. Generally, it's certain that latest even major version (Node 10, as of now) doesn't have problems with latest NPM release.

like image 100
Estus Flask Avatar answered Oct 16 '22 06:10

Estus Flask