changelog-manager

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Changelog Manager

变更日志管理器

Quick Start

快速开始

Create or update a changelog:
bash
undefined
创建或更新变更日志:
bash
undefined

Review recent commits

Review recent commits

git log --oneline --since="2024-01-01"
git log --oneline --since="2024-01-01"

Check current version

Check current version

cat package.json | grep version
undefined
cat package.json | grep version
undefined

Instructions

操作步骤

Step 1: Review Changes

步骤1:梳理变更内容

Gather changes since last release:
bash
undefined
收集上次版本发布后的所有变更:
bash
undefined

Get commits since last tag

Get commits since last tag

git log $(git describe --tags --abbrev=0)..HEAD --oneline
git log $(git describe --tags --abbrev=0)..HEAD --oneline

Or since specific date

Or since specific date

git log --since="2024-01-01" --pretty=format:"%s"
undefined
git log --since="2024-01-01" --pretty=format:"%s"
undefined

Step 2: Categorize Changes

步骤2:对变更进行分类

Group by type following Keep a Changelog:
CategoryDescriptionExamples
AddedNew featuresNew API endpoint, new command
ChangedChanges to existingUpdated algorithm, changed default
DeprecatedSoon-to-be removedOld API marked deprecated
RemovedRemoved featuresDeleted unused function
FixedBug fixesFixed crash, corrected calculation
SecuritySecurity fixesPatched vulnerability
按照Keep a Changelog的要求按类型分组:
分类描述示例
Added(新增)新功能新API端点、新命令
Changed(变更)对现有功能的修改算法更新、默认值调整
Deprecated(弃用)即将移除的功能标记为弃用的旧API
Removed(移除)已移除的功能删除未使用的函数
Fixed(修复)漏洞修复修复崩溃问题、修正计算逻辑
Security(安全)安全修复修补漏洞

Step 3: Format Entry

步骤3:格式化条目

Follow Keep a Changelog format:
markdown
undefined
遵循Keep a Changelog格式:
markdown
undefined

[Version] - YYYY-MM-DD

[Version] - YYYY-MM-DD

Added

Added

  • New feature description
  • Another new feature
  • New feature description
  • Another new feature

Changed

Changed

  • Modified behavior description
  • Modified behavior description

Fixed

Fixed

  • Bug fix description
undefined
  • Bug fix description
undefined

Step 4: Update CHANGELOG.md

步骤4:更新CHANGELOG.md

Add new entry at the top (after "Unreleased"):
markdown
undefined
在顶部(“Unreleased”部分之后)添加新条目:
markdown
undefined

Changelog

Changelog

All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[Unreleased]

[Unreleased]

[2.1.0] - 2024-01-15

[2.1.0] - 2024-01-15

Added

Added

  • User authentication with JWT tokens
  • Rate limiting for API endpoints
  • User authentication with JWT tokens
  • Rate limiting for API endpoints

Changed

Changed

  • Updated database schema for better performance
  • Improved error messages
  • Updated database schema for better performance
  • Improved error messages

Fixed

Fixed

  • Fixed memory leak in background worker
  • Corrected timezone handling in reports
  • Fixed memory leak in background worker
  • Corrected timezone handling in reports

[2.0.0] - 2023-12-01

[2.0.0] - 2023-12-01

Added

Added

  • Complete API rewrite
  • GraphQL support
  • Complete API rewrite
  • GraphQL support

Changed

Changed

  • BREAKING: New authentication system
  • BREAKING: New authentication system

Removed

Removed

  • Legacy v1 API endpoints
undefined
  • Legacy v1 API endpoints
undefined

Keep a Changelog Format

Keep a Changelog 格式规范

Version Header

版本标题

markdown
undefined
markdown
undefined

[Version] - YYYY-MM-DD

[Version] - YYYY-MM-DD


- Use semantic versioning (MAJOR.MINOR.PATCH)
- Include release date
- Link to release tag

- 使用语义化版本(MAJOR.MINOR.PATCH)
- 包含发布日期
- 添加版本标签链接

Change Categories

变更分类

Order of sections:
  1. Added
  2. Changed
  3. Deprecated
  4. Removed
  5. Fixed
  6. Security
Writing guidelines:
  • Start with verb: "Added", "Fixed", "Updated"
  • Be specific but concise
  • Include issue/PR numbers if applicable
  • Highlight breaking changes with BREAKING
章节顺序:
  1. Added
  2. Changed
  3. Deprecated
  4. Removed
  5. Fixed
  6. Security
撰写指南:
  • 以动词开头:"Added"、"Fixed"、"Updated"
  • 内容具体且简洁
  • 如有需要,包含Issue/PR编号
  • 使用BREAKING标记重大变更

Examples

示例

Good entries:
markdown
undefined
优秀条目示例:
markdown
undefined

Added

Added

  • User profile page with avatar upload (#123)
  • Export data to CSV functionality
  • User profile page with avatar upload (#123)
  • Export data to CSV functionality

Fixed

Fixed

  • Fixed crash when uploading files over 10MB (#456)
  • Corrected calculation in tax report

**Bad entries:**
```markdown
  • Fixed crash when uploading files over 10MB (#456)
  • Corrected calculation in tax report

**不佳条目示例:**
```markdown

Added

Added

  • Stuff
  • Various improvements
  • Stuff
  • Various improvements

Fixed

Fixed

  • Bug fixes
undefined
  • Bug fixes
undefined

Semantic Versioning

Semantic Versioning(语义化版本)

Determine version bump:
Change TypeVersion BumpExample
Breaking changeMAJOR1.0.0 → 2.0.0
New featureMINOR1.0.0 → 1.1.0
Bug fixPATCH1.0.0 → 1.0.1
Breaking changes:
  • Removed functionality
  • Changed API signatures
  • Changed behavior that breaks existing code
版本号升级规则:
变更类型版本升级类型示例
重大变更MAJOR(主版本)1.0.0 → 2.0.0
新功能MINOR(次版本)1.0.0 → 1.1.0
漏洞修复PATCH(修订版本)1.0.0 → 1.0.1
重大变更定义:
  • 移除功能
  • 修改API签名
  • 修改行为导致现有代码无法正常运行

Automation

自动化

Generate from Commits

从提交记录生成变更日志

If using conventional commits:
bash
undefined
如果使用规范化提交:
bash
undefined

Install

Install

npm install -g conventional-changelog-cli
npm install -g conventional-changelog-cli

Generate

Generate

conventional-changelog -p angular -i CHANGELOG.md -s
undefined
conventional-changelog -p angular -i CHANGELOG.md -s
undefined

Pre-release Checklist

发布前检查清单

  • All changes categorized
  • Version number updated
  • Release date added
  • Breaking changes highlighted
  • Links to issues/PRs included
  • Unreleased section cleared
  • 所有变更已完成分类
  • 版本号已更新
  • 已添加发布日期
  • 重大变更已标记
  • 已包含Issue/PR链接
  • 已清空“Unreleased”部分