ADR-005: Stable releases on latest, prereleases on next
- Status: Accepted — supersedes the dist-tag rule of ADR-004; the rest of ADR-004 stands
- Date: 2026-10-15
- Evidence: npm dist-tags on 2026-10-15 (
latest→0.1.0,next→0.2.1/0.2.0),pnpm release:sync-dist-tags:dry-run,tools/release/lib/dist-tags.test.ts
Context
ADR-004 published every release under next and never moved latest. npm assigns latest to a
package's first version, so latest stayed at 0.1.0 while 0.2.x shipped on next. The
consequences were the opposite of the intent:
npm install @strata-sc/core(no tag) installed the oldest release;- npmjs.com showed
0.1.0and "published 20 days ago", so the project looked unmaintained and releases looked broken; - the release gates had to special-case npm's own first-release
latestassignment.
Pre-1.0 instability is already expressed by the 0.x version: semver ranges (^0.2.0) never
cross a minor in 0.x. A dist-tag does not need to say it a second time.
Decision
- A stable version (
x.y.z,0.xincluded) is published onlatest. - A prerelease (
x.y.z-next.N, from Changesets pre mode:pnpm changeset pre enter next) is published onnext.latestis untouched. nextis never left behindlatest: after a stable release,nextmoves up to it when it exists and is older.@nexttherefore always installs the newest build.- No tag ever moves backwards.
- The policy is code (
tools/release/lib/dist-tags.ts).release.ymlrunschangeset publish(no--tag), thenpnpm release:sync-dist-tags, which applies the policy idempotently with the existingNPM_TOKENand verifies the result. The first run after this ADR promotes the0.2.xreleases tolatest.
Consequences
- Plain installs get the current release. Docs install without a tag.
- Users who pinned
@nextkeep receiving every release, stable or prerelease. - Release candidates for 1.0 (
changeset pre enter next→1.0.0-next.N) can be tried onnextwithout affectinglatest;changeset pre exitthen releases1.0.0onlatest. - The registry consumer no longer asserts dist-tags; it qualifies the artifact by exact version. Dist-tag policy is enforced by the sync step, which fails the release workflow if it cannot apply it.
Reopening trigger
A move to npm trusted publishing (dist-tag edits then need their own credential path), or a decision to keep a separate long-lived prerelease line.