Feature: install new peer dependencies requirements #21665
Replies: 9 comments
-
I would rate this as quite challenging to implement. We'd need to calculate the peerDependencies before this PR, then the ones in the PR, and add the delta - at lot easier said than done. |
Beta Was this translation helpful? Give feedback.
-
@rarkins Could you give a pointer to where in the code one would start to solve this? If I find some time I might take on this challenge myself |
Beta Was this translation helpful? Give feedback.
-
For now, we would keep this as an npm-specific feature so it would live somewhere in lib/manager/npm/* Logically speaking it would come somewhere after the There are some existing peerDependencies "nice to have" issues that might be good to consider or even implement beforehand:
I think that #1864 would share a lot of logic with this issue, because it's also about asking the question "does this PR satisfy peer dependencies?". I can think of a few different approaches people might take if peerDependencies are missing:
|
Beta Was this translation helpful? Give feedback.
-
Also, I had considered that any such peer dependency check might be done with the help of
As such, we might be better to implement this logic ourselves using raw npm registry results, although right now we are not saving the Another point is how far deep/down do we go? e.g. do we only check for peer dependencies of our direct dependencies, or also of transitive/indirect ones? |
Beta Was this translation helpful? Give feedback.
-
As a first step I would say that we should only check for peer dependencies of our direct dependencies – that would probably solve 80% of the cases. I agree that #1864 would probably be a good precursor to this one. When this issue is solved Renovate could try to avoid failing the #1864 validation, but there will still be cases where it will fail (eg. if someone is requiring a module that for some reason can't be used – eg. it hasn't been published or perhaps some other aspect of it is wrong) |
Beta Was this translation helpful? Give feedback.
-
Closing as I still can't think of a way to feasibly do this |
Beta Was this translation helpful? Give feedback.
-
@rarkins I would still like to look into this and take a stab at implementing it. Would it be okay to keep it open a while longer? |
Beta Was this translation helpful? Give feedback.
-
OK, but I suggest we discuss the scope/requirements first to make sure it’s not a solution that’s too difficult to merge or maintain. |
Beta Was this translation helpful? Give feedback.
-
Sure @rarkins 👍 This would be the scope, right? Only work for npm/yarn and for them:
|
Beta Was this translation helpful? Give feedback.
-
From @voxpelli on renovatebot/config-help#52:
and
Beta Was this translation helpful? Give feedback.
All reactions