Skip to content

Release tooling: pre mode beta; restart the prerelease counter at 0 on a tag switch - #215

Merged
securedeveloper merged 1 commit into
mainfrom
rde-pre-beta
Nov 17, 2026
Merged

securedeveloper merged 1 commit into
mainfrom
rde-pre-beta

Conversation

@securedeveloper

Copy link
Copy Markdown
Owner

Prepares the switch from alpha to beta prereleases, following javascript-excel's JSE-26 (javascript-excel #114). This PR changes no versions and publishes nothing.

Changes

  • .changeset/pre.json: "tag": "alpha" → "beta". Nothing else changes.

  • scripts/reset-pre-counter.mjs and scripts/reset-pre-counter.test.mjs are copied byte for byte from javascript-excel main:

    • script SHA-1 5a43f2a49dcd0515463be535c0bcac169dc8131e;
    • test SHA-1 17107d05b0a79d2d2c47aa43650c710accf88a33.

    The release-script unit tests in CI (node --test "scripts/*.test.mjs") pick the test up: 75/75 pass.

  • version-packages = changeset version && node scripts/reset-pre-counter.mjs --package packages/react-data-export && sync-version … && npm install --package-lock-only. This is the same order as in javascript-excel.

  • RELEASING.md:

    • §2 mentions the new step.
    • §3 is rewritten to match javascript-excel's: the Changesets 3 pre format and .changeset/pre/, entering pre mode, switching the tag, and exiting for 1.0.0, with the dry-run results.

Why the script

Changesets 3 keeps counting across a tag switch. Verified locally: with "beta", changeset version alone turns 1.0.0-alpha.3 into 1.0.0-beta.4. The script restarts the number at 0 when the tag changes.

Dry runs (local, not committed)

  • Beta: this branch, plus one patch changeset, then npm run version-packages. The result is 1.0.0-beta.0 in all of these:

    • packages/react-data-export/package.json;
    • CHANGELOG.md (## 1.0.0-beta.0);
    • the version constant in src/index.ts;
    • the playground's dependency on the package;
    • package-lock.json.

    The changeset moved to .changeset/pre/.

  • Exit: npx changeset pre exit, plus one patch changeset, then npm run version-packages.

    • The result is 1.0.0 (the constant too).
    • pre.json and the 8 files in .changeset/pre/ are deleted.
    • All 9 entries land in ## 1.0.0.

No changeset: this changes the release tooling and docs only.

securedeveloper added a commit that referenced this pull request Nov 17, 2026
Without document properties, docProps/core.xml holds the time of each
write, so the byte comparison of the table golden files failed whenever
the two writes fell in different seconds (seen on #215: Node 24 / React 19
and Node 26 / React 17). Write both sides with fixed created/modified dates,
as the corpus files already are.
Set the pre-mode tag in .changeset/pre.json to "beta", so the next release
is 1.0.0-beta.0 on the next dist-tag. There's no version bump here.

Changesets 3 numbers prereleases from the current version and keeps
counting across a tag switch (alpha.3 -> beta.4). Add
scripts/reset-pre-counter.mjs and its test, copied verbatim from
javascript-excel. version-packages runs the script 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.

RELEASING.md documents entering pre mode, switching the tag and exiting
it, with dry runs for 1.0.0-beta.0 and 1.0.0.
@securedeveloper
securedeveloper merged commit 0eda74e into main Nov 17, 2026
38 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