changelog

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Changelog & Release Notes

变更日志与发布说明

Changelog generation, semantic versioning, and release management.
变更日志生成、语义化版本管理及发布流程管理。

Conventional Commits

约定式提交规范

<type>[optional scope]: <description>

[optional body]

[optional footer(s)]
<type>[optional scope]: <description>

[optional body]

[optional footer(s)]

Types

提交类型

feat:     New feature (bumps MINOR)
fix:      Bug fix (bumps PATCH)
docs:     Documentation only
style:    Formatting, no code change
refactor: Code change, no feature/fix
perf:     Performance improvement
test:     Adding/fixing tests
build:    Build system, dependencies
ci:       CI configuration
chore:    Other changes (no src/test)

BREAKING CHANGE: in footer (bumps MAJOR)
feat!: or fix!: breaking change shorthand
feat:     新增功能(升级MINOR版本)
fix:      修复Bug(升级PATCH版本)
docs:     仅更新文档
style:    格式调整,无代码逻辑变更
refactor: 代码重构,无新增功能或Bug修复
perf:     性能优化
test:     添加或修复测试用例
build:    构建系统或依赖项变更
ci:       CI配置变更
chore:    其他变更(无源码或测试文件修改)

BREAKING CHANGE: 放在 footer 中(升级MAJOR版本)
feat!: 或 fix!: 破坏性变更的简写形式

Examples

示例

feat(auth): add OAuth2 login flow
fix(api): handle null response from payment gateway
docs: update API authentication guide
refactor(db): extract connection pooling to module
perf: optimize image loading with lazy load

feat!: redesign user API endpoints

BREAKING CHANGE: /api/users now returns paginated results
feat(auth): add OAuth2 login flow
fix(api): handle null response from payment gateway
docs: update API authentication guide
refactor(db): extract connection pooling to module
perf: optimize image loading with lazy load

feat!: redesign user API endpoints

BREAKING CHANGE: /api/users now returns paginated results

Semantic Versioning

语义化版本控制

MAJOR.MINOR.PATCH

1.0.0 → 1.0.1  (fix: patch)
1.0.1 → 1.1.0  (feat: minor)
1.1.0 → 2.0.0  (BREAKING CHANGE: major)

Pre-release: 1.0.0-alpha.1, 1.0.0-beta.2, 1.0.0-rc.1
MAJOR.MINOR.PATCH

1.0.0 → 1.0.1  (fix: 升级PATCH版本)
1.0.1 → 1.1.0  (feat: 升级MINOR版本)
1.1.0 → 2.0.0  (BREAKING CHANGE: 升级MAJOR版本)

预发布版本: 1.0.0-alpha.1, 1.0.0-beta.2, 1.0.0-rc.1

Version Bump Commands

版本号升级命令

bash
undefined
bash
undefined

npm

npm

npm version patch # 1.0.0 → 1.0.1 npm version minor # 1.0.0 → 1.1.0 npm version major # 1.0.0 → 2.0.0 npm version prerelease --preid=beta # 1.0.0 → 1.0.1-beta.0
npm version patch # 1.0.0 → 1.0.1 npm version minor # 1.0.0 → 1.1.0 npm version major # 1.0.0 → 2.0.0 npm version prerelease --preid=beta # 1.0.0 → 1.0.1-beta.0

Python (bump2version)

Python (bump2version)

pip install bump2version bump2version patch bump2version minor bump2version major
undefined
pip install bump2version bump2version patch bump2version minor bump2version major
undefined

CHANGELOG.md Format

CHANGELOG.md 格式

markdown
undefined
markdown
undefined

Changelog

Changelog

All notable changes to this project will be documented in this file.
本项目所有重要变更都将记录在此文件中。

[Unreleased]

[Unreleased]

Added

新增

  • New user dashboard with analytics
  • 新增带数据分析功能的用户仪表盘

Changed

变更

  • Updated password requirements to 12 characters minimum
  • 更新密码要求为至少12位字符

Fixed

修复

  • Fix memory leak in WebSocket handler
  • 修复WebSocket处理器中的内存泄漏问题

[2.1.0] - 2024-03-15

[2.1.0] - 2024-03-15

Added

新增

  • OAuth2 login with Google and GitHub
  • Rate limiting on API endpoints
  • Export data to CSV
  • 支持Google和GitHub的OAuth2登录
  • API端点新增速率限制
  • 支持将数据导出为CSV格式

Changed

变更

  • Upgrade Node.js to v20 LTS
  • Migrate from Express to Fastify
  • 将Node.js升级至v20 LTS版本
  • 从Express迁移至Fastify框架

Deprecated

