Repository navigation
fix(release): check the npm login before releasing; point reruns at release:publish - #26
Merged
Merged
Conversation
…t release:publish pnpm release only publishes to npm after release-it has pushed the commit and tag, so a missing npm login was found too late, and rerunning pnpm release then failed on the empty Unreleased section. Check npm whoami (and whether HEAD is already the release) before release-it starts, also for release:dry, and say that pnpm release:publish finishes a half-done release. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Christian Catalan <crcatala@gmail.com>
…lish recovery Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Christian Catalan <crcatala@gmail.com>
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.
Summary
pnpm releaseonly publishes to npm after release-it has bumped, tagged and pushed, so a missing npm login was discovered too late (this happened on v0.0.2). Rerunningpnpm releasethen failed with "CHANGELOG.md has no unreleased user-facing entries", which hid the actual fix (pnpm release:publish).Changes
releaseProblems()inscripts/release-lib.mjs, checked byrelease.mjs releasebefore release-it starts:npm loginfirst"HEADalready tagged with the current version (a half-finished release) → refuse, "runpnpm release:publish"release:drynow goes throughrelease.mjs release --dry-run, so the dry run catches a missing login toopnpm releasethey say the commit and tag are already pushed and onlypnpm release:publishis leftRELEASING.md: prerequisites, step 1 and the recovery section updatedTesting
releaseProblems(logged in, no login, rerun at a taggedHEAD);pnpm verifypasses (482 tests)pnpm release:dryat the v0.0.2 commit →HEAD is already the v0.0.2 release ... run \pnpm release:publish``release.mjs release --dry-runon an untagged commit →You are not logged in to npm: run \npm login` first` (before release-it runs)release.mjs publish→ lists the problems, thenFix this, then run \pnpm release:publish` again.`🤖 Generated with Claude Code