-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Rename regexManagers to customManagers #19066
Comments
Nest the existing regexManagers code under a |
let m: ManagerApi;
if (manager === 'regex') {
m = managers.get(config.customType ?? 'regex')!;
} else {
m = managers.get(manager)!;
} |
|
After shifting from
I prefer 1) as it gives more control to user. |
use 2. |
Will there be any API and/or implementation changes? (Sorry if the answer is obvious, didn't check the PR.) FWIW, I was prompted to share thoughts on how regexManagers could be made easier to debug: renovatebot/renovate#20881
Are there plans to include one for XML? I felt rather dirty regexing into a Maven |
We might need to migrate |
Support both then. custom will match any manager while regex matches only Regex, jsonata only jsonata, etc |
After discussions in #23357 (comment), we have decided to support the matchManagers = ['custom.regex', 'custom.jsonata'] // custom managers separately
enabledManagers= ['custom.*'] // all custom managers |
Doables in order:
Enhancement not directly related to the implementation
|
We will need separate interfaces for Similarly we will need to handle validation based on if (key === 'regexManagers') {
...
} else if (is.nonEmptyString(regexManager.customType)) {
if (is.nonEmptyArray(regexManager.fileMatch)) {
// TODO: Add validation as per customType, preferrably a separate file or function for readability
switch (regexManager.customType) {
case 'regex':
errors.push(
...(validateRegexManagerFields(
regexManager,
currentPath
) as any)
);
break;
}
} else {
errors.push({
topic: 'Configuration Error',
message: `Each Regex Manager must contain a non-empty fileMatch array`,
});
}
} else {
errors.push({
topic: 'Configuration Error',
message: `Each Regex Manager must contain a non-empty customType string`,
});
}
}
}
... Hence, when a new custom manager is added, we will need:
|
Should we rename |
We can close this issue now, and transfer the enhancements ie. implementing |
Note: this is not mentioned in https://docs.renovatebot.com/release-notes-for-major-versions/ for v37 |
@TWiStErRob any thing with migrations is not treated as a breaking change |
@rarkins I see it's not breaking, but could still worth a mention in commentary as it's a concept change? |
We document changes in whatever release they fall in |
The last PR that was the actual rename (#24451) was landed in 36.107.0, does that not make it part of major v37? |
Yes, just like the 106 features released before it in v36. We can't mention them all in v37 |
* fix: migrate regexManagers to customManagers - renovatebot/renovate#24451 - renovatebot/renovate#19066 * fix: set `"customType": "regex"` * fix: set "customType": "regex", * fix: set customType * fix: set customType
Describe the proposed change(s).
regexManagers
tocustomManagers
customType
which defaults toregex
The text was updated successfully, but these errors were encountered: