Skip to content

Commit a36dc8c

Browse files
committed
fix: first changelog title
1 parent d79e57d commit a36dc8c

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## [1.0.0-beta.0](https://github.com/tomjs/release-cli/compare/v1.0.0-beta.0) (2024-05-14)
1+
## 1.0.0-beta.0 (2024-05-14)
22

33
- feat: add local and global support [414bd2f](https://github.com/tomjs/release-cli/commit/414bd2f)
44
- feat: add npm publish [d6b88ff](https://github.com/tomjs/release-cli/commit/d6b88ff)

src/changelog.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export async function runGenerateChangelog(opts: ReleaseOptions) {
4646
}
4747

4848
logger.log(
49-
`Commits of ${list
49+
`${chalk.green(pkg.name)} Commits of ${list
5050
.filter(s => s)
5151
.map(s => chalk.green(s.name))
5252
.join('...')}:`,
@@ -143,7 +143,7 @@ function parseCommitLog(log: string) {
143143
async function createChangelog(opts: ReleaseOptions) {
144144
const { pkgs, dryRun } = opts;
145145
for (const pkg of pkgs) {
146-
logger.info(`create changelog for ${pkg.name}`);
146+
logger.info(`create changelog for ${chalk.green(pkg.name)}`);
147147

148148
const logPath = path.join(pkg.dir, 'CHANGELOG.md');
149149
let content = '';

src/git.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,14 +236,14 @@ export function releaseNotes(changelog: Changelog, opts: ReleaseOptions) {
236236

237237
export function releaseCompareUrl(changelog: Changelog, opts: ReleaseOptions) {
238238
const tags = changelog.tags.filter(s => s);
239-
if (opts.logCompare && opts.gitCompareUrl && tags.length) {
239+
if (opts.logCompare && opts.gitCompareUrl && tags.length > 1) {
240240
return `${opts.gitCompareUrl.replace(/{diff}/g, tags.map(s => encodeURIComponent(s.name)).join('...'))}`;
241241
}
242242
}
243243

244244
export async function resetGitSubmit(opts: ReleaseOptions) {
245245
const { pkgs, gitSHA } = opts;
246-
if (pkgs.length === 0 || !gitSHA) {
246+
if (!pkgs || pkgs.length === 0 || !gitSHA) {
247247
return;
248248
}
249249

0 commit comments

Comments
 (0)