fix(publish): take the next free beta when the computed one is already on npm #47

Merged
crapougnax merged 1 commit from fix/46-publish-next-free-beta into develop 2026-11-15 16:58:09 +00:00
Member

Problem

bin/publish_all.js computes the next beta from the version in the repository. When an earlier run published that version and its bump never reached the repository (#40), the next run computes the same version, finds it on npm, skips the publication and reports a success.

Result today: @quatrain/backend-postgres@1.2.14-beta.0 on npm dates from 2026-11-14 08:34 UTC. It holds neither the unique properties (#33) nor the row isolation (#44).

Change

  • bin/betaVersion.js: nextFreeBetaVersion(candidate, publishedVersions) returns the candidate when it is free, otherwise the next free beta counter of the same base version.
  • bin/publish_all.js lists the versions on npmjs before a beta release and uses it. A registry failure other than an unknown package stops the release instead of publishing blind.

Stable releases are unchanged.

Effect on the next run on develop

Packages whose code changed since their last published beta get a new one: backend-postgres becomes 1.2.14-beta.1.

As long as #40 is open, hashes and bumps still do not reach the repository, so every run on develop publishes one more beta of each changed package. That is noise on npm, but each beta holds the current code.

Checks

  • Helper checked by hand: free candidate, taken candidate, gap in counters, other base version, non-beta input.
  • The npm lookup was run against the registry for an existing and an unknown package.
  • The script has no automated test in this repository; the publish step itself only runs on develop and main.

Closes #46

🤖 Generated with Claude Code

## Problem `bin/publish_all.js` computes the next beta from the version in the repository. When an earlier run published that version and its bump never reached the repository (#40), the next run computes the same version, finds it on npm, skips the publication and reports a success. Result today: `@quatrain/backend-postgres@1.2.14-beta.0` on npm dates from 2026-11-14 08:34 UTC. It holds neither the unique properties (#33) nor the row isolation (#44). ## Change - `bin/betaVersion.js`: `nextFreeBetaVersion(candidate, publishedVersions)` returns the candidate when it is free, otherwise the next free beta counter of the same base version. - `bin/publish_all.js` lists the versions on npmjs before a beta release and uses it. A registry failure other than an unknown package stops the release instead of publishing blind. Stable releases are unchanged. ## Effect on the next run on `develop` Packages whose code changed since their last published beta get a new one: `backend-postgres` becomes `1.2.14-beta.1`. **As long as #40 is open**, hashes and bumps still do not reach the repository, so every run on `develop` publishes one more beta of each changed package. That is noise on npm, but each beta holds the current code. ## Checks - Helper checked by hand: free candidate, taken candidate, gap in counters, other base version, non-beta input. - The npm lookup was run against the registry for an existing and an unknown package. - The script has no automated test in this repository; the publish step itself only runs on `develop` and `main`. Closes #46 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(publish): take the next free beta when the computed one is already on npm (#46)
All checks were successful
Quatrain Core CI / Monorepo Build, Tests & Quality Audit (pull_request) Successful in 2m47s
Quatrain Core CI / Publish Changed Packages to npm (pull_request) Has been skipped
5289cbffa8
The publish script computes the next beta from the version in the
repository. When an earlier run published that version without its
bump reaching the repository, the next run computed it again, found it
on npm and skipped the publication while reporting a success: changed
code never reached npm.

The script now lists the published versions and takes the next free
beta counter. A registry failure other than an unknown package stops
the release.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
crapougnax merged commit 6a31f2f7ea into develop 2026-11-15 16:58:09 +00:00
crapougnax deleted branch fix/46-publish-next-free-beta 2026-11-15 16:58:09 +00:00
Sign in to join this conversation.
No description provided.