Skip to content

Conversation

@oBusk
Copy link

@oBusk oBusk commented Oct 28, 2025

Closes #185

Removes the "post" action, since it is hard to benefit from it for caching purposes.

Instead shifts to run pnpm store prune directly after executing run_install(s), if any.

Also added an option to the action, store_prune which can be set to false to disable this pruning.

Considerations

Something I'm unsure of, is if some use of the run_install array/object could be used to install something that would be prunable, meaning that the automatic pruning would then remove what you just installed? But installing globally should not make it prunable, I believe? If there's some expected action of running pruning directly following run_install, would it be enough to add to the documentation to explain that you might want to store_prune: false if you do anything weird like that? Or it'd be possible to run prune automatically if run_install is true, and not if it's some kind of advanced setup (array/objects)

oBusk added 8 commits October 28, 2025 00:26
The post action will execute too late to actually improve any caching. By pruning directly after running pnpm install(s), we make sure the store is as clean as possible before continuing. This means any attempt to cache the pnpm store will be caching a pruned store
The original message made it sound like it checked the store and decided there was nothing to prune, in reality pruning just did not run if run_install was not set.
@oBusk
Copy link
Author

oBusk commented Nov 2, 2025

Adding built-in caching makes pruning in the post action a great idea! So #188 is to prefer over this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prune as the post action is not useful

1 participant