Skip to content

ci(release): catch-up reads versions without needing a latest tag - #10

Merged
igorlamos merged 1 commit into
devfrom
ci/catch-up-without-latest
Oct 8, 2026
Merged

igorlamos merged 1 commit into
devfrom
ci/catch-up-without-latest

Conversation

@beplus-agent-claude

Copy link
Copy Markdown
Contributor

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 view answers only for the latest tag, 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 no latest in GitHub Packages, and catch-up-codeartifact.sh would read its versions as none. Its read of a leftover catch-up tag had the same blind spot.

The change

  • Each lookup names a version. GitHub Packages is asked for the version the commit carries, which verify-version.sh has already checked is there. CodeArtifact is asked for latest, then that version, then each earlier one dev released, until one matches.
  • One npm view … versions dist-tags answers for both the versions and the catch-up tag.
  • With latest present, it's still one call per registry.

No version bump: bin/be doesn't change.

Tested

npm run lint passes. Locally, the script ran against a stubbed npm that answers like the real one (nothing for a bare name without latest, "No match found" for a missing version):

  • no latest in GitHub Packages, with stage lacking everything
  • stage has the package without latest, plus a leftover catch-up tag
  • the normal case, latest everywhere

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
igorlamos merged commit bf100e0 into dev Oct 8, 2026
4 checks passed
@igorlamos
igorlamos deleted the ci/catch-up-without-latest branch October 8, 2026 17:31
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.

2 participants