pnpm --recursive
flag in non-monorepo causes unwanted 'link:' version
#22458
Replies: 4 comments 7 replies
-
Also reported an issue over in the pnpm GitHub repo: |
Beta Was this translation helpful? Give feedback.
-
Did you decide to ignore the instructions to create a Discussion first, or did you just click through without paying attention to the two warnings? |
Beta Was this translation helpful? Give feedback.
-
Just to circle back around here and note that this usage by Renovate of the
Eg. this PR here: Diff of first commit by Renovate bot (the First commit by Renovate bot broken, second commit fixed with my GitHub Actions workflow workaround: |
Beta Was this translation helpful? Give feedback.
-
Hi there, Get your discussion fixed faster by creating a minimal reproduction. This means a repository dedicated to reproducing this issue with the minimal dependencies and config possible. Before we start working on your issue we need to know exactly what's causing the current behavior. A minimal reproduction helps us with this. Discussions without reproductions are less likely to be converted to Issues. To get started, please read our guide on creating a minimal reproduction. Good luck, The Renovate team |
Beta Was this translation helpful? Give feedback.
-
How are you running Renovate?
Mend Renovate hosted app on github.com
If you're self-hosting Renovate, tell us what version of Renovate you run.
No response
If you're self-hosting Renovate, select which platform you are using.
None
If you're self-hosting Renovate, tell us what version of the platform you run.
No response
Was this something which used to work for you, and then stopped?
I never saw this working
Wanted end result.
I originally reported this issue over at #22457 but auto-closed from the bot 😫
Given a repo package that:
pnpm
...the
version
in the pnpm lockfile will be updated to'link:'
.Example Renovate bot commit from update PR:
97d1a7c
(#144)Relevant part of the diff:
This can be problematic for tools like ESLint, which may not be able to resolve the dependency (see failed test run):
As far as I have investigated, this occurs because of the
--recursive
flag forpnpm install
that Renovate uses, added in this PR by @ianwalter (reviewed by @viceice):In the PR, @ExE-Boss brought up the concern that running
pnpm install --recursive
in non-monorepo may cause unwanted behavior - @zkochan replied that "This should be fine."Apparently, in most cases it probably is fine (since there have not been many users reporting problems), but in this particular circumstance, it causes an issue.
Suggested Solution
I'm not sure what I would suggest in this case - I guess not adding
--recursive
forpnpm install
if it's not a monorepo, but maybe that would be a downside for some reason?Workaround (GitHub Actions workflow)
In this commit in the PR, I added the following step to my GitHub Actions workflow, to manually add back the package using
pnpm add
and then commit the result to Git:It creates new commits from the GitHub Actions bot account (example commit):
What you tried so far.
Described above
Relevant debug logs
Logs
Beta Was this translation helpful? Give feedback.
All reactions