Repository navigation
JSE-26: switch pre mode to beta; restart the prerelease counter at 0 - #114
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 onnextis2.0.0-beta.0.scripts/reset-pre-counter.mjs(+ tests), run bynpm run version-packagesright afterchangeset version. Changesets 3 numbers prereleases from the current version (prerelease[1] + 1) and keeps counting across a tag switch, so by itselfchangeset versionturns2.0.0-alpha.7into2.0.0-beta.8. When the prerelease tag differs from the version committed atHEAD, the script rewrites-<tag>.Nto-<tag>.0in the changedpackage.jsonfiles (the package and the workspaces that depend on it) and in theCHANGELOG.mdheading. TheVERSIONsync 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 howpre exitgives 2.0.0.Dry runs (local, not pushed)
On this branch, with one throwaway patch changeset:
npm run version-packages→2.0.0-beta.0inpackages/javascript-excel/package.json,## 2.0.0-beta.0in CHANGELOG.md,VERSION = "2.0.0-beta.0", the playground and examples dependencies, andpackage-lock.json. Nobeta.8anywhere.version-packages→2.0.0-beta.1(counter left alone).npx changeset pre exit+version-packages→2.0.0.pre.jsonand all of.changeset/pre/are deleted, and every changeset since alpha.0 is in one## 2.0.0section (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).