chore: drop the release script and document the flow that exists - #19
Merged
Conversation
`scripts/prepare-release.ts` could not perform a release in this repository. It checked out and branched from `main`, which tracks the upstream project — the release branch is `publish`, and it is the repository default. Running it moved the working tree to an unrelated branch and opened its PR against that branch. Delete it rather than repoint it: the flow it wrapped is three commands and one workflow dispatch, and the wrapper added a failure mode of its own by pushing the release tag before the PR merged, so any fixup commit needed a force-moved tag to stay in the release. `scripts/lib/semver.ts` had no other caller and goes with it. The release section of `docs/DEVELOPMENT.md` described that script step by step, so it is rewritten to describe the actual flow: version and changelog in a PR against `publish`, tag the merge commit, run the Publish workflow from the tag. It also referenced a chat channel inherited from upstream that does not exist here, and omitted the `npm_tag` input and the promotion command that goes with a staged release. Also removes the `release` entry from `package.json` scripts.
Merged
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.
scripts/prepare-release.tscould not perform a release in this repository, so it is removed rather than repointed.Why it could not work
It ran
git checkout mainandgit pull origin main, then branched from there and opened its PR with--base main.maintracks the upstream project; the release branch ispublish, which is also the repository default. Running the script moved the working tree onto an unrelated branch and targeted its PR there.Why delete instead of fix
What it wrapped is three commands and one workflow dispatch. The wrapper also introduced a failure mode of its own: it pushed the release tag before the PR was merged, so any fixup commit on the release branch required a force-moved tag to stay in the release — the script printed a warning about exactly that.
What changed
scripts/prepare-release.ts.scripts/lib/semver.tsand its spec — no other caller (scripts/lib/changelog.tsandscripts/lib/git.tsare kept;scripts/generate-changelog.tsstill uses them).releaseentry frompackage.jsonscripts.docs/DEVELOPMENT.md, which documented the script step by step. It now describes the flow that exists: version + changelog in a PR againstpublish, tag the merge commit, run the Publish workflow from the tag. The rewrite also drops a chat-channel reference inherited from upstream that does not exist here, and adds thenpm_taginput and thenpm dist-tag addpromotion command, which were missing.Verification
yarn typecheck— cleanyarn test:unit— 36 files pass (37 before; the drop is the deletedsemver.spec.ts)yarn format:check— cleanprepare-release,yarn release,lib/semver,bumpVersion— no remaining referencesFollow-up, not in this PR
scripts/generate-changelog.tshas no entry point either — not inpackage.json,scripts/cli, or any workflow. Left alone here since it is a separate question from the broken release script.