feat: pnpm prune removes the modules cache

ref #3115
This commit is contained in:
Zoltan Kochan
2021-02-16 02:46:21 +02:00
parent d6d091f249
commit 46e71ea4a6
3 changed files with 8 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
---
"@pnpm/plugin-commands-installation": minor
---
`pnpm prune` should remove the modules cache.

View File

@@ -62,6 +62,7 @@ export async function handler (
devDependencies: opts.dev !== false,
optionalDependencies: opts.optional !== false,
},
modulesCacheMaxAge: 0,
pruneStore: true,
storeController: store.ctrl,
storeDir: store.dir,

View File

@@ -73,5 +73,7 @@ test('prune removes dev dependencies', async () => {
})
await project.has('is-positive')
await project.has('.pnpm/is-positive@1.0.0')
await project.hasNot('is-negative')
await project.hasNot('.pnpm/is-negative@1.0.0')
})