Skip to content

feat: keep a package's earlier versions for StableBar releases that can't run the newest - #54

Merged
M4n0x merged 1 commit into
mainfrom
feat/index-version-per-requirement
Nov 17, 2026
Merged

M4n0x merged 1 commit into
mainfrom
feat/index-version-per-requirement

Conversation

@M4n0x

@M4n0x M4n0x commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

Package

No package. This changes how the index is published: a package whose newest version needs a newer StableBar than someone runs stays offered to them in a version they can run. Closes #53.

Changes

  • scripts/build-index.sh keeps, for each package, the newest version for each minimumVersion, carried over from the previous index (their archives are already on the store release, with their checksums), and lists them oldest requirement first. A version that another needing no newer StableBar outranks leaves the index, and a retired package's versions leave with it.
  • Requirements and versions compare as Semantic Versioning orders them: 0.9.0 before 0.10.0, 0.10.0-beta.… before 0.10.0.
  • Why the order: every released StableBar (checked in v0.15.0, v0.16.0 and v0.17.0) keeps the first entry it reads for an ID (seen.insert(entry.id).inserted in PackageIndex.load). StableBar 0.17.0 therefore keeps getting Fern 1.2.1 once Fern 1.3.0 (feat: let Fern fill its pills without a group on each widget #48, needs a 0.18.0 beta) is published. Offer each StableBar the newest Store version it can run StableBar#775 makes later builds pick the newest entry they can run, instead of the first.
  • CONTRIBUTING.md and AGENTS.md: a version needing a newer StableBar can be published without waiting for that release.

Until a StableBar with #775 is out, builds that could run the newest version also take the first entry, so they get the previous version. That's what the Store offers today until the release.

Testing

  • scripts/test.sh: 60 passed. 7 new index cases: the previous version stays listed first, a same-requirement version replaces it, requirements compare as versions (0.9.0/0.10.0) and a beta before its release, a lower requirement drops what it outranks, each requirement keeps its newest version, and a retired package leaves the index. 4 of them failed before the change.
  • shellcheck on both scripts.
  • A dry run of build-index.sh with the live index.json as the previous index and Fern 1.3.0 from feat: let Fern fill its pills without a group on each widget #48 in packages/:
    fern 1.2.1 min=- sha=843dc56a
    fern 1.3.0 min=0.18.0 sha=a403dc61
    
    Every other entry and the suggestions are identical to the live index, and the only new archive is fern-1.3.0.tar.gz.

Not checked: StableBar 0.17.0 reading such an index end to end. Private sources accept only https, so it needs a hosted index. The behavior is read from PackageIndex.load in v0.17.0.

Claude Opus 5.5 via Claude Code

…an't run the newest

The index listed one version of each package, so a version needing a newer StableBar than the
latest release was offered to everyone on that release, who then got "needs StableBar X or later".

Each package now lists its newest version for each minimumVersion, carried over from the previous
index, oldest requirement first. StableBar 0.17 and earlier keep the first entry for an ID, so they
keep a version they can run. A version that another needing no newer StableBar outranks leaves the
index. Requirements compare as Semantic Versioning orders them: 0.9.0 before 0.10.0, a beta before
its release.

Closes #53
@M4n0x
M4n0x requested a review from Seb-GRAF as a code owner November 17, 2026 09:58
@M4n0x
M4n0x merged commit aaffe36 into main Nov 17, 2026
3 checks passed
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.

Keep a package's older versions in the index for StableBar releases that can't run the newest

1 participant