mirror of
https://github.com/renovatebot/renovate.git
synced 2026-11-02 02:29:51 +00:00
f777a48ebf
* feat(managers): rename `renovate-config-presets` to `renovate-config` As part of future changes, we'll extend this support to cover other functionality. Instead of having multiple managers for this functionality, we'll use a single, shared, manager for all Renovate config management. Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io> * fixup! feat(managers): rename `renovate-config-presets` to `renovate-config` --------- Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>
27 lines
688 B
TypeScript
27 lines
688 B
TypeScript
import { isArray, isString } from '@sindresorhus/is';
|
|
import { AbstractMigration } from '../base/abstract-migration.ts';
|
|
|
|
export class EnabledManagersMigration extends AbstractMigration {
|
|
override readonly propertyName = 'enabledManagers';
|
|
|
|
override run(value: unknown): void {
|
|
if (!isArray<string>(value, isString)) {
|
|
return;
|
|
}
|
|
|
|
const newValue = value.map((manager) => {
|
|
switch (manager) {
|
|
case 'yarn':
|
|
return 'npm';
|
|
case 'regex':
|
|
return 'custom.regex';
|
|
case 'renovate-config-presets':
|
|
return 'renovate-config';
|
|
default:
|
|
return manager;
|
|
}
|
|
});
|
|
this.rewrite(newValue);
|
|
}
|
|
}
|