Announcing npm7
Tags: npm, node, javascript, cli
Published: 2020-10-13 18:14:00

---
title: Announcing npm7
published: true
description: Happy to announce the next npm major release!
tags: npm, node, javascript, cli
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/2mf5tn34hxzq0ckqph7k.jpg
---

It's been a very long and crazy ride but I'm happy to share that the project I've been working so hard since I joined the npm team more than an year ago is finally out! **npm7** is the new major version of the npm cli :heart_eyes:

TLDR; `npm install -g npm@7`

## What's new?

First let's highlight the major additions:
  
- workspaces! finally the top-requested feature from our userbase makes its way into a stable release line :tada:
- auto-installing peer-dependencies again :package:

## Improving DX

There are some smaller changes/additions/tweaks that will hopefully continue to help improving the user experience, such as:
  - new `npm exec` command - same as `npx` that now lives in the cli :grin:
  - a new package-lock format and support to install from `yarn.lock` files :rocket:
  - improved `npm audit` output! :sunglasses:
  - new update notification system for the npm cli
  - ability to install a git/GH pkg from a PR: `npm i user/project#pull/123`
  - less verbose install output
  - skip pre/post scripts when using `--ignore-scripts`
  - new system to cache `node_modules` data that makes `npm ls` much faster
  - `npm ls` now defaults to top-level deps only, to see the entire tree you can now run `npm ls --all`
  - slightly improved `npm fund` output, highlighting funding urls and properly nesting deps
  - And much, much more!

![I did a fanart illustration to celebrate this moment](https://dev-to-uploads.s3.amazonaws.com/i/e29vogpxuso6kt4zeg3p.png)
## Clean up work

In reality npm7 is the long due refactor/clean up of the npm cli and it spawns a couple of very important internal packages to our ecosystem which are now the standard Programmatic APIs for npm:
- [@npmcli/arborist](https://github.com/npm/arborist/) the new `npm install` system
- [@npmcli/config](https://github.com/npm/config/) the new npm config
- [@npmcli/run-script](https://github.com/npm/run-script/) the new `npm run`
- [@npmcli/map-workspaces](https://github.com/npm/map-workspaces) read workspaces configs
- [libnpmfund](https://github.com/npm/libnpmfund) `npm fund` Programmatic API

I'm really excited to see what this will enable in the community, for the first time it's going to be a trivial thing to `require('@npmcli/arborist')` and have the same `npm install` experience from within userland scripts without the need of spawning any subprocesses :star_struck:

It's also worth mentioning that a lot of the work that went into this version is making sure every line of code and functionality is well-tested and stable so that we can better iterate on new features and bug fixes moving forward :blush:

## More?

There are also new options/flags that goes along with some of the new features such as `--legacy-peer-deps` and `--strict-peer-deps` that help tweak the behavior of installing peer deps, `npm ls --all` to see all installed deps since the default is now show top-level only, etc

The team will be working hard on adding more tests and fixing any bugs that managed to slip through our beta test period :smile: Feel free to reach out to us in our [GitHub issue tracker](https://github.com/npm/cli/issues/new/choose) that now have the best up-to-date links on how to report bugs, propose new features or get help.

You can also read more about the release in the official channels:

- [npm blog post](https://blog.npmjs.org/post/631877012766785536/release-v700)
- [GitHub blog post](https://github.blog/2020-10-13-presenting-v7-0-0-of-the-npm-cli/)

---

## :arrow_down: Get it now

The **npm7** is going to be a part of the upcoming **node15** release but if you want to get it first, you can install it now with:

```
npm install -g npm@7
```

---

## Happy dependency-installing everyone!

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/7ddqe7ifmh279i5ac2lm.png)