Electron 2.0 及以后的语义化版本
Electron 正在开发一个新的主要版本,同时我们对版本控制策略也进行了一些调整。从 2.0.0 版本开始,Electron 将严格遵循语义化版本控制(Semantic Versioning)。
🌐 A new major version of Electron is in the works, and with it some changes to our versioning strategy. As of version 2.0.0, Electron will strictly adhere to Semantic Versioning.
这一变化意味着你会更频繁地看到主版本的提升,而且通常会是对 Chromium 的重大更新。补丁版本也将更加稳定,因为它们现在只包含错误修复,不会有新功能。
🌐 This change means you'll see the major version bump more often, and it will usually be a major update to Chromium. Patch releases will also be more stable, as they will now only contain bug fixes with no new features.
主要版本更新
- Chrom 版本更新
- Node.js 主要版本更新
- Electron 断裂 API 更改
次要版本更新
- Node.js 小版本更新
- Electron 不间断 API 更改
补丁版本递增
- Node.js 补丁版本更新
- 修复相关的 chromium 补丁
- Electron 错误修复
因为 Electron 的 semver 范围现在将更有意义,我们建议使用 npm 的默认 --save-dev 标志来安装 Electron,这将为你的版本加上 ^ 前缀,使你能够安全地保持次要和修补程序更新:
🌐 Because Electron's semver ranges will now be more meaningful, we recommend
installing Electron using npm's default --save-dev flag, which will prefix
your version with ^, keeping you safely up to date with minor and patch
updates:
npm install --save-dev electron
对于只对错误修复感兴趣的开发者,你应该使用波浪号语义版本前缀,例如 ~2.0.0,它不会引入新功能,只会进行修复以提高稳定性。
🌐 For developers interested only in bug fixes, you should use the tilde semver prefix e.g. ~2.0.0, which which will never introduce new features, only fixes to improve stability.
欲了解更多详情,请参见 electronjs.org/docs/tutorial/electron-versioning。
🌐 For more details, see electronjs.org/docs/tutorial/electron-versioning.
