yarn-changed-workspaces
Version:
An utility to show changed workspaces and their dependants
13 lines (10 loc) • 414 B
JavaScript
const { getTouchedFiles } = require("./getTouchedFiles");
const { getTrackedFiles } = require("./getTrackedFiles");
const getChangedFiles = async ({ branch, cwd } = {}) => {
const [touchedFiles, trackedFiles] = await Promise.all([
getTouchedFiles({ cwd, branch }),
getTrackedFiles({ cwd }),
]);
return [...new Set([...touchedFiles, ...trackedFiles])];
};
exports.getChangedFiles = getChangedFiles;