Developer Advisory: pnpm 8 update

We recently updated the major version of pnpm to version 8+. Developers will need to update pnpm in their environments in order to build WooCommerce.

The details

Due to instability in early versions of pnpm 8, we had decided to stay on pnpm 7 until all issues were resolved. Now that pnpm 8 is stable, we have upgraded it in WooCommerce Core. This allows us to get features and bug fixes only available in pnpm 8. Since pnpm 8 is a major version upgrade, you’ll need to upgrade it in your environment to continue working on the WooCommerce repo.

How can I tell if this affects me?

This affects everyone building on the WooCommerce repo. This change was merged on April 25th, so if you have recently pulled, you will need to upgrade. You’ll be informed by pnpm in your environment if it affects you. It will instruct you to upgrade to pnpm 8.

Example of alert from pnpm in MacOS terminal

What action should I take?

In order to update your pnpm version, run pnpm i -g pnpm. You can confirm that you’ve upgraded in your environment by running pnpm -v to check the version (it should be greater than version 8).

Once you’ve upgraded, you can reinstall dependencies by running pnpm install. If you have a PR with dependency changes, we also recommend removing the pnpm-lock.yaml and regenerating it with pnpm install.

That’s it! Feel free to reach out to us in the comments or in the WooCommerce Community Slack.


Leave a Reply

Your email address will not be published. Required fields are marked *