Skip to content

ci(release): add an alpha (pre-release) dist-tag lane#261

Merged
avanelsas merged 1 commit into
mainfrom
chore/alpha-release-lane
Jun 3, 2026
Merged

ci(release): add an alpha (pre-release) dist-tag lane#261
avanelsas merged 1 commit into
mainfrom
chore/alpha-release-lane

Conversation

@avanelsas

Copy link
Copy Markdown
Owner

What

Adds a pre-release dist-tag lane to release.yml so experimental work can ship on the npm alpha tag without moving latest. This is the one infrastructure gap the write-side alpha audit flagged: today npm publish (no --tag) would point latest at any version published, so tagging v4.0.0-alpha.0 would push the unstable write-side elements to every stable consumer.

How

The dist-tag is derived from the version in the "Derive version from tag" step:

  • any semver pre-release identifier (4.0.0-alpha.0alpha, 4.0.0-rc.1rc) → that tag;
  • a plain X.Y.Z (no identifier) → latest.

Four small, version-aware edits:

Step Change
Derive version from tag also emit dist_tag + prerelease outputs
Publish to NPM npm publish --access public --tag "$dist_tag"
Build and Publish to Clojars if: prerelease == 'false' — skip for pre-releases (npm/ESM-only; also avoids re-deploying an unbumped jar)
Create GitHub Release prerelease: <bool>

Stable releases are unchanged

A plain vX.Y.Z yields dist_tag=latest, prerelease=false → npm latest + Clojars + a normal GitHub release, byte-for-byte as before. Verified the derivation locally:

3.5.0          -> dist_tag=latest prerelease=false
3.3.0          -> dist_tag=latest prerelease=false
4.0.0-alpha.0  -> dist_tag=alpha  prerelease=true
4.0.0-rc.1     -> dist_tag=rc     prerelease=true

Scope / sequencing

This PR is generic infrastructure only — it lands on main. The actual alpha publish (version bump to 4.0.0-alpha.N, tag, npm publish) happens later on the feature branch (feat/barebuild-write-side), which will merge main first so the tagged commit carries this logic. docs/RELEASING.md gains an "Alpha (pre-release) releases" section documenting the procedure. No package.json/version changes here.

Valid YAML confirmed (js-yaml).

🤖 Generated with Claude Code

Derive the npm dist-tag from the version in release.yml so a pre-release version
(X.Y.Z-alpha.N) publishes to the `alpha` dist-tag instead of moving `latest`. This
is what lets the write-side alpha elements (barebuild-action / barebuild-invalidate-on)
ship for opt-in (`npm install @vanelsas/baredom@alpha`) without pushing unstable code
to every stable consumer.

- "Derive version from tag": compute dist_tag (any semver pre-release identifier →
  that identifier, e.g. alpha/rc; no identifier → latest) and prerelease (bool).
- Publish to NPM: `npm publish --tag "$dist_tag"`.
- Clojars deploy: skipped for pre-releases (npm/ESM-only; also avoids re-deploying an
  unbumped jar version).
- GitHub Release: marked prerelease for pre-release versions.

STABLE releases are byte-for-byte unchanged: a plain X.Y.Z yields dist_tag=latest,
prerelease=false → npm `latest` + Clojars + normal release, exactly as before.
Generic infrastructure, so it lands on main; the alpha version bump + tag happen on
the feature branch (see docs/RELEASING.md → "Alpha (pre-release) releases").

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@avanelsas avanelsas merged commit ac00789 into main Jun 3, 2026
2 checks passed
@avanelsas avanelsas deleted the chore/alpha-release-lane branch June 3, 2026 14:36
avanelsas added a commit that referenced this pull request Jun 10, 2026
Retire BareBuild entirely from the BareDOM repo. Removes the read-side
orchestration elements (barebuild-router / barebuild-route / barebuild-data),
the BareBuild CLI generator + project template, the Phase-4 demo app, all
BareBuild docs, and reverts the alpha (pre-release) dist-tag CI lane (#261).

Removed merged work: #252, #253, #256, #258, #259, #260, #261.
Preserved: #257 (unrelated x-form/x-select fix) and #263 (x-select .value),
which only happened to land in the same window.

The seam was clean (CI-enforced via the now-removed
scripts/check-barebuild-boundary.bb): no non-BareBuild component imported any
BareBuild code, so this is deletion + reference-block edits only.

Reference edits:
- registry.cljs / core.cljs: drop barebuild-registers
- shadow-cljs.edn / package.json: drop the barebuild-* ESM modules + exports
- public/index.html / README.md / docs/components.md: drop the Orchestration
  category (now empty)
- scripts/generate_types.bb / metadata.bb: type only x-* again
- .github/workflows/ci.yml: drop the boundary check + demo-app E2E job
- .github/workflows/release.yml + docs/RELEASING.md: revert the #261 alpha lane
- custom-elements.json: regenerated (no barebuild entries)
- CLAUDE.md / src/baredom/utils/dom.cljs: scrub barebuild from inline examples

Verified: clj-kondo 0/0, release lib 0 warnings, compile test 0 warnings,
npm test 5096 passing, require-style / du-discipline / method-api / bundle-size
guards all green.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

1 participant