UNPKG

renovate

Version:

Automated dependency updates. Flexible so you don't need to be.

18 lines (17 loc) 694 B
import { regEx } from "../../../util/regex.js"; import { AbstractMigration } from "../base/abstract-migration.js"; import { isNonEmptyString } from "@sindresorhus/is"; //#region lib/config/migrations/custom/match-strings-migration.ts var MatchStringsMigration = class extends AbstractMigration { propertyName = "matchStrings"; run(value) { // v8 ignore else -- TODO: add test #40625 if (Array.isArray(value)) { const newValue = value.filter(isNonEmptyString).map((matchString) => matchString.replace(regEx(/\(\?<lookupName>/g), "(?<packageName>")); this.rewrite(newValue); } } }; //#endregion export { MatchStringsMigration }; //# sourceMappingURL=match-strings-migration.js.map