Fix duplicated changelog entries

This commit is contained in:
mitchellhamilton
2019-09-16 18:30:00 +10:00
parent 4c85c4a584
commit c3c3ae189a
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -30,17 +30,17 @@ export async function getChangedPackages(cwd: string) {
let output = await execWithOutput("git", ["diff", "--name-only"], { cwd });
let names = output.stdout.split("\n");
let changedWorkspaces: Workspace[] = [];
let changedWorkspaces = new Set<Workspace>();
for (let name of names) {
if (name === "") continue;
let dirname = path.resolve(cwd, path.dirname(name));
let workspace = workspacesByDirectory.get(dirname);
if (workspace !== undefined) {
changedWorkspaces.push(workspace);
changedWorkspaces.add(workspace);
}
}
return changedWorkspaces;
return [...changedWorkspaces];
}
export function getChangelogEntry(changelog: string, version: string) {