Snapshot releases for private packages#133
Open
theoephraim wants to merge 3 commits into
Open
Conversation
Implements `bumpy publish --snapshot <name>` and `bumpy ci release --snapshot <name>`: transient preview publishes that compute the pending release plan, derive a unique prerelease version per package, publish to a non-`latest` dist-tag, and restore the working tree — without consuming bump files, writing changelogs, committing, tagging, or creating GitHub releases. The private-registry counterpart to pkg.pr.new. Closes #126
|
The changes in this PR will be included in the next version bump.
|
The prereleases doc was already long; move the snapshot releases and
pkg.pr.new sections into a dedicated docs/snapshots.md ("Snapshots & PR
previews"), revert prereleases.md to channel-focused, and cross-link
between them. Repointed cli.md/configuration.md snapshot links.
Snapshots (and normal publish) already work for packages published to a private registry — scoped + access:restricted/registry, without "private": true. Make that the documented path and spell out that "private": true is npm's never-publish marker, which bumpy mirrors: privatePackages only controls versioning/tagging, never publishing. Adds a "Publishing to a private registry" section to snapshots.md and a "Private packages and private registries" note to configuration.md.
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 #126.
Adds snapshot releases — transient, one-off preview publishes for private packages. This is the private-registry counterpart to pkg.pr.new, which can't serve private packages because it publishes to its own public storage. Anyone shipping private packages already has a registry, so snapshots just publish the pending release to it under a throwaway dist-tag.
What it does
Computes the pending release plan → derives a unique prerelease version per package → exact-pins in-plan internal deps → writes versions into the working tree → publishes to a non-
latestdist-tag (default: the snapshot name) → restores the tree.It never consumes bump files, writes changelogs, commits, creates git tags, or makes GitHub releases. Built on the existing channel transient-rewrite machinery (
writeTransientVersionsInPlace, renamed fromwriteChannelVersionsInPlacesince both flows share it).Design notes
--snapshotand--channelare mutually exclusive — distinct release models.snapshot.versionStrategy):"sha"(default — idempotent per commit, so re-runs on the same commit skip) or"timestamp". Consumers install via the dist-tag regardless, so the version string is just an implementation detail.Docs
## Snapshot releasesand## pkg.pr.new (public packages)sections indocs/prereleases.md(page retitled "Prereleases & Snapshots"), the latter with the GitHub-App install step + an example workflow.docs/cli.mdanddocs/configuration.md.Tests
21 new unit tests for name sanitization, version derivation, idempotency-skip, and plan building. Full suite green (374 pass), typecheck + lint clean.
Verified end-to-end in a scratch repo: mutual-exclusion error, strict no-op with no bump files, and a dry-run producing
@smoke/a@1.1.0-pr-1-160d074on@pr-1with no tag/commit.