Skip to content

版本控制

修复 lint 规则、格式化布局等可能会阻止你的脚本通过。由于这些更改的性质,强烈建议在 package.json 中保存确切的版本,而不是使用范围运算符。

¥Fixes to lint rules, formatting layouts, etc. might prevent your scripts from passing. Due to the nature of these changes, it’s highly recommended to save the exact version in your package.json, instead of using range operators.

这种方法将确保你的脚本不会意外失败。

¥This methodology will make sure that your script won’t fail unexpectedly.

¥Semantic Versioning

Biome 遵循 语义版本控制。由于 Biome 作为工具链的性质,可能不清楚哪些更改被视为主要更改、次要更改或补丁。这就是 Biome 使用以下版本控制指南的原因:

¥Biome follows semantic versioning. Due to the nature of Biome as a toolchain, it can be unclear what changes are considered major, minor, or patch. That’s why Biome uses the following versioning guide:

¥Patch Release

  • 修复引发有效代码的 lint 错误(误报)的 lint 规则

    ¥Fixing a lint rule that raises lint errors for valid code (false positives)

  • 修复不正确的代码建议

    ¥Fixing incorrect code suggestions

  • 修复导致无效代码或更改程序语义的语法格式。

    ¥Fixing the formatting of a syntax that results in invalid code or changes the semantics of the program.

  • 改进文档

    ¥Improvements to the documentation

  • 不会改变 Biome 功能的内部更改:

    ¥Internal changes that don’t change Biome’s functionality:

    • 重构

      ¥Refactors

    • 性能改进

      ¥Performance improvements

    • 增加或更改测试覆盖率

      ¥Increase or change in test coverage

  • 改进诊断的措辞或修复诊断的渲染。

    ¥Improving the wording of diagnostics or fixing the rendering of diagnostics.

  • 发布失败后的重新发布

    ¥Re-releases after a failed release

  • 可以考虑并实现对 Biome 样式的更改。

    ¥Changing the formatting of established syntax.

¥Minor Release

  • 添加新规则或将现有的 lint 规则提升到默认不推荐的稳定组。

    ¥Adding a new rule or promoting an existing lint rule to a stable group that is not recommended by default.

  • 为最近引入的语言功能添加 linting 和格式化支持,即使这会导致更多报告的 linting 错误。

    ¥Adding linting and formatting support for a recently introduced language feature, even if that results in more reported linting errors.

  • 删除推荐规则

    ¥Removal of recommended rules

  • 弃用现有规则

    ¥Deprecation of existing rules

  • 添加新的配置可选配置选项,这些选项不会更改格式或报告更多 lint 错误。

    ¥Adding new configuration optional configuration options that do not change the formatting or report more lint errors.

  • 添加新的推荐 lint 规则或将现有的 lint 规则从 Nursery 组提升为稳定组中的推荐 lint 规则。

    ¥Adding a new recommended lint rule or promoting an existing lint rule from the nursery group to a recommended lint rule in a stable group.

  • 删除非托儿所规则或将规则降级到托儿所组。

    ¥Removal of a non-nursery rule or demoting a rule to the nursery group.

¥Major Release

  • 对 Biome 公共 API 的更改

    ¥Changes to the configuration that result in different formatting or more reported lint errors (adding/removing options, changing the default value)

  • 捕获参数在 中。

    ¥Changes to Biome’s public API

  • 推广需要关注的新功能或工具

    ¥Promotion of new features or tools that require some spotlight

¥Visual Studio Code Extension

用于扩展的 Visual Studio Code 不支持预发布标签。这就是 Biome 使用以下版本模式来区分稳定版和预览版的原因:

¥Visual Studio Code doesn’t support pre-release tags for extensions. That’s why Biome uses the following version schema to distinguish stable and previews:

  • 稳定版本使用偶数版本号:10, 12, 14, 16, …

    ¥Stable releases use even version numbers: 10, 12, 14, 16, …

  • 预览使用奇数版本号:11, 13, 15, 17, …

    ¥Previews use odd version numbers: 11, 13, 15, 17, …