Menu
NPM adds Workspaces for managing multiple packages

NPM adds Workspaces for managing multiple packages

Workspaces support in the NPM CLI allow you to manage multiple packages from within a single top-level root package

Credit: Clément H

NPM 7.0.0, an upgrade to the JavaScript package manager, is due to be released with Node.js 15, highlighted by Workspaces.

Workspaces is a long-requested feature that gives NPM a set of features to manage multiple packages from within a singular, top-level root package. Driving the addition of this capability is a desire to manage multiple packages that may or may not be used together.

Also in version 7.0.0, NPM automatically installs peer dependencies. Previously, developers had to manage these on their own. A new peer dependency algorithm ensures that a validly matching peer dependency is found at or above the peer-dependent location in the node_modules tree. Note that automatic installation of peer dependencies could potentially break certain workflows.

Other new capabilities in NPM v7.0.0 include:

  • A new package-lock format will enable deterministically reproducible builds and has what NPM needs to build the package tree. The NPM CLI now can use yarn.lock as a source of package metadata and resolution guidance.
  • A refactoring of NPM internals, with an emphasis on separation of concerns. Internal changes are intended to ensure that the NPM code base is more reliable over time and easier to maintain. With this refactoring, the inspection and management of the node_modules tree has been moved to the Arborist module, for example. The refactoring is expected to result in faster deliveries of NPM updates.
  • In a breaking change, the output of npm audit has significantly changed both in the human-readable and --json output styles.

To try NPM v7.0.0 now, developers can install it by running npm i -g npm@7 in their terminal. In an attempt to not break NPM workflows, NPM v7.0.0 will be rolled out over time. It will not be marked as latest. Workflows will not get NPM v7.0.0 by default unless a user opts in by running npm install -g npm@7 or installing Node.js 15.


Follow Us

Join the newsletter!

Or

Sign up to gain exclusive access to email subscriptions, event invitations, competitions, giveaways, and much more.

Membership is free, and your security and privacy remain protected. View our privacy policy before signing up.

Error: Please check your email address.

Featured

Slideshows

Channel gathers to celebrate the Reseller News Innovation Awards 2020 winners

Channel gathers to celebrate the Reseller News Innovation Awards 2020 winners

More than 500 channel leaders gathered in Auckland on 21 October at the ​Reseller News Innovation Awards ​2020 to celebrate the achievements of the New Zealand technology industry's top partners, start-ups, vendors, distributors and individuals.

Channel gathers to celebrate the Reseller News Innovation Awards 2020 winners
Meet the winners of the 2020 Reseller News Innovation Awards

Meet the winners of the 2020 Reseller News Innovation Awards

Reseller News honoured the standout players of the New Zealand channel in front of more than 500 technology leaders in Auckland on 21 October, recognising the achievements of top partners, start-ups, vendors, distributors and individuals.

Meet the winners of the 2020 Reseller News Innovation Awards
Meet the Reseller News 30 Under 30 Tech Awards 2020 winners

Meet the Reseller News 30 Under 30 Tech Awards 2020 winners

This year’s Reseller News 30 Under 30 Tech Awards were held as an integral part of the first entirely virtual Emerging Leaders​ forum, an annual event dedicated to identifying, educating and showcasing the New Zealand technology market’s rising stars. The 30 Under 30 Tech Awards 2020 recognised the outstanding achievements and business excellence of 30 talented individuals​, across both young leaders and those just starting out. In this slideshow, Reseller News honours this year's winners and captures their thoughts about how their ideas of leadership have changed over time.​

Meet the Reseller News 30 Under 30 Tech Awards 2020 winners
Show Comments