Open Collective
Open Collective
Loading
pnpm v8 is out! πŸŽ‰πŸΎπŸŽŠπŸ₯³
Published on March 28, 2023 by Zoltan Kochan

We are excited to announce the latest release of pnpm! To install it, check the installation page.

Major Changes


Node.js 14 Support Discontinued

If you still require Node.js 14, don't worry. We ship pnpm bundled with Node.js. This means that regardless of which Node.js version you've installed, pnpm will operate using the necessary Node.js runtime. For this to work you need to install pnpm either using the standalone script or install the @pnpm/exe package.

Configuration Updates

Most of the configuration changes are related to peer dependencies. Most of these settings were implemented long ago, and we recommended them to users encountering peer dependency issues. The recently added dedupe-peer-dependents resolved many such problems. With these new defaults, pnpm will face significantly fewer issues during migration from other package managers.

Lockfile Modifications

  • Lockfile v6 is adopted. This new format improves the readability of the lockfile by removing hashes from package IDs. It also has some rearrangement of fields in the importers section. The new pnpm-lock.yaml file is more resistant to git merge conflicts!
  • The registry field is removed from the resolution object in pnpm-lock.yaml.
  • A lockfile is generated even for projects with no dependencies.

Other Changes

  • When there's a files field in the package.json, only the files that are listed in it will be deployed. The same logic is applied when injecting packages. This behaviour can be changed by setting the deploy-all-files setting to true (Related issue #5911).
  • Direct dependencies are deduped. If a dependency is present in both a project and the workspace root, it will only be linked to the workspace root.

Migration Instructions

Before updating pnpm to v8 in your CI, regenerate your pnpm-lock.yaml. To upgrade your lockfile, run pnpm install and commit the changes. Existing dependencies will not be updated; however, due to configuration changes in pnpm v8, some missing peer dependencies may be added to the lockfile and some packages may get deduplicated.

You can commit the new lockfile even before upgrading Node.js in the CI, as pnpm v7 already supports the new lockfile format.

pnpm v7 Support

pnpm v7 will likely not receive any new features, but it will continue to get bug fixes for a few months and vulnerability fixes for at least a year.