Repository navigation
add release:publish and count an upload npm failed but the registry has - #461
Merged
Merged
Conversation
`bun run release:publish` runs a release from a clean checkout of its merge commit in one command: an install without lifecycle scripts, so the docs site's optional `sharp` cannot fail it with a native build, the build, the publish dry run and the publish, each attached to the terminal for npm's second factor. Once the registry has every package of the build it creates the `v<version>` tag on HEAD and pushes it, keeping a tag already there and refusing one that names another commit. `verify:packages`, which CI already runs on the merge commit, is opt-in with `--verify`; `--dry-run` stops before the upload. `publish:packages --publish` no longer stops when npm fails an upload that went through, as with E409 "Cannot publish over previously staged version" after a retried request: it asks the registry for that version for up to about a minute, which also waits out the CDN's 404s, and counts it as published when it is there. The decisions (`confirmation`, `releaseSteps`, `tagPlan`, `notCleanTree`) are pure functions in `publish-plan.ts`; the registry reads moved to `npm-registry.ts`. The release skill and the publishing guide describe the one command and these traps.
Keep the native memory and retrieval packages alongside the release publishing helper. Check release tags and registry commit metadata before uploads, carry the captured build commit into every package manifest, and preserve the final tag check so interrupted releases resume only from their original source. Retain both sets of changelog entries and cover the release preflight with isolated command and registry fixtures.
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.
What
bun run release:publishto install locked dependencies, build all packages, run the publishing dry run, publish in dependency order, confirm the registry has every package, and push the release tag that deploys the docs. Interactive npm authentication is preserved.--verifyfor packed Node/Bun validation and--dry-runto stop before publication and tagging.gitHeadso partial releases resume from their original source.Checks
bun test scripts: 89 pass, 0 fail.