Skip to content

Commit

Permalink
fix changeset snapshot script
Browse files Browse the repository at this point in the history
  • Loading branch information
nohaapav committed Nov 4, 2024
1 parent 3e22fa0 commit 783b4c2
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions scripts/changeset-snapshot.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,21 @@ const main = async () => {
const commitSha = params['sha'];
const output = params['output'];

releasePlan.releases = releasePlan.releases
const releases = releasePlan.releases
.filter((r) => r.changesets.length > 0)
.map((r) => {
r.newVersion = [
r.newVersion,
'pr' + pullRequest,
commitSha.substring(0, 7),
].join('-');
return {
...r,
newVersion: [
r.newVersion,
'pr' + pullRequest,
commitSha.substring(0, 7),
].join('-'),
};
});

releasePlan.releases = releases;

if (output) {
const releaseMessage = getUpgradeMessage(releasePlan);
const releaseJson = JSON.stringify(
Expand Down

0 comments on commit 783b4c2

Please sign in to comment.