mirror of
https://github.com/renovatebot/renovate.git
synced 2024-12-22 13:38:32 +00:00
25 lines
694 B
TypeScript
25 lines
694 B
TypeScript
import type { RenovateConfig } from '../../types';
|
|
import { AbstractMigration } from './abstract-migration';
|
|
|
|
export class RenamePropertyMigration extends AbstractMigration {
|
|
override readonly deprecated = true;
|
|
override readonly propertyName: string;
|
|
|
|
private readonly newPropertyName: string;
|
|
|
|
constructor(
|
|
deprecatedPropertyName: string,
|
|
newPropertyName: string,
|
|
originalConfig: RenovateConfig,
|
|
migratedConfig: RenovateConfig,
|
|
) {
|
|
super(originalConfig, migratedConfig);
|
|
this.propertyName = deprecatedPropertyName;
|
|
this.newPropertyName = newPropertyName;
|
|
}
|
|
|
|
override run(value: unknown): void {
|
|
this.setSafely(this.newPropertyName, value);
|
|
}
|
|
}
|