Skip to content

Commit af9fb94

Browse files
committed
List included PRs before release
1 parent 7155102 commit af9fb94

1 file changed

Lines changed: 21 additions & 11 deletions

File tree

scripts/prepare-release.js

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { fileURLToPath } from 'node:url';
77
import semverInc from 'semver/functions/inc.js';
88
import semverParse from 'semver/functions/parse.js';
99
import semverPreRelease from 'semver/functions/prerelease.js';
10-
import { cyan } from './colors.js';
10+
import { bold, cyan } from './colors.js';
1111
import { readJson, runAndGetStdout, runWithEcho } from './helpers.js';
1212
import {
1313
BROWSER_PACKAGE,
@@ -47,16 +47,26 @@ const [mainPackage, mainLockFile, browserPackage, repo, changelog] = await Promi
4747
readFile(CHANGELOG, 'utf8')
4848
]);
4949
const isMainBranch = currentBranch === MAIN_BRANCH;
50-
const [newVersion, includedPRs] = await Promise.all([
51-
getNewVersion(mainPackage, isMainBranch),
52-
getIncludedPRs(
53-
`v${getFirstChangelogEntry(changelog).currentVersion}`,
54-
'HEAD',
55-
repo,
56-
currentBranch,
57-
!isMainBranch
58-
)
59-
]);
50+
const includedPRs = await getIncludedPRs(
51+
`v${getFirstChangelogEntry(changelog).currentVersion}`,
52+
'HEAD',
53+
repo,
54+
currentBranch,
55+
!isMainBranch
56+
);
57+
58+
console.log(bold(`\nPreparing release for "${currentBranch}". Included PRs:`));
59+
console.log(
60+
includedPRs
61+
.map(
62+
({ text, pr, authors }) =>
63+
`https://github.com/rollup/rollup/pull/${pr}: ${text} (${authors.map(author => `@${author}`).join(', ')})`
64+
)
65+
.join('\n')
66+
);
67+
console.log();
68+
69+
const newVersion = await getNewVersion(mainPackage, isMainBranch);
6070

6171
const gitTag = getGitTag(newVersion);
6272
try {

0 commit comments

Comments
 (0)