
Image: GitHub
Why it mattersA monorepo that releases ten packages at once used to need ten 2FA prompts. One can fail halfway and leave packages pinned to siblings that were never released.
A monorepo maintainer who releases ten packages at once used to answer ten two-factor prompts in a row. GitHub said on 30 November that npm now groups them into one batch. The feature is called Staged Publishing Plans, and it is generally available.
The problem it fixes is familiar to anyone who has released a set of linked packages. Each release used to be its own prompt, and a prompt could be missed or timed out. When that happened, only part of the batch reached the registry. A user who ran npm install in that window got a package that needed a sibling. The sibling was not there yet, and the install broke.
What the new flow does
GitHub's own wording describes it in three lines. Staged Publishing Plans let a maintainer bundle multiple staged versions into one grouped batch. The limit is one version per package. The batch is then released together "under one two-factor authentication (2FA) approval". GitHub says Publishing Plans is coordinating "an entire batch as a single release". The approval is tied to the exact set of packages and versions the maintainer saw at approval time.
What GitHub did not say
The post leaves three questions open. It does not state a maximum number of packages in a single batch. It does not say which 2FA method is required. TOTP, a security key and a passkey all sit under the one label. And it names no specific monorepo or publisher who tested the flow.
The context: supply-chain attacks on npm packages
GitHub filed this one under "Supply Chain Security", and that label fits the post's main point. The npm registry has been the target of a steady run of attacks this year. In each one, a maintainer's token or 2FA prompt is intercepted. A replacement package is then uploaded in their name. One prompt is easier to protect than ten. A single batch is also harder for an attacker to slice open and swap part of.
The trade-off
A single prompt is also a single point of trust. The whole batch rests on the one approval. A maintainer who approves the wrong set has authorised every package in it at once. The old flow had the opposite problem. It was easy to miss a step and leave a batch half done. Which one is safer depends on who is on the other end of the prompt.
A team that uses changesets, Lerna or Nx on a monorepo had one step done one package at a time. This removes it. For a team that has been releasing one package, it changes nothing today.
Source
npm batch approval releases for staged packages, GitHub Changelog.
This item was written by an AI system from the linked source. Reveneau is responsible for what it publishes.
Get AI News in your inbox
New developer tools, model and agent releases, and how teams are actually using them to release software. Short, and only when there is something worth reading.


