feat(gen-deps-list): detect duplicate packages

Prevents a bug where a second entry would override the previous one and possibly
decrease the release type (e.g. `major + patch → patch`).
This commit is contained in:
Julien Fontanet
2023-12-07 17:14:56 +01:00
parent cd44a6e28c
commit f0da94081b

View File

@@ -123,6 +123,10 @@ async function readPackagesFromChangelog(toRelease) {
}
const { name, releaseType } = match.groups
if (name in toRelease) {
throw new Error('duplicate package to release in CHANGELOG.unreleased.md: ' + name)
}
toRelease[name] = releaseType
})
}