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
chore commit type when only the lockfile is updated
#6791
Comments
|
Renovate natively isn't opinionated about semantic commits. Because your preset imports If you augment your config, this should work: {
"extends":["github>form8ion/renovate-config"],
"packageRules": [{
"packageNames": ["snyk"],
"rangeStrategy": "update-lockfile",
"semanticCommitType": "chore"
}]
} |
|
would setting |
|
There's a few ways to achieve it, here is one:
|
|
this gets pretty close to what i was thinking. the one piece that gives me a little pause is calling out the is there a more dynamic way to configure lockfile-only updates as |
|
There's no direct way to do it. The {
"extends":["github>form8ion/renovate-config"],
"packageRules": [{
"packageNames": ["snyk"],
"updateTypes": ["patch", "minor"],
"rangeStrategy": "update-lockfile",
"semanticCommitType": "chore"
}]
} |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed soon if no further activity occurs. |
|
sorry for the delay getting back to this. i think your recommendation can get me close enough in this case, but i'm wondering if this is maybe worth a feature request. i have a hard time thinking of a case where updating only the lockfile should be anything other than i understand you're saying that there isnt a way to combine that logic today, but would it be possible with minor logic adjustments, or would it be too complex? |
|
Both commit prefixes as well as lock file updating are implemented in a quite "generic" way so that they can satisfy all languages and styles. Renovate doesn't "really" understand that "only a lock file was updated here so that's less important" because in some package managers the lock file update may be important, or the lock file updating process may trigger an update of the package file too (happens in Go, for example). The only way I can think to implement this elegantly is if you used our concept of |
interesting. that does at least seem in line with what i'm talking about. i'll ponder a bit and see if i have more thoughts based on that. as lockfile maintenance PRs are rolling out for the week, that made me at least wonder if there is any part of that process that could apply, but i assume that is pretty distinct from this? |
|
Lock file maintenance PRs blow away the entire lock file and regenerate it, so it can have potentially dozens or hundreds of updates in one. It does have its own updateType though. |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed soon if no further activity occurs. |
|
Here's the proposal: Introduce a new The problem is, doing it this way may be backwards-incompatible. What if we do this by converting |
|
@zharinov could you experiment with what the impact is if we convert |
|
thank you for putting thought into finding a way to make this work. if i'm following your proposal correctly, you are thinking that this could be used to define the commit-type in a package rule based on whether the update is in-range or out-of-range? something like the following? {
"packageRules": [
{
"depTypeList": ["dependencies"],
"updateTypes": ["patch", "in-range"],
"semanticCommitType": "chore"
},
{
"depTypeList": ["dependencies"],
"updateTypes": ["patch", "out-of-range"],
"semanticCommitType": "fix"
}
]
}also, that would mean that updateTypes is already defined as a list. am i close to understanding correctly? |
|
It could be simplified to this: {
"packageRules": [
{
"depTypeList": ["dependencies"],
"semanticCommitType": "fix"
},
{
"depTypeList": ["dependencies"],
"updateTypes": ["in-range"],
"semanticCommitType": "chore"
}
]
}i.e. the first rule sets the default that |
|
got it. this seems very much in line with the goal i was trying to describe, if we can make it work. 👍 |
|
Waiting on #6888 |
|
Any progress on implementing the |
Which Renovate are you using?
WhiteSource Renovate App
Which platform are you using?
GitHub.com
Have you checked the logs? Don't forget to include them if relevant
No. I think what is happening is probably expected, but i'm hoping it can be configured to behave differently.
What would you like to do?
For a CLI tool, I think it mostly makes sense to pin versions because because it is essentially an "app". However, since it is also published as a package, there are some dependencies that i want to avoid resulting in new versions. for context, i publish using
semantic-release, which heavily relies on commit type to determine whether to publish as a major, minor, or patch version. i consider snyk to be in this category since it isn't really a true dependency, but must be installed as a prod dependency to work fully.I configured one of my projects to prefer updating the lockfile rather than pinning
snyk, which seems to have accomplished that piece. However, the lockfile updates still use thefixcommit type rather thanchore. Since the lockfile is not included when a package is installed, I don't think it is valuable to publish a new version of the package.Is it possible to configure lockfile-only updates to use the
chorecommit type, even when the update is for a prod dependency?The text was updated successfully, but these errors were encountered: