pnpm install --if-needed
#8663
vergilfromadyen
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Proposal:
Doing
pnpm install
several times in a row is relatively fast but it would be great to have an option to skip it if the workspace is up to date.This is especially impactful on large monorepos with many workspaces.
Use-case:
When doing a
git pull
from the main branch, if the pulled commits carry dependency updates, the project may behave unexpectedly and developers might end up developing against code that is no longer there. A hook or a package.json script can solve that without noticeably slowing down the system.Mechanism:
For
pnpm
I believe this can be checked by comparingpnpm-lock.yaml
tonode_modules/.pnpm/lock.yaml
. Ifpnpm-lock.yaml
is newer, then the workspace is not up to date, andpnpm install
should run.Beta Was this translation helpful? Give feedback.
All reactions