版本号规则
版本构成
常见的版本号:1.0.1
对应格式 major.minor.patch
major
:主版本号,一般在大版本发生变动时才改变minor
:次版本号,patch
:补丁版本
版本更新规则
- feature 会更新 minor
- bug fix 会更新 patch
- BREAKING CHANGES 会更新 major
配置文件 .versionrc.js
自定义模板
// .versionrc.js
module.exports = {
"types": [
{ "type": "feat", "section": "✨ Features | 新功能" },
{ "type": "fix", "section": "🐛 Bug Fixes | Bug 修复" },
{ "type": "init", "section": "🎉 Init | 初始化" },
{ "type": "docs", "section": "✏️ Documentation | 文档" },
{ "type": "style", "section": "💄 Styles | 风格" },
{ "type": "refactor", "section": "♻️ Code Refactoring | 代码重构" },
{ "type": "perf", "section": "⚡ Performance Improvements | 性能优化" },
{ "type": "test", "section": "✅ Tests | 测试" },
{ "type": "revert", "section": "⏪ Revert | 回退", "hidden": true },
{ "type": "build", "section": "📦 Build System | 打包构建" },
{ "type": "chore", "section": "🚀 Chore | 构建/工程依赖/工具" },
{ "type": "ci", "section": "👷 Continuous Integration | CI 配置" }
]
}