Publish stable releases from master to the latest dist-tag#68
Open
patocallaghan wants to merge 5 commits into
Open
Publish stable releases from master to the latest dist-tag#68patocallaghan wants to merge 5 commits into
latest dist-tag#68patocallaghan wants to merge 5 commits into
Conversation
The experiment hardcoded `npm stage publish --tag next` to keep `latest` on 1.0.2 untouched. For real releases the dist-tag should follow the release type: stable releases go to `latest` (npm's default), prereleases go to `next`. Use the same prerelease definition as the release-source guard (semver hyphen) so the two stay consistent. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… path The experiment exercised the prerelease flow (`--tag next`, cut off-branch), but the shippable reference only needs the stable path: publish from reviewed master to the default `latest` dist-tag. Remove the dist-tag case statement and the source guard's prerelease exemption, so every release must be reachable from master and lands on `latest`. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
latest dist-tag
Review nits: guard `git fetch origin master` so a transient fetch failure exits with an explicit message rather than relying on the implicit `--is-ancestor` non-zero exit, and collapse the redundant comment pair. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.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.
Why?
Put the staged-publish workflow into its real shippable state. A package that ships stable releases from
masteronly needs the one path: publish reviewed master code to the defaultlatestdist-tag. The prerelease/nextflow is an advanced, opt-in capability this package doesn't use, so it shouldn't be baked into the reference workflow.How?
npm stage publishnow runs with no--tag(defaults tolatest), and the release-source guard refuses any release not reachable frommaster(the prerelease exemption is removed, so the guard applies to every release).Generated with Claude Code