renovate
Version:
Automated dependency updates. Flexible so you don't need to be.
15 lines (14 loc) • 634 B
JavaScript
import { minimatch } from "../../../util/minimatch.js";
import upath from "upath";
//#region lib/modules/manager/bun/utils.ts
function fileMatchesWorkspaces(pwd, fileName, workspaces) {
if (!fileName.startsWith(pwd)) return false;
const relativeFile = upath.relative(pwd, fileName).replace(/\/package\.json$/, "");
return workspaces.some((pattern) => minimatch(pattern, { dot: true }).match(relativeFile));
}
function filesMatchingWorkspaces(pwd, files, workspaces) {
return files.filter((file) => fileMatchesWorkspaces(pwd, file, workspaces));
}
//#endregion
export { filesMatchingWorkspaces };
//# sourceMappingURL=utils.js.map