Storybook 的发布方式
Storybook 软件包(storybook 以及 @storybook 组织 下的所有内容)遵循 语义版本控制(语义版本)。我们拥有结构化的发布流程,以确保稳定性、兼容性以及用户顺畅的升级路径。本页概述了我们的发布渠道、支持的版本以及主要版本、次要版本、补丁版本和预发布的节奏。
¥Storybook packages (storybook and everything under the @storybook organization) follow Semantic Versioning (semver). We have a structured release process to ensure stability, compatibility, and a smooth upgrade path for users. This page outlines our release channels, supported versions, and the cadence of major, minor, patch, and pre releases.
发布渠道
¥Release Channels
我们通过两个渠道发布版本。你可以通过 npm 标签安装特定通道:
¥We publish releases on two channels. You can install a specific channel via npm tags:
-
稳定版本 (
latest):安装最新的稳定版本。¥Stable channel (
latest): Installs the latest stable release.
npm create storybook@latest-
预发布渠道 (
next):安装最新的 pre-release。¥Pre-release channel (
next): Installs the latest pre-release.
npm create storybook@next支持的版本
¥Supported Versions
我们积极维护 Storybook 的最新主要版本。在当前主要版本中,我们仅修补最新的次要版本。大多数修复和新工作都会进入下一个次要版本(有时是主要版本),并且不会被反向移植。关键安全修复可能会在当前主要版本中更广泛地反向移植,并且在极少数情况下(例如在新主要版本发布后的短时间内),可能会移植到上一个主要版本。
¥We actively maintain the latest major version of Storybook. Within the current major, we patch only the latest minor version. Most fixes and new work go into the next minor (or sometimes major) and are not backported. Critical security fixes may be backported more broadly across the current major version, and in rare cases (such as for a short period immediately following a new major), to the previous major.
例如,如果最新版本是 9.2.1:
¥For example, if the latest version is 9.2.1:
-
我们支持
9.x.x版本,并发布9.2.x补丁版本。¥We support
9.x.xversions and release9.2.xpatch versions -
大多数修复和新工作将以
9.3.0-alpha.x版本发布。¥Most fixes and new work will be released as
9.3.0-alpha.xversions-
如果下一个版本是主版本,则为
10.0.0-alpha.x¥If the next release is a major version, it would be
10.0.0-alpha.x
-
-
我们会将关键的安全修复程序反向移植到
9.1.x或9.0.x。¥We will backport critical security fixes to
9.1.xor9.0.x -
在极少数情况下,我们可能会根据需要将关键修复反向移植到
8.6.x¥Rarely, we may backport critical fixes to
8.6.xas necessary
为了与 JavaScript 生态系统中的其他库和工具兼容,请参阅 兼容性跟踪器。
¥For compatibility with other libraries and tools in the JavaScript ecosystem, please refer to the compatibility tracker.
发布周期
¥Release Cycle
主要版本
¥Major Release
Cadence:大约每年一次
¥Cadence: Roughly once per year
渠道:稳定版本 (latest)
¥Channel: Stable (latest)
主要版本会引入重大变更和重要的新功能。我们使用主要版本来跟上生态系统的变化,改进 Storybook 的架构和 API,并使该工具更快、更精简、更易于使用。
¥Major releases introduce breaking changes and significant new features. We use major releases to keep up with ecosystem changes, evolve Storybook’s architecture and APIs, and make the tool faster, leaner, and easier to use.
一旦我们开始开发主要版本,我们会暂停次要版本,但会根据需要继续发布补丁版本。主要版本在进入稳定版本之前会经历 pre-releases、alpha、beta 和 rc(候选版本)的一系列发布。我们的目标是包含自动迁移功能,并在需要手动更改时提供 全面的迁移指南。
¥Once we start working on a major release, we pause minor releases but continue to ship patch releases as needed. Major releases go through a sequence of pre-releases—alpha, beta, and rc (release candidate)—before landing in the stable channel. We aim to include automated migrations and provide a comprehensive migration guide when manual changes are necessary.
Storybook 7 之前的版本架构非常不同。因此,从 v6 升级到较新版本可能会更具挑战性。从 v7 开始,我们重点关注更顺畅的迁移。得益于自动迁移和更强大的工具,从 v7 升级到 v8,以及从 v8 升级到 v9(及更高版本)应该会更加容易。
¥Storybook versions prior to 7 had a very different architecture. As a result, upgrading from v6 to newer versions can be more challenging. Starting in v7, we’ve focused heavily on smoother migrations. Upgrades from v7 to v8, and v8 to v9 (and beyond), should feel significantly easier thanks to automigrations and better tooling.
次要版本发布
¥Minor Release
Cadence:大约每 8 周一次
¥Cadence: Roughly every 8 weeks
渠道:稳定版本 (latest)
¥Channel: Stable (latest)
次要版本发布会带来新功能、增强功能和非破坏性改进。每个次要版本发布之前可能都会有一个 alpha pre-release(例如 x.y.0-alpha)。
¥Minor releases deliver new features, enhancements, and non-breaking improvements. Each minor release may be preceded by an alpha pre-release (e.g. x.y.0-alpha).
补丁发布
¥Patch Release
Cadence:根据需要(仅限当前次要版本)
¥Cadence: as needed (only for the current minor)
渠道:稳定版本 (latest)
¥Channel: Stable (latest)
补丁版本包含关键错误修复和安全更新。这些功能仅适用于当前次要版本,并非预发布版本。
¥Patch releases include critical bug fixes and security updates. These are issued only for the current minor version and are not pre-released.
预发布版本
¥Pre-release
Cadence:定期
¥Cadence: Regularly
渠道:预发布 (next)
¥Channel: Pre-release (next)
创建预发布版本是为了收集早期反馈并确保正式发布前的稳定性。次要版本稳定版本发布之前会发布带有 alpha 标签的预发布版本(例如 x.y.0-alpha),并且没有补丁预发布版本。在主要版本稳定版本发布之前,会经历一个更完整的 alpha、beta 和 rc 预发布周期,之后才会发布最终版本。
¥Pre-releases are created to gather early feedback and ensure stability before an official release. Minor version stable releases are preceded by pre-releases with an alpha tag (e.g. x.y.0-alpha), with no patch pre-releases. Major version stable releases are preceded by a fuller cycle of alpha, beta, and rc pre-releases before the final release.