弃用

  • Legacy /api/v1 endpoints (use /api/v2)
  • 弃用旧版/api/v1端点(请使用/api/v2)

Fixed

修复

  • Fix race condition in concurrent file uploads
  • Fix incorrect timezone in scheduled reports
  • 修复并发文件上传中的竞态条件问题
  • 修复定时报告中的时区错误

Security

安全

  • Update jsonwebtoken to fix CVE-2024-XXXX
  • 更新jsonwebtoken以修复CVE-2024-XXXX漏洞

[2.0.0] - 2024-02-01

[2.0.0] - 2024-02-01

Changed

变更

  • BREAKING: Redesign API response format
  • BREAKING: Require Node.js 18+
  • 破坏性变更: 重新设计API响应格式
  • 破坏性变更: 要求Node.js 18+版本

Removed

移除

  • BREAKING: Remove XML response format
undefined
  • 破坏性变更: 移除XML响应格式
undefined

Automated Changelog Tools

自动化变更日志工具

conventional-changelog

conventional-changelog

bash
npm install -D conventional-changelog-cli
bash
npm install -D conventional-changelog-cli

Generate changelog

生成变更日志

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

First release (rewrite entire changelog)

首次发布(重写整个变更日志)

npx conventional-changelog -p angular -i CHANGELOG.md -s -r 0
undefined
npx conventional-changelog -p angular -i CHANGELOG.md -s -r 0
undefined

standard-version / release-please

standard-version / release-please

bash
undefined
bash
undefined

standard-version

standard-version

npm install -D standard-version npx standard-version # Auto bump + changelog npx standard-version --first-release npx standard-version --prerelease beta npx standard-version --dry-run # Preview
npm install -D standard-version npx standard-version # 自动升级版本号 + 生成变更日志 npx standard-version --first-release npx standard-version --prerelease beta npx standard-version --dry-run # 预览效果

Google release-please (GitHub Action)

Google release-please (GitHub Action)

.github/workflows/release.yml

.github/workflows/release.yml

Uses commits to auto-create release PRs

根据提交记录自动创建发布PR

undefined
undefined

Release Please GitHub Action

Release Please GitHub Action

yaml
name: Release
on:
  push:
    branches: [main]

permissions:
  contents: write
  pull-requests: write

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - uses: googleapis/release-please-action@v4
        with:
          release-type: node
yaml
name: Release
on:
  push:
    branches: [main]

permissions:
  contents: write
  pull-requests: write

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - uses: googleapis/release-please-action@v4
        with:
          release-type: node

git-cliff

git-cliff

bash
undefined
bash
undefined

Install

安装

cargo install git-cliff
cargo install git-cliff

Generate changelog

生成变更日志

git cliff -o CHANGELOG.md
git cliff -o CHANGELOG.md

Since last tag

生成最后一个标签以来的变更

git cliff --latest -o CHANGELOG.md
git cliff --latest -o CHANGELOG.md

Custom template

使用自定义模板

git cliff --config cliff.toml
undefined
git cliff --config cliff.toml
undefined

Release Notes Template

发布说明模板

markdown
undefined
markdown
undefined

v2.1.0 Release Notes

v2.1.0 发布说明

Highlights

重点更新

  • OAuth2 Support: Login with Google and GitHub accounts
  • Performance: 40% faster API response times
  • OAuth2 支持: 支持使用Google和GitHub账号登录
  • 性能优化: API响应速度提升40%

What's New

新增功能

  • OAuth2 login flow with Google and GitHub providers
  • Rate limiting (100 req/min for API, 1000 for authenticated)
  • CSV data export for all report types
  • 支持Google和GitHub提供商的OAuth2登录流程
  • 速率限制(API未认证用户100次/分钟,认证用户1000次/分钟)
  • 所有报告类型支持CSV数据导出

Bug Fixes

Bug修复

  • Fixed memory leak in WebSocket connection handler
  • Fixed incorrect timezone display in scheduled reports
  • Fixed file upload race condition with concurrent requests
  • 修复WebSocket连接处理器中的内存泄漏问题
  • 修复定时报告中的时区显示错误
  • 修复并发请求下文件上传的竞态条件问题

Breaking Changes

破坏性变更

None in this release.
本次发布无破坏性变更。

Upgrade Guide

升级指南

bash
npm install myapp@2.1.0
npx myapp migrate
bash
npm install myapp@2.1.0
npx myapp migrate

Contributors

贡献者

@alice, @bob, @charlie
undefined
@alice, @bob, @charlie
undefined

Reference

参考资料

For automated tooling and CI integration:
references/tools.md
关于自动化工具与CI集成:
references/tools.md