npm 7 Will Ship With Node.js 15
Written by Kay Ewbank   
Monday, 19 October 2020

The next version of npm, v7, has been completed and will be shipping with Node.js v15 this week. The new release adds several features requested by developers including support for Workspaces.

npm is a package manager for JavaScript, and is the default package manager for Node.js, the asynchronous event driven JavaScript runtime built on Chrome's V8 JavaScript engine. The new release of Node.js has a number of improvements and additions, and includes the npm package client.

nodejslogo

The main aim of the improvements in npm is to include tools that manage your packages for you. According to the npm team,  there are some cases is its earlier versions where they:

"sort of throw up their hands and make you fix stuff by yourself. But npm is a package manager! It shouldn’t make you manage packages, that’s its job!"

The improvements to the new release are designed to overcome that.

 

The first change is support for Workspaces. These add a set of features to the npm CLI that provide support to managing multiple packages from within a singular top-level, root package.

The second improvement is better support for peer dependencies. The new release automatically installs peer dependencies: prior to npm 7 developers needed to manage and install their own peer dependencies. The new peer dependency algorithm ensures that a validly matching peer dependency is found at or above the peer-dependent’s location in the node_modules tree.

Support has also been added for package-lock v2 and yarn.lock: The new package-lock format will unlock the ability to do deterministically reproducible builds and includes everything npm will need to fully build the package tree. Prior to npm 7 yarn.lock files were ignored, the npm cli can now use yarn.lock as source of package metadata and resolution guidance.

The development team says they know npm 7 is a big change, and they're being careful not break the millions of workflows that use npm, especially in production. For this reason, npm 7.0.0. will not be marked as latest; your workflows will not get npm v7.0.0 by default unless you opt in by running npm install -g npm@7 or install Node.js 15. 

npmsq

More Information

npm on Github

Related Articles

Node.js Bridge For COBOL

Rewritten Search For NPM 4.0

Yarn The New JavaScript Package Manager 

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


GitHub Introduces Code Scanning
26/03/2024

GitHub has announced a public beta of a code scanner that automatically fixes problems. The new feature was announced back in November, but has now moved to public beta status.  



Explore SyncFusion's Blazor Playground
16/04/2024

Syncfusion has provided an in-browser environment where you can write, compile and run code that uses Blazor components and get it previewed live.


More News

raspberry pi books

 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Monday, 19 October 2020 )