Repository navigation
ci(release): catch-up reads versions without needing a latest tag - #10
Merged
Merged
Conversation
Called with a bare name, `npm view` answers only for the `latest` tag, and prints nothing, exit 0, for a package without one. dev publishes with `--tag dev`, so until a prod promotion tags it, @beplus/be has no `latest` in GitHub Packages and its versions read as none (the libraries' promotions hit exactly this: beplus/setup-beplus's fix is the same). The tag read for a leftover catch-up tag had the same blind spot. Each lookup now names a version: GitHub Packages the one the commit carries; CodeArtifact `latest`, then that version, then each earlier one dev released, until one matches. One `npm view` answers for both the versions and the catch-up tag. Co-Authored-By: Igor Lamos <igor@be.plus>
igorlamos
approved these changes
Oct 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The libraries' first stage promotions after the catch-up (#9's counterpart, beplus/setup-beplus#15) refused packages that dev had published: "is not in GitHub Packages, so dev never released it".
Called with a bare name,
npm viewanswers only for thelatesttag, and for a package without one it prints nothing and exits 0. dev publishes with--tag dev, so until a prod promotion tags it, a package has nolatestin GitHub Packages, andcatch-up-codeartifact.shwould read its versions as none. Its read of a leftovercatch-uptag had the same blind spot.The change
verify-version.shhas already checked is there. CodeArtifact is asked forlatest, then that version, then each earlier one dev released, until one matches.npm view … versions dist-tagsanswers for both the versions and thecatch-uptag.latestpresent, it's still one call per registry.No version bump:
bin/bedoesn't change.Tested
npm run lintpasses. Locally, the script ran against a stubbednpmthat answers like the real one (nothing for a bare name withoutlatest, "No match found" for a missing version):latestin GitHub Packages, with stage lacking everythinglatest, plus a leftovercatch-uptaglatesteverywhere