mirror of
https://github.com/renovatebot/renovate.git
synced 2026-11-02 10:33:39 +00:00
930cf6633c
fix: Additional vi.mock path corrections and prettier formatting
20 lines
574 B
TypeScript
20 lines
574 B
TypeScript
import { isArray } from '@sindresorhus/is';
|
|
import type { PackageRule } from '../../types.ts';
|
|
import { AbstractMigration } from '../base/abstract-migration.ts';
|
|
|
|
export class PathRulesMigration extends AbstractMigration {
|
|
override readonly deprecated = true;
|
|
override readonly propertyName = 'pathRules';
|
|
|
|
override run(value: unknown): void {
|
|
const packageRules = this.get('packageRules');
|
|
|
|
if (isArray<PackageRule>(value)) {
|
|
this.setHard(
|
|
'packageRules',
|
|
isArray(packageRules) ? packageRules.concat(value) : value,
|
|
);
|
|
}
|
|
}
|
|
}
|