Open chrisspiegl opened 1 year ago
Could you please provide a minimum repo?
For pnpm workspace, you can add the scripts into package.json of the root, and it'll check the pnpm-lock.yaml
from the root of the project.
Dear @sxzz , sorry for the long wait time. I had this planned for long but never found the time.
I have now created a reproduction: https://codesandbox.io/p/sandbox/reproduction-stale-dep-pnpm-workspace-dr2lfj
This shows that when I have a pnpm workspace
which calls stale-dep
from a sub package (app with and without postinstall
in this case) it complains that there is no pnpm-lock.yaml
file present.
I have also tried to run the stale-dep -u
in the sub package app-with-postinstall
upon postinstall
but that also does not work and shows the same error.
I hope the reproduction helps figure out what may be going on or if there is something I have to fix on my end.
Updated the reproduction to show the case a bit better and run on Node version 18.
https://codesandbox.io/p/sandbox/reproduction-stale-dep-pnpm-workspace-dr2lfj (link above is also updated).
Steps to reproduce:
pnpm install
app-with-postinstall
will try to do the postinstall stale-dep -u
but that will fail with error no pnpm-lock.yaml
.pnpm lint
not stale
because here the stale-dep -u
after install works since pnpm-lock.yaml
is present in root of workspace.cd app-with-postinstall
pnpm start
no pnpm-lock.yaml found
cd ../app-no-postinstall
pnpm start
no pnpm-lock.yaml found
I hope this helps and is clear to understand.
This project doesn't support pnpm + workspace now. If anyone can contribute this enhancement, I'd like to merge it happily.
Clear and concise description of the problem
I started using
stale-dep
in some of my repositories.Now one of the projects grew and I am working with a
pnpm workspace
with one singularpnpm-lock.yaml
in the workspace root.stale-dep
does not seem to recognize thepnpm-lock.yaml
in the workspace root?Would this be somethign that's possible to support?
Suggested solution
xy
Alternative
No response
Additional context
No response
Validations