App
GitHub
Don't think it's relevant
Hi.
I have a repo that is setup with a typical monorepo project managed with lerna.
The repo structure looks like this:
.
โโโ package.json
โโโ packages
โโโ alfa
โย ย โโโ package.json
โโโ bravo
โย ย โโโ package.json
โโโ charlie
โย ย โโโ package.json
โโโ delta
โโโ package.json
How can I make renovate only send PRs to updates in the dependencies of charlie?
(in other words only send diffs on the contents of packages/charlie/package.json?)
The FAQ mentions packageFiles but that parameter is not mentioned in https://renovatebot.com/docs/configuration-options.
Thank you.
Try this:
{
"packageRules": [{
"packagePatterns": ["*"],
"enabled": false
}, {
"paths": ["packages/charlie/package.json"],
"enabled": true
}]
}
This works but I have a follow up question please:
how can i amend this to have renovate only suggest minor version updates? (and avoid major version update PRs)
I tried to amend your recommended configuration and added updateTypes: ["minor"]:
{
"packageRules": [
{
"packagePatterns": ["*"],
"enabled": false
},
{
"paths": ["packages/charlie/package.json"],
"enabled": true,
+ "updateTypes": ["minor"]
}
]
}
To my surprise this caused renovate to ignore all packages in charlie!
I debugged lib/util/package-rules.js and found this happens because in the second pass over the second packageRule, updateTypes.length > 0 and config.updateType == undefined, and so in turn !isMatch == true and therefore negativeMatch == true which causes renovate to ignore the second packageRule.
Try this:
{
"packageRules": [{
"packagePatterns": ["*"],
"enabled": false
}, {
"paths": ["packages/charlie/package.json"],
"enabled": true
}, {
"updateTypes": ["major"],
"enabled": false
}]
}
tried it. it works ๐
thank you.
BTW, this also this works
{
"enabledManagers": [
"npm"
],
+ "major": {
+ "enabled": false
+ },
"packageRules": [
{
"packagePatterns": [
"*"
],
"enabled": false
},
{
"paths": [
"packages/yoshi/package.json"
],
"enabled": true
}
]
}
Most helpful comment
Try this: