Add a changelog and enable Github releases - #188
Open
nikgraf wants to merge 1 commit into
Open
Conversation
The changelog generated by `changeset version` was silently discarded: `build/*/CHANGELOG.md` was covered by the `/build/*/**` gitignore rule and deleted again by the `rm -rf build` at the start of the build script. That is also why no Github releases were ever created — changesets/action reads `<pkg.dir>/CHANGELOG.md` and returns silently when the file is missing. - un-ignore `/build/*/CHANGELOG.md` and preserve both changelogs across the build, so they are committed and shipped to npm - mirror the ristretto changelog to a root CHANGELOG.md via `bin/sync-changelog.js`, wired into the `changeset-version` script - use @changesets/changelog-github for PR links and author attribution - mark the two packages as `fixed` in the changesets config; the build already forces the p256 version to match ristretto - backfill the changelog for all released versions. Entries from 0.8.1 onwards are the original changeset texts recovered from git history, earlier ones are reconstructed and marked as such Closes #185
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.
Closes #185
Why
The changelog generated by
changeset versionwas silently discarded, so there is noCHANGELOG.mdanywhere, none in the npm tarballs, and zero Github releases despite 15 published versions:changeset versionwritesbuild/ristretto/CHANGELOG.mdandbuild/p256/CHANGELOG.md, but.gitignorehas/build/*/**with only!/build/*/package.jsonun-ignored — the changelogs were never committed.bin/build.jsstarts withsh.rm("-rf", "build"), so even a locally generated changelog was destroyed beforechangeset publishran.changesets/actiondefaultscreate-github-releases: true, but itscreateRelease()reads<pkg.dir>/CHANGELOG.mdand returns silently onENOENT— no changelog file, no release, no error.Changesets is the right tool here, its output was just being thrown away. No workflow change is needed for the releases to start appearing.
What changed
.gitignore— un-ignore/build/*/CHANGELOG.md.bin/build.js— read both changelogs at module scope (before therm -rf build) and restore them afterwards, mirroring howbuild/ristretto/package.jsonis already handled. Also addsCHANGELOG.mdto the generatedfilesarray so it ships to npm.bin/sync-changelog.js(new) — mirrors the ristretto changelog to a rootCHANGELOG.md. Wired into thechangeset-versionscript so it lands in theVersion PackagesPR..changeset/config.json— switched to@changesets/changelog-githubfor PR links, commit links and author attribution, and marked the two packages asfixed. Thefixedentry matters becausebin/build.jsinterpolates ristretto's version into both generatedpackage.jsonfiles; without it a changeset touching only one package would silently diverge.Version Packagescommit), with PR/commit links and author credit added. 0.1.0–0.8.0 predates changesets and is reconstructed from the git history, marked as such in the file.CONTRIBUTING.mdgains a Changelog section, and itsversionlink now points atbump-version.ymlinstead ofrelease.yml.pnpm installstep in both release workflows.Verification
pnpm buildno longer destroys the changelogs, andnpm pack --dry-runinbuild/ristrettonow listsCHANGELOG.md.pnpm changeset-versionwith a real token: both packages bumped to 1.1.1 in lockstep, the pending changeset rendered with its PR link and author credit, the root mirror updated and the backfilled history preserved below it. State was restored afterwards.pnpm format,prettier --check .andpnpm test(47 tests against both curves) pass.Follow-up, not in this PR
Cargo.tomlis at1.0.0while npm is at1.1.0— the Rust version is bumped manually and has drifted. The crate is not published to crates.io so it is cosmetic today.