Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for pnpm.overrides #17298

Closed
fantun3s opened this issue Aug 20, 2022 · 9 comments · Fixed by #28199
Closed

Support for pnpm.overrides #17298

fantun3s opened this issue Aug 20, 2022 · 9 comments · Fixed by #28199
Labels
help wanted Help is needed or welcomed on this issue manager:npm package.json files (npm/yarn/pnpm) priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others type:feature Feature (new functionality)

Comments

@fantun3s
Copy link

What would you like Renovate to be able to do?

I would like Renovate to be able to deal with pnpm.overrides the same way it does for overrides.

Currently, when renovate updates a dependency, it will also change the version of that dependency on the overrides section, but will ignore the pnpm.overrides section.

I've set up a repository to reproduce the current behaviour:
Repo: https://github.com/fantun3s/SIMPLE-PNPM-RENOVATE
PR: https://github.com/fantun3s/SIMPLE-PNPM-RENOVATE/pull/4

If you have any ideas on how this should be implemented, please tell us here.

I believe the same logic that is already in place to handle the overrides property can be reused for pnpm.overrides.

Is this a feature you are interested in implementing yourself?

Maybe

@fantun3s fantun3s added priority-5-triage status:requirements Full requirements are not yet known, so implementation should not be started type:feature Feature (new functionality) labels Aug 20, 2022
@rarkins rarkins added manager:npm package.json files (npm/yarn/pnpm) priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others reproduction:provided and removed priority-5-triage labels Aug 20, 2022
@Hi-Fi
Copy link

Hi-Fi commented Sep 26, 2022

Is automatic update of overrides really something that's wanted? As those are (usually at least) used to select working version for some transient dependency, so offering update to those automatically feels some thing that would easily break things.

Relates to projen/projen#2126

I know that npm has those, but it just backfired today as we have a lot of "garbage" PRs due to updated trying to touch resolutions (and breaking the build as Projen puts those back causing git's mutability check to fail)

@rarkins
Copy link
Collaborator

rarkins commented Sep 27, 2022

I think we should make sure we have adequate metadata (e.g. depType=overrides) so that users can decide whether to update them or not. In cases where you're holding back a dependency version with overrides, you naturally wouldn't want it updated. But there can be cases where people are using a newer version and may want that updated.

@Turbo87
Copy link
Contributor

Turbo87 commented Nov 24, 2022

while I agree that something like depType=overrides might be useful I don't think it should block the implementation of pnpm.overrides support. if yarn resolutions and npm overrides are already supported then this is about feature parity, and somewhat orthogonal to the discussion of whether certain overrides should be updated or not. :)

@rarkins rarkins added status:ready and removed reproduction:provided status:requirements Full requirements are not yet known, so implementation should not be started labels Sep 26, 2023
@RahulGautamSingh
Copy link
Collaborator

Do we need to extract dependencies from the pnpm.overrides section, or should we only update dependencies when a matching dependency is being updated, similar to how we handle yarn resolutions? In other words, if a dependency is exclusively listed in pnpm.overrides and is not present in npm.overrides or the main dependencies object, we don't update it.

@viceice
Copy link
Member

viceice commented Jan 15, 2024

always update the override, they don't need to be in normal dependencies.

they are independent and mostly transitive deps.

@eboureau

This comment was marked as spam.

@karlhorky
Copy link
Contributor

As more users are switching to pnpm in the ecosystem, this issue will gain more attention over time, and potentially community contributors.

Is there a recommended path for community contributions here? Should the Renovate implementation of npm Overrides and Yarn Resolutions be copied to support pnpm Overrides too?

@rarkins
Copy link
Collaborator

rarkins commented Mar 29, 2024

Yes, it should be mostly a copy paste of the same concept from npm/yarn

@viceice viceice added the help wanted Help is needed or welcomed on this issue label Mar 29, 2024
@renovate-release
Copy link
Collaborator

🎉 This issue has been resolved in version 37.281.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Help is needed or welcomed on this issue manager:npm package.json files (npm/yarn/pnpm) priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others type:feature Feature (new functionality)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants