You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Use the channel's dist-tag when counting published prereleases #163
We are publishing to GCP's registry on an alpha channel. Our second channel publish tried to reuse 0.1.0-alpha.0 for every package, and the registry rejected each one with "Requested version(0.1.0-alpha.0) already exists".
bumpy finds the next prerelease number with npm info <name> versions --json. That command doesn't list every version. When the spec has no version, npm looks the package up through its tag config, which defaults to latest. If the package has no latest dist-tag, npm prints nothing and exits 0. You can see this in npm 11's lib/commands/view.js, which throws "No match found" for any other tag but returns quietly for latest. bumpy then fails on JSON.parse(""), the catch returns [], and the counter starts over at 0.
npmjs.org always sets latest on a package's first publish I'm guessing, so this doesn't show up there. GCP only appears to set the dist-tag you publish with. We ran these on the CI runner after the first alpha publish:
Command
Output
npm info @scope/pkg@0.1.0-alpha.0 dist-tags --json
{"alpha": "0.1.0-alpha.0"}
npm info @scope/pkg versions --json
nothing, exit 0
npm_config_tag=alpha npm info @scope/pkg versions --json
["0.1.0-alpha.0"]
Our workaround is to explicitly set npm_config_tag based on the branch.
Activity
pullfrog commentedon Oct 14, 2026
theoephraim commentedon Oct 14, 2026
Thanks for this report! Hard to froresee these things without real workflows exercising them.
Will get it sorted asap.
fix: count prereleases on registries without a latest dist-tag (#164)
github-actions commentedon Oct 15, 2026
✅ A fix has been merged to
mainin #164 and will ship in the next release.GitHub auto-closed this issue on merge, but the change isn't published yet — it'll go out with the next
bumpyrelease. 🐸