-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 npm 8.3 Overrides #15278
Comments
Hi there, Help us by making a minimal reproduction repository. Before we can start work on your issue we first need to know exactly what's causing the current behavior. A minimal reproduction helps us with this. To get started, please read our guide on creating a minimal reproduction to understand what is needed. We may close the issue if you (or someone else) have not provided a minimal reproduction within two weeks. If you need more time, or are stuck, please ask for help or more time in a comment. Good luck, The Renovate team |
Can you provide a minimal reproduction which demonstrates a "wrong" PR but which should be updating overrides? |
upleveled/changes-codealong#62 is a minimal repro PR (also above in the Workaround section) - the first commit shows the "wrong" PR commit (only updating the |
Please check the above link for what we mean by minimal. The example PR you gave updates 10+ packages, which makes it complex to debug during development |
Ok, here's a reproduction repo PR with a single dep: https://github.com/karlhorky/renovate-repro-npm-overrides/pull/3/files |
"overrides" is supposed to be used for Transitive Dependencies,
this does not look like a real usage. Anyway, Overrides should be treated the same way that we treat dependencies/devDependencies, as it's an actual transitive dependency that is effectively used. it's pretty easy to get a reproduction data, anything with overrides will do. |
It's possible that users have a direct dependency on something as well as it being in transitive dependencies. Sometimes it's really important to have the same version (such as with ESLint shared configs + plugins). So this can indeed be a real-world use case. |
I have a feeling that was a convention we used for workspaces to designate that it's a resolution the user wants updated |
Right, this is another usecase - we are using Yarn Resolutions in a monorepo (with Yarn Workspaces) which may have |
@rarkins Should we create group names for children of packages ?
Should we in this case make foo have a |
How did you get NPM 8 to run which is part of Node 16? I was under the impression that renovate is at 14.x using Kubernetes install path. |
🎉 This issue has been resolved in version 32.60.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Just tested It updated the https://github.com/upleveled/changes-codealong/pull/85/files |
@karlhorky awesome, thanks for confirming! |
Oh, I tricked myself - it's actually not working - it was my GitHub Actions workflow script 😩 You can see the problem here - first of all Renovate bot updates the dependencies (without Then, further down, my GitHub Actions workflow script (which I thought I had disabled) comes along and fixes it, which caused the PR to be ok and have the changes to I've now triggered the Renovate bot to open a new PR, which doesn't change the |
@hasanwhitesource @rarkins is this PR above enough of a reproduction to figure out what's going on? Happy to retrigger this PR anytime there are bot updates published to check if they work... |
Reopened the issue, @hasanwhitesource can you take a look? Assuming that you tested it on a demo repo, it could be good to share and compare that against @karlhorky's repo |
One interesting side note (not sure if this is relevant) is that there are a bunch of other dependencies showing up in my dependency dashboard now (not being combined with the non-major pull requests that the bots are creating): Wonder if this is related at all... |
Oh wait, maybe there was a new dependency type called Ahh, I need to update my shared config to also include this new Edit: Done karlhorky/renovate-config@30d6a6d |
What would you like Renovate to be able to do?
Hi there, first of all, thanks for your continued effort on Renovate! It's such an amazing tool, so valuable.
Similar to #1318 (updating Yarn Resolutions in
package.json
), it would be great if Renovate also supported npm Overrides (introduced in npm 8.3) in the same way - eg. when the version inpackage.json
under the"overrides"
object matches the version of the dependency independencies
ordevDependencies
.If you have any ideas on how this should be implemented, please tell us here.
I'm assuming that the MVP of this could be the same feature as implemented in 163ce43 (based on the latest logic in
lib/modules/manager/npm/update/dependency/index.ts
), reusing much of the codeHowever, I also see that there is a
depType
which may be set toresolutions
, so this may also be a consideration for this change (should there be a newdepType
calledoverrides
?):renovate/lib/modules/manager/npm/update/dependency/index.ts
Lines 60 to 64 in 868ebbe
Is this a feature you are interested in implementing yourself?
No
Workaround
For now, I'm just duplicating the
"overrides"
data to"resolutions"
and relying on the Yarn Resolutions feature of Renovate bot. In order to automatically update"overrides"
, I wrote this GitHub Actions workflow: https://github.com/upleveled/changes-codealong/blob/main/.github/workflows/copy-resolutions-to-overrides.ymlSee example PR here: upleveled/changes-codealong#62
The text was updated successfully, but these errors were encountered: