changesets README

The project's README from github.com/changesets/changesets. As one markdown file: README.md.

[!IMPORTANT] This is development branch for Changesets v3. For the v2 code, check out the maintenance/v2 branch.

Changesets banner

A tool to manage versioning and changelogs
with a focus on monorepos

Read the docs to learn more


Open on npmx.dev View changelog pkg.pr.new

Changesets is designed to help manage and describe changes, all the way through to publishing. It lets contributors declare how their changes should be released, and it'll handle updating package versions, changelogs, and publishing based on the provided changesets.

Changesets has a focus on solving these problems for monorepos, keeping packages that rely on each other up to date, as well as making it easy to make changes to groups of packages. Conceptually, the workflow is also beneficial for single package repos.

Visit https://changesets.dev to learn more.

changesets (changesets/changesets)

Searching Database…

这是什么?Changesets 是一个用于 JavaScript/TypeScript 项目的工具,主要面向单体仓库,负责管理版本号和更新日志。贡献者声明其变更应如何发布,Changesets 负责提升包的版本号、编写更新日志并发布。
这是一个命令行工具,还是需要在代码中导入的库?它是一个命令行/npm 包,以开发依赖的形式添加到你的仓库中(而不是需要在应用代码中导入的库)。你通过 npm/pnpm/yarn 脚本运行其命令,用来添加变更集、更新包版本并发布。
如何将它添加到项目中?将其安装为开发依赖,然后运行其 init 命令,设置 .changeset 文件夹和配置;之后每当你做出需要提升版本号的变更时,使用 `changeset` 命令即可。
我是否需要先安装 pnpm workspaces 或 Lerna 这类单体仓库工具?不需要特定的单体仓库工具。不过,Changesets 正是为解决单体仓库中相互依赖的包的版本管理问题而设计的,它同样适用于单包仓库。
现在可以稳定使用 main 分支吗?main 分支是 Changesets v3 的活跃开发分支;如果你需要稳定的 v2 版本行为,应改用 maintenance/v2 分支。
这只对开源 npm 包有用吗?它面向任何管理发布的 JS/TS 项目,尤其是包含多个相互依赖的包的仓库,但该工作流同样被认为对单包仓库有益。
Changesets 在日常中到底是怎么工作的?当你做出应触发发布的变更时,运行 changeset 命令,选择受影响的包,以及是主版本、次版本还是补丁版本的升级,并编写简短的摘要。该 Markdown 文件会随你的 PR 一起提交,之后用于提升版本号并生成更新日志。
它也能处理发布到 npm 吗?能。Changesets 覆盖从版本管理到发布的完整流程,而不仅限于提升版本号和生成更新日志。
为什么不手动提升版本号,而要用这个?在包之间相互依赖的单体仓库中,手动跟踪哪些包需要提升版本,并保持依赖它们的包同步,很容易出错;Changesets 会在整个包依赖关系图中自动完成这种协调。
What are similar projects?lerna, commitlint, semantic-release, git-extras, renovate, upm, epiq, pnpm
Creator
changesets
Size
7.5 MB
Stars
12.5K
Age
7y
Commits · 90 Days