PNpM CLI
Minor Changes
-
New time-based resolution strategy supported.
When
resolution-modeis set totime-based, pnpm will resolve dependencies the following way:- Direct dependencies will be resolved to their lowest versions. So if there is
foo@^1.1.0in the dependencies, then1.1.0will be installed. - Subdependencies will be resolved from versions that were published before the last direct dependency was published.
With this resolution mode installations with hot cache are faster. It also reduces the chance of subdependency hijacking as subdependencies will be updated only if direct dependencies are updated.
This resolution mode works only with npm's full metadata. So it is slower in some scenarios. However, if you use Verdaccio v5.15.1 or newer, you may set the
registry-supports-time-fieldsetting totrue, and it will be really fast.Related RFC.
- Direct dependencies will be resolved to their lowest versions. So if there is
-
Enhance
pnpm envwith theremovecommand. To remove a Node.js version installed by pnpm, run:pnpm env remove --global <node.js version>
Patch Changes
pnpm store pruneshould remove all cached metadata.- Don't modify the manifest of the injected workspace project, when it has the same dependency in prod and peer dependencies.
Our Gold Sponsors
<table> <tbody> <tr> <td align="center" valign="middle"> <a href="https://bit.dev/?utm_source=pnpm&utm_medium=release_notes" target="_blank"><img src="https://pnpm.io/img/users/bit.svg" width="80"></a> </td> <td align="center" valign="middle"> <a href="https://nhost.io/?utm_source=pnpm&utm_medium=release_notes" target="_blank"> <picture> <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/nhost.svg" /> <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/nhost_light.svg" /> <img src="https://pnpm.io/img/users/nhost.svg" width="180" /> </picture> </a> </td> <td align="center" valign="middle"> <a href="https://novu.co/?utm_source=pnpm&utm_medium=release_notes" target="_blank"> <picture> <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/novu.svg" /> <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/novu_light.svg" /> <img src="https://pnpm.io/img/users/novu.svg" width="180" /> </picture> </a> </td> </tr> </tbody> </table>
Our Silver Sponsors
<table> <tbody> <tr> <td align="center" valign="middle"> <a href="https://prisma.io/?utm_source=pnpm&utm_medium=release_notes" target="_blank"> <picture> <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/prisma.svg" /> <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/prisma_light.svg" /> <img src="https://pnpm.io/img/users/prisma.svg" width="180" /> </picture> </a> </td> <td align="center" valign="middle"> <a href="https://leniolabs.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank"> <img src="https://pnpm.io/img/users/leniolabs.jpg" width="80"> </a> </td> <td align="center" valign="middle"> <a href="https://vercel.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank"> <picture> <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/vercel.svg" /> <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/vercel_light.svg" /> <img src="https://pnpm.io/img/users/vercel.svg" width="180" /> </picture> </a> </td> </tr> <tr> <td align="center" valign="middle"> <a href="https://www.takeshape.io/?utm_source=pnpm&utm_medium=release_notes" target="_blank"> <img src="https://pnpm.io/img/users/takeshape.svg" width="280"> </a> </td> <td align="center" valign="middle"> <a href="https://doppler.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank"> <picture> <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/doppler.svg" /> <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/doppler_light.svg" /> <img src="https://pnpm.io/img/users/doppler.svg" width="280" /> </picture> </a> </td> </tr> </tbody> </table>
What's Changed
- test: fix NODE_PATH test on Windows by @zkochan in https://github.com/pnpm/pnpm/pull/5257
- refactor: resolve dependencies by @zkochan in https://github.com/pnpm/pnpm/pull/5267
- feat(env): add remove command to pnpm env by @mark-omarov in https://github.com/pnpm/pnpm/pull/5263
- docs(CONTRIBUTING): correct setup instructions for first-time clone by @gwhitney in https://github.com/pnpm/pnpm/pull/5289
- fix: don't modify the injected project's manifest by @zkochan in https://github.com/pnpm/pnpm/pull/5294
- feat: time-based resolution mode by @zkochan in https://github.com/pnpm/pnpm/pull/5238
- feat: resolve direct deps to lowest version when resolution-mode is time-based by @zkochan in https://github.com/pnpm/pnpm/pull/5298
- fix: add fallback for time-based resolution by @zkochan in https://github.com/pnpm/pnpm/pull/5302
New Contributors
- @mark-omarov made their first contribution in https://github.com/pnpm/pnpm/pull/5263
- @gwhitney made their first contribution in https://github.com/pnpm/pnpm/pull/5289
Full Changelog: https://github.com/pnpm/pnpm/compare/v7.9.5...v7.10.0