Newshot

npm 为暂存包推出批量审批发布功能

AI summary

npm 的暂存发布计划允许维护者将多个已暂存版本(每个包最多一个版本)打包成一个批次,通过一次双重认证(2FA)审批统一发布,取代了以往每个版本单独审批的方式。此前逐包逐版本发起 2FA 验证,还可能出现部分包已发布而依赖包尚未发布的窗口期,导致发布过程中安装中断。该功能也为将暂存发布作为使用绕过 2FA 访问令牌的 monorepo 发布者的强制回退方案迈出了一步。

Translation(model translation, not the source's own text)

npm 分阶段包的批量审批发布

npm 的 Staged Publishing Plans 让包维护者可以将多个分阶段版本——每个包最多一个版本——打包成一个分组批次,并通过一次双因素认证(2FA)审批一起发布。现在多包 monorepo 发布不再需要逐个版本审批,只需一次审批,且该审批绑定到审批时显示的确切包和版本集合。

此前,分阶段发布会对每次发布发起一次 2FA 挑战,因此一次发布多个包意味着每个包和版本都要进行一次挑战。这还造成了一个窗口期:部分包已发布,而其依赖的兄弟包尚未发布,可能导致发布过程中安装失败。Publishing Plans 支持将整个批次协调为一次发布。

此能力也是朝着让分阶段发布成为 monorepo 发布者可行的强制回退方案迈出的一步,这些发布者使用授予绕过 2FA 权限的访问令牌。

了解更多,请参阅 npm 文档中的 Staged publishing for npm packages。

加入 GitHub Community 中的讨论。

social
social

Only about 540 characters could be extracted — the rest did not come through (common on sites that need scrolling or a login). Read the original for the full piece.

Published by GitHub Changelog
This site only summarises and aggregates; copyright stays with the original author. Headlines and summaries follow the source — where they differ, the original wins.
Read the original ↗