Skip to content

npm staged publishing adds one-click batch approval

A maintainer can now approve up to 100 staged package versions with a single 2FA challenge, closing the gap where a monorepo release went out one package at a time.

Source: GitHub

GitHub shipped batch approval for npm’s staged publishing on 30 November. A maintainer can now bundle multiple staged versions, up to one per package, into a single grouped release and approve the whole thing with one two-factor challenge, instead of approving each package and version separately.

Staged publishing itself has been generally available since May: any publish from an access token goes into a staging area first, and a human has to approve it with 2FA before it reaches the registry. The gap it left was multi-package releases. A monorepo publishing several packages at once still meant one 2FA challenge per package, and because approvals happened in sequence, a package could go live while its dependent siblings were still waiting, breaking installs mid-release. Batch approval ties one confirmation to the exact set of packages and versions staged at that moment, and a maintainer can approve or reject up to 100 staged versions on npmjs.com in that single step.

Why it matters: this is aimed squarely at the token-based publishing that staged publishing was built to replace. If your CI still publishes a monorepo with a bypass-2FA token, batch approval removes the main reason teams gave up on the safer, human-approved flow, which makes staged publishing a realistic default rather than a tax on multi-package releases.

Share

Related reading

More from The Wire

All briefs

node-tar patches a Windows RCE bug triggered by npm install

A newline-injection flaw in node-tar let a crafted archive forge its own file paths and run code during npm install on Windows. The fix landed in a string of releases up to 8.1.0 on 2 December.

via GitHub Security Advisories (isaacs/node-tar)