Skip to content

fix: count prereleases on registries without a latest dist-tag - #164

Merged
theoephraim merged 2 commits into
mainfrom
fix/prerelease-counter-dist-tag
Oct 15, 2026
Merged

theoephraim merged 2 commits into
mainfrom
fix/prerelease-counter-dist-tag

Conversation

@theoephraim

Copy link
Copy Markdown
Member

Fixes #163.

npm info <name> versions --json resolves through the tag config (latest). When the package has no latest dist-tag — e.g. GCP Artifact Registry, which only sets the tag you publish with — npm prints nothing and exits 0, so bumpy parsed "", fell back to [], and restarted every channel counter at .0.

  • fetchPublishedVersions tries the default lookup, then falls back to --tag <channel tag>. If neither resolves, it reports unresolved and buildChannelReleasePlan adds a warning instead of silently counting from 0.
  • Snapshot idempotency now checks npm info <name>@<version> directly (no dist-tag resolution).
  • packageExistsOnNpm (OIDC new-package check) treats exit 0 as "exists", since output is empty without latest.
  • Tests cover the fallback, unresolved warning, registry passthrough, and exact-version check via the shell mock.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

bumpy-frog

The changes in this PR will be included in the next version bump.

patch Patch releases

  • @varlock/bumpy 1.18.1 → 1.18.2

Bump files in this PR

Click here if you want to add another bump file to this PR


This comment is maintained by bumpy.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Registry command failures still bypass the new unresolved-state warning and can silently restart a published channel at .0.

Reviewed changes in 293845b, covering the registry fallback, channel planning, snapshot idempotency, package-existence check, and regression tests.

  • Channel version discovery — retries an empty latest lookup through the configured channel dist-tag and propagates unresolved state into release planning.
  • Collision visibility — emits a warning when neither latest nor the channel tag exposes the package version list.
  • Exact snapshot lookup — checks the generated snapshot version directly instead of relying on package-wide dist-tag resolution.
  • OIDC package detection — treats successful package metadata lookup as package existence even when output is empty.
  • Regression coverage — exercises fallback lookup, custom registry forwarding, warning behavior, and exact-version checks.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-5.6-sol | 𝕏

Comment thread packages/bumpy/src/core/prerelease.ts Outdated

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes since the prior Pullfrog review in 293845b; the new commit addresses the outstanding registry-failure classification concern without regressing the dist-tag fallback.

  • Failure classification — Distinguished confirmed E404 responses from authentication, network, registry, and malformed-response failures.
  • Warning propagation — Preserved first-publication behavior for missing packages while surfacing operational lookup failures before selecting prerelease counter .0.
  • Regression coverage — Added tests for non-404 command failures, malformed responses, fallback failures, and the resulting release-plan warning.

Pullfrog  | View workflow run | Using gpt-5.6-sol | 𝕏

@theoephraim
theoephraim merged commit e701d4b into main Oct 15, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use the channel's dist-tag when counting published prereleases

1 participant