Last Updated: March 02, 2016
·
232
· angelathewebdev

NPM v3

NPM v3 differs from v2's approach of nesting every single package. Instead it tries to first resolve to install the dependency, and if not possible (due to a version mismatch), it will resort to v2's nesting approach.

When an update of the package is installed, it removes itself and its dependencies (if no other packages rely on it), then install the new version. And if all packages are installed for the first time, npm install will enforce alphabetical order listed in package.json when installing new packages.

In addition, you can do some maintenance through npm dedupe command to manually trigger examination of duplicated packages.

https://docs.npmjs.com/how-npm-works/

P.S. NPM v3 no longer installs peerDependency for you, but send you a gentle reminder that you should've place them in dependencies or devDependencies