npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

was-staged-publish

v1.0.0

Published

Determine, from an npm packument, whether a published version was a staged publish (and thus 2FA-approved by a human)

Readme

was-staged-publish Version Badge

github actions coverage License Downloads

npm badge

Determine, from an npm packument, whether a published version was a staged publish — and therefore approved by a human passing a 2FA challenge.

Why?

Staged publishing shipped in npm v11.15.0 on 2026-05-20. It requires a maintainer to pass a two-factor-authentication challenge to approve a version before it goes live. That approval is the only signal that survives into a package's public metadata proving a second factor was involved in a release. This tool reads that signal.

What it can and can't tell you:

  • Staged is detectable. Either _npmUser.approver is present (npm >= 11.16.0), or — in the original npm v11.15 window — the publish is missing dist.fileCount/dist.unpackedSize, which that flow dropped.
  • Definitely not staged is detectable when the publish used npm < 11.15 (which cannot stage), predates 2026-05-20, or used npm >= 11.16.0 without an approver (the fixed flow always records one).
  • ❓ The only unknown is an npm v11.15 publish with file stats present and no approver. A plain local publish with 2FA and one without are indistinguishable in a packument; staging is what finally made 2FA observable.

Staging and provenance are orthogonal: a publish can be built in CI via OIDC/trusted publishing and be staged. Such a publish is reported as staged, since unlike non-staged OIDC publishing, it uses 2FA.

CLI

npx was-staged-publish <pkg>[@<version>] [--registry <url>]

<version> may be an exact version or a dist-tag; it defaults to latest.

Exit codes:

| code | meaning | stream | | ---: | ------- | ------ | | 0 | staged (for sure) | stdout | | 1 | definitely not staged | stderr | | 2 | unknown (cannot be determined) | stderr | | 3 | usage or fetch error | stderr |

was-staged-publish [email protected]
# [email protected]: staged — `_npmUser.approver` is present: ...   (exit 0)

was-staged-publish [email protected]
# [email protected]: NOT staged — published ..., before staged publishing shipped  (exit 1)

was-staged-publish [email protected]
# [email protected]: unknown — published with npm 11.15.0 in the v11.15 window ...  (exit 2)