Skip to content

JSE-26: switch pre mode to beta; restart the prerelease counter at 0 - #114

Merged
securedeveloper merged 1 commit into
mainfrom
jse-26-beta-switch
Nov 17, 2026
Merged

securedeveloper merged 1 commit into
mainfrom
jse-26-beta-switch

Conversation

@securedeveloper

Copy link
Copy Markdown
Owner

Prepares the switch from alpha to beta prereleases. No version bump: merging publishes nothing (the release check sees an unchanged version). The release itself is a separate pull request.

Changes

  • .changeset/pre.json: tag "alpha" → "beta". The next release on next is 2.0.0-beta.0.
  • scripts/reset-pre-counter.mjs (+ tests), run by npm run version-packages right after changeset version. Changesets 3 numbers prereleases from the current version (prerelease[1] + 1) and keeps counting across a tag switch, so by itself changeset version turns 2.0.0-alpha.7 into 2.0.0-beta.8. When the prerelease tag differs from the version committed at HEAD, the script rewrites -<tag>.N to -<tag>.0 in the changed package.json files (the package and the workspaces that depend on it) and in the CHANGELOG.md heading. The VERSION sync and the lockfile update run after it. Same-tag releases, a first prerelease and a final version are untouched, and a second run does nothing. Node built-ins and git only, written so the other spreadsheet-family repos can copy it unchanged.
  • RELEASING.md §3: the pre-mode format (pre.json + .changeset/pre/ is Changesets 3's own), how to switch tags, and how pre exit gives 2.0.0.

Dry runs (local, not pushed)

On this branch, with one throwaway patch changeset:

  • npm run version-packages → 2.0.0-beta.0 in packages/javascript-excel/package.json, ## 2.0.0-beta.0 in CHANGELOG.md, VERSION = "2.0.0-beta.0", the playground and examples dependencies, and package-lock.json. No beta.8 anywhere.
  • A second changeset + version-packages → 2.0.0-beta.1 (counter left alone).
  • npx changeset pre exit + version-packages → 2.0.0. pre.json and all of .changeset/pre/ are deleted, and every changeset since alpha.0 is in one ## 2.0.0 section (under "Minor Changes", so the stable release needs a short hand-written summary of what breaks from 1.x).

Checks

  • node --test "scripts/*.test.mjs": 75 pass (15 new).

Set the pre-mode tag in .changeset/pre.json to "beta", so the next
release is 2.0.0-beta.0 on the next dist-tag. No version bump here.

Changesets 3 numbers prereleases from the current version and keeps
counting across a tag switch (alpha.7 -> beta.8). Add
scripts/reset-pre-counter.mjs, run by version-packages right after
changeset version: when the prerelease tag differs from the version
committed at HEAD, it rewrites -<tag>.N to -<tag>.0 in the changed
package.json files and the CHANGELOG heading; the VERSION sync and the
lockfile update follow. Same-tag releases, first prereleases and final
versions are untouched. Unit-tested with the other release scripts.

RELEASING.md documents the tag switch and how pre exit gives 2.0.0.
@securedeveloper
securedeveloper merged commit 1f8d1e2 into main Nov 17, 2026
9 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.

1 participant