Override default pnpm install command #33061
Unanswered
unknownbanana
asked this question in
Request Help
Replies: 1 comment 1 reply
-
I have created this feature request: #33118 It's purpose is to allow the disabling of Renovate's default artifact updating. After that you could use |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How are you running Renovate?
Self-hosted Renovate
If you're self-hosting Renovate, tell us which platform (GitHub, GitLab, etc) and which version of Renovate.
Platform: Kubernetes
Renovate: 39.62.6
Please tell us more about your question or problem
We are running a NX monorepo with a single
package.json
andpnpm-lock.yaml
at the root of the repository.Each project in the monorepo has a package.json file containing the dependencies on other projects in the repository.
These dependencies are not stored in any artifact repository because the projects are present in the same repository.
When Renovate attempts to update the
package.json
and thepnpm-lock.yaml
file at the root of the repository it fails because it attempts to execute apnpm install --recursive
, which causes pnpm to lookup allpackage.json
files in the monorepo. Even the ones that do not contain dependencies that can be retrieved from an artifact repository.This results in a failure when running renovate for npm/pnpm dependencies in our monorepo, since pnpm cannot retrieve some dependencies and exits the moment it attempts to do so.
Regarding a solution. One, I believe that NX is abusing the
package.json
of a project to add dependencies which cannot be retrieved from a remote source, which is the express purpose of apackage.json
file.Two, I believe that renovate should have the functionality such that I can tweak the
pnpm install
command to my liking, regardless of the reason I wish to do so.Hence I would like to ask whether renovate has a feature that allows me to run a random command on a repository, rather than a specific command and if not, whether there is a feature that allows me to override the command used to install packages using pnpm.
Another way to achieve the same goal would be to allow a user to filter the projects where pnpm should run an install using a
--filter
.Logs (if relevant)
Note that I have added a
packageRules
property to therenovate.json
file in the repository that looks like this:Logs
I have omitted the options property, as they contain references to my employer and they're irrelevant to the issue.
Names and identifiers that can track this issue to my employer but are relevant have been replaced.
Beta Was this translation helpful? Give feedback.
All reactions