semver

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Semantic Versioning

语义化版本控制(Semantic Versioning)

Version numbers follow the format Major.Minor.Patch (e.g.,
1.14.10
).
版本号遵循 主版本.次版本.修订版本(Major.Minor.Patch)格式(例如:
1.14.10
)。

Stable Software (1.0.0+)

稳定版软件(1.0.0+)

Change typeBumpResetExample
Breaking changeMajorMinor and Patch to 0
1.14.10
->
2.0.0
New feature or backwards-compatible behavior changeMinorPatch to 0
1.14.10
->
1.15.0
Bug fix or security fix (backwards-compatible)PatchNothing
1.14.10
->
1.14.11
Reserve patch releases exclusively for fixes. Lack-of-feature is not a bug — use minor releases for those.
Consumer guarantee: newer releases within the same major version are safe to upgrade to.
变更类型升级类型重置规则示例
破坏性变更主版本次版本和修订版本重置为0
1.14.10
->
2.0.0
新增功能或向后兼容的行为变更次版本修订版本重置为0
1.14.10
->
1.15.0
漏洞修复或安全修复(向后兼容)修订版本
1.14.10
->
1.14.11
修订版本升级仅用于修复问题。功能缺失不属于漏洞——此类情况请使用次版本升级。
用户保障:同一主版本内的新版本可安全升级。

Unstable Software (0.x.x)

不稳定版软件(0.x.x)

Software with major version
0
is unstable — no stability commitment yet.
Change typeBumpExample
Bug fix or security fixPatch
0.3.2
->
0.3.3
Everything else (features AND breaking changes)Minor
0.3.2
->
0.4.0
  • Start development at
    0.1.0
    .
  • Release
    1.0.0
    when ready to commit to stability.
Consumer guarantee: fixes available within the same minor version.
主版本号为
0
的软件属于不稳定版本——暂不承诺稳定性。
变更类型升级类型示例
漏洞修复或安全修复修订版本
0.3.2
->
0.3.3
其他所有变更(功能新增及破坏性变更)次版本
0.3.2
->
0.4.0
  • 开发从
    0.1.0
    版本开始。
  • 当准备好承诺稳定性时,发布
    1.0.0
    版本。
用户保障:同一主版本内的次版本提供修复支持。

Breaking Changes

破坏性变更

Semver communicates breaking changes clearly — but does not make them cheap. For popular software with many downstream consumers, partial upgrades create ecosystem fragmentation.
Guidelines:
  • Avoid major version bumps for as long as possible.
  • If a major bump is unavoidable, provide a gradual migration path.
  • Do not treat semver as a license to make breaking changes.
Semver可清晰传达破坏性变更——但这并不意味着可以随意进行破坏性变更。对于拥有大量下游用户的热门软件,部分升级会导致生态系统碎片化。
指南:
  • 尽可能避免主版本升级。
  • 若主版本升级不可避免,请提供逐步迁移路径。
  • 不要将Semver视为进行破坏性变更的许可。