Relationships
#1272 swamp extension version crashes with 'Invalid CalVer version: "null"' when only a prerelease (beta/rc) version is published
Opened by kneel · 7/19/2026· Shipped 7/19/2026
Summary
swamp extension version throws Invalid CalVer version: "null" for an extension that has a prerelease version published (e.g. on the beta channel) but no stable version. It appears to feed the null stable latest-version straight into the CalVer parser instead of handling the no-stable case (falling back to the latest prerelease, or computing next from today's date).
Steps to reproduce
- Publish an extension only to a prerelease channel:
swamp extension push <manifest> --channel beta --yes(so the registry haslatestBetaset butlatestVersion/stable = null) - Ask for the next version:
swamp extension version --manifest <manifest> --json
Actual
{
"error": "Failed to look up version for @shrug/mercury: Invalid CalVer version: \"null\". Expected format [HOST-1] (e.g., \"2025.01.15.1\")"
}swamp extension info @shrug/mercury --json confirms the state: "latestVersion": null, "latestBeta": "2026.07.18.3", "latestRc": null.
Earlier, before any publish (currentPublished null AND no prerelease), the same command returned a valid { currentPublished: null, nextVersion: "2026.07.19.1" } — so the null-stable case is only mishandled once a prerelease exists.
Expected
nextVersion should be computed even when only a prerelease exists — e.g. from the latest prerelease version and/or today's date — rather than passing the literal null stable version to the CalVer parser. At minimum, treat a null stable latestVersion as "no stable baseline" (as it already does when nothing is published at all).
Impact
Blocks the documented State 5 (versioned) publish-flow helper for any extension that follows the recommended beta→rc→stable promotion path: after a first beta publish you can no longer use swamp extension version to compute the next version. Workaround: bump the manifest version by hand.
Environment
- swamp 20260716.194319.0-sha.df9fc306
- Linux
- First surfaced with local extensions @shrug/{mercury,invoiceninja,bank-import} published to the
betachannel.
Shipped
Click a lifecycle step above to view its details.