Skip to content

Commit 4748f27

Browse files
authored
Merge pull request #39 from dmno-dev/chore/readme-and-docs-cleanup
README and docs cleanup for npm publishing
2 parents 9e11510 + dfd6e6a commit 4748f27

7 files changed

Lines changed: 51 additions & 745 deletions

File tree

.bumpy/readme-and-docs-cleanup.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
'@varlock/bumpy': patch
3+
---

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232

3333
# 🐸 This is the important part - checks for missing bump files and posts/updates a PR comment with the release plan
3434
# (use --pat-comments if PAT belongs to dedicated bot, rather than person)
35-
- run: bunx @varlock/bumpy ci check --fail-on-missing --pat-comments
35+
- run: bunx @varlock/bumpy ci check --pat-comments
3636
env:
3737
GH_TOKEN: ${{ github.token }}
3838
BUMPY_GH_TOKEN: ${{ secrets.BUMPY_GH_TOKEN }} # <- PAT needed so that release PR will trigger CI

README.md

Lines changed: 43 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<p align="center">
22
<a href="https://bumpy.varlock.dev" target="_blank" rel="noopener noreferrer">
3-
<img src="/images/github-readme-banner.png" alt="Bumpy banner">
3+
<img src="https://raw.githubusercontent.com/dmno-dev/bumpy/refs/heads/main/images/github-readme-banner.png" alt="Bumpy banner">
44
</a>
55
</p>
66
<br/>
77
<p align="center">
88
<a href="https://npmjs.com/package/@varlock/bumpy"><img src="https://img.shields.io/npm/v/@varlock/bumpy.svg" alt="npm package"></a>
9-
<a href="/LICENSE.md"><img src="https://img.shields.io/npm/l/@varlock/bumpy.svg" alt="license"></a>
9+
<a href="https://github.com/dmno-dev/bumpy/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/@varlock/bumpy.svg" alt="license"></a>
1010
<a href="https://github.com/dmno-dev/bumpy/actions/workflows/ci.yaml"><img src="https://img.shields.io/github/actions/workflow/status/dmno-dev/bumpy/ci.yaml?style=flat&logo=github&label=CI" alt="build status"></a>
1111
<a href="https://chat.dmno.dev"><img src="https://img.shields.io/badge/chat-discord-5865F2?style=flat&logo=discord" alt="discord chat"></a>
1212
</p>
@@ -18,7 +18,18 @@ A modern package versioning and changelog generation tool — built for monorepo
1818

1919
## How It Works
2020

21-
Bumpy uses **bump files** (you may know them as "changesets" if coming from that tool) — small markdown files that declare which packages changed and how (patch/minor/major), along with a description that ends up in changelogs. Developers create these files as part of their PRs. As PRs merge to the base branch, a "release PR" is kept up to date showing what packages will be released and their changelogs — including packages bumped automatically due to dependency relationships. When the release PR is merged, bump files are consumed (deleted), and packages are published with updated versions and changelogs.
21+
Bumpy uses **bump files** (you may know them as "changesets" if coming from [that tool 🦋](https://github.com/changesets/changesets)) — small markdown files that declare an intent to release packages with a bump level (patch/minor/major), and a description that ends up in changelogs. Developers create these files as part of their PRs, and these files are then used to consolidate changes, generate changelogs, and trigger publishing. Specifically:
22+
23+
- Devs/agents create bump files as part of their PRs (using `bumpy add` or manually)
24+
- A pre-push git hook can enforce bump files exist for changed packages
25+
- In CI, a workflow checks PRs for bump files, leaves a comment on the PR detailing changed packages
26+
- As PRs merge to the base branch, a "release PR" is kept up to date
27+
- Shows what packages will be released and their changelogs
28+
— Including packages bumped automatically due to dependency relationships
29+
- When release PR is merged, publishing is triggered
30+
- Oending bump files are deleted and packages are published with updated versions and changelogs
31+
32+
All of this is automated via two simple GitHub Actions workflows (see [CI setup](#ci--github-actions) below). You can also run everything locally with `bumpy status`, `bumpy version`, and `bumpy publish`.
2233

2334
### Example bump file
2435

@@ -34,18 +45,10 @@ Added user language preference to the core config.
3445
Fixed locale fallback logic in utils.
3546
```
3647

37-
The typical CI driven workflow is:
38-
39-
1. **`bumpy add`** — developers create bump files as part of their PRs
40-
2. **`bumpy ci check`** — CI comments on each PR with a release plan preview
41-
3. **`bumpy ci release`** — on merge to main, CI opens a "Version Packages" PR that bumps versions and updates changelogs. When that PR is merged, it publishes packages.
42-
43-
All of this is automated via two simple GitHub Actions workflows (see [CI setup](#ci--github-actions) below). You can also run everything locally with `bumpy status`, `bumpy version`, and `bumpy publish`.
44-
4548
## Features
4649

4750
- **All package managers** — npm, pnpm, yarn, and bun workspaces
48-
- **Smart dependency propagation** — configurable rules for how version bumps cascade through your dependency graph (see [version propagation docs](docs/version-propagation.md))
51+
- **Smart dependency propagation** — configurable rules for how version bumps cascade through your dependency graph (see [version propagation docs](https://github.com/dmno-dev/bumpy/blob/main/docs/version-propagation.md))
4952
- **Pack-then-publish** — by default, publishes to npm (resolving `workspace:` and `catalog:` protocols, with OIDC/provenance support). Per-package custom publish commands let you target anything — VSCode extensions, Docker images, JSR, private registries, etc.
5053
- **Flexible package management** — include/exclude any package individually via per-package config, glob patterns, or `privatePackages` setting
5154
- **Non-interactive CLI**`bumpy add` works fully non-interactively for CI/CD and AI-assisted development
@@ -60,25 +63,27 @@ All of this is automated via two simple GitHub Actions workflows (see [CI setup]
6063
# Install
6164
bun add -d @varlock/bumpy # or npm/pnpm/yarn
6265

63-
# Initialize (creates .bumpy/ config directory)
64-
bumpy init
66+
# Initialize (creates .bumpy/ directory and config, migrates from changesets if applicable)
67+
bunx bumpy init
6568

6669
# Create a bump file
67-
bumpy add
70+
bunx bumpy add
6871

6972
# Preview the release plan
70-
bumpy status
73+
bunx bumpy status
7174
```
7275

7376
Then set up CI to automate versioning and publishing (see below).
7477

7578
## CI / GitHub Actions
7679

77-
No separate action to install — just call `bumpy ci` directly in your workflows. Two commands handle the entire release lifecycle:
80+
No separate action to rely on — just call `bumpy ci` directly in your workflows. Two commands handle the entire release lifecycle:
7881

7982
- **`bumpy ci check`** — runs on every PR. Computes the release plan from pending bump files and posts/updates a comment on the PR showing what versions would be released. Warns if any changed packages are missing bump files.
8083
- **`bumpy ci release`** — runs on push to main. If pending bump files exist, it opens (or updates) a "Version Packages" PR that applies all version bumps and changelog updates. If the current push _is_ the Version Packages PR being merged, it publishes the new versions, creates git tags, and creates GitHub releases.
8184

85+
_examples use bun, but works with Node.js_
86+
8287
### PR check workflow
8388

8489
```yaml
@@ -98,6 +103,7 @@ jobs:
98103
- run: bunx @varlock/bumpy ci check
99104
env:
100105
GH_TOKEN: ${{ github.token }}
106+
BUMPY_GH_TOKEN: ${{ secrets.BUMPY_GH_TOKEN }} # additional PAT (optional)
101107
```
102108
103109
### Release workflow
@@ -128,6 +134,7 @@ jobs:
128134
- run: bunx @varlock/bumpy ci release
129135
env:
130136
GH_TOKEN: ${{ github.token }}
137+
BUMPY_GH_TOKEN: ${{ secrets.BUMPY_GH_TOKEN }} # additonal PAT, needed to trigger CI checks on release PR
131138
```
132139
133140
> **Trusted publishing setup:** Configure each package on [npmjs.com](https://docs.npmjs.com/trusted-publishers/) → Package Settings → Trusted Publishers → GitHub Actions. Specify your org/user, repo, and the workflow filename (`bumpy-release.yml`). No `NPM_TOKEN` secret needed. Requires npm >= 11.5.1 — bumpy will warn if your version is too old.
@@ -157,6 +164,7 @@ jobs:
157164
- run: bunx @varlock/bumpy ci release
158165
env:
159166
GH_TOKEN: ${{ github.token }}
167+
BUMPY_GH_TOKEN: ${{ secrets.BUMPY_GH_TOKEN }}
160168
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
161169
```
162170

@@ -166,7 +174,7 @@ You can also use `bumpy ci release --auto-publish` to version + publish directly
166174

167175
### Token setup
168176

169-
The default `github.token` works for basic functionality, but GitHub's anti-recursion guard means PRs created by the default token won't trigger other workflows — so your regular CI (tests, linting, etc.) won't run automatically on the Version Packages PR. To fix this, provide a `BUMPY_GH_TOKEN` secret using either a **fine-grained PAT** or a **GitHub App token**. See the [full token setup guide](docs/github-actions.md#token-setup) for details.
177+
The default `github.token` works for basic functionality, but GitHub's anti-recursion guard means PRs created by the default token won't trigger other workflows — so your regular CI (tests, linting, etc.) won't run automatically on the Version Packages PR. To fix this, provide a `BUMPY_GH_TOKEN` secret using either a **fine-grained PAT** or a **GitHub App token**. See the [full token setup guide](https://github.com/dmno-dev/bumpy/blob/main/docs/github-actions.md#token-setup) for details.
170178

171179
Run `bumpy ci setup` for interactive guidance, or set it up manually:
172180

@@ -206,22 +214,21 @@ The skill teaches the AI to examine git changes, identify affected packages, cho
206214

207215
## Documentation
208216

209-
- [Bump file format](docs/bump-files.md) — syntax, bump levels, cascade control
210-
- [Configuration reference](docs/configuration.md) — all `.bumpy/_config.json` and per-package options
211-
- [CLI reference](docs/cli.md) — every command with flags and examples
212-
- [GitHub Actions setup](docs/github-actions.md) — CI workflows, token setup, trusted publishing
213-
- [Version propagation](docs/version-propagation.md) — how dependency bumps cascade through your graph
214-
- [LLM-friendly reference](./llms.md) — single-file reference optimized for AI tools
217+
- [Bump file format](https://github.com/dmno-dev/bumpy/blob/main/docs/bump-files.md) — syntax, bump levels, cascade control
218+
- [Configuration reference](https://github.com/dmno-dev/bumpy/blob/main/docs/configuration.md) — all `.bumpy/_config.json` and per-package options
219+
- [CLI reference](https://github.com/dmno-dev/bumpy/blob/main/docs/cli.md) — every command with flags and examples
220+
- [GitHub Actions setup](https://github.com/dmno-dev/bumpy/blob/main/docs/github-actions.md) — CI workflows, token setup, trusted publishing
221+
- [Version propagation](https://github.com/dmno-dev/bumpy/blob/main/docs/version-propagation.md) — how dependency bumps cascade through your graph
215222

216223
## Why files instead of conventional commits?
217224

218225
Tools like semantic-release infer version bumps from commit messages (`feat:` → minor, `fix:` → patch). This works for simple projects but breaks down in monorepos — a single PR often touches multiple packages with different bump levels, squash merges lose per-commit metadata, and commit messages are a poor place to write user-facing changelog entries. Bump files are explicit, reviewable in the PR diff, and can describe changes in language meant for consumers rather than developers. If you prefer commit-based workflows, `bumpy generate` can bridge the gap by auto-creating bump files from your branch commits — it works with any commit style, not just conventional commits.
219226

220227
## Why not just use changesets?
221228

222-
Bumpy is built as a successor to [@changesets/changesets](https://github.com/changesets/changesets). Changesets is mature and widely adopted, but has stagnated — hundreds of open issues around core design problems that are unlikely to be fixed without a rewrite. See [differences from changesets](docs/differences-from-changesets.md) for a detailed comparison with links to specific issues. The biggest pain points bumpy addresses:
229+
Bumpy is built as a successor to [@changesets/changesets](https://github.com/changesets/changesets). Changesets is mature and widely adopted, but has stagnated — hundreds of open issues around core design problems that are unlikely to be fixed without a rewrite. See [differences from changesets](https://github.com/dmno-dev/bumpy/blob/main/docs/differences-from-changesets.md) for a detailed comparison with links to specific issues. The biggest pain points bumpy addresses:
223230

224-
- **Sane dependency propagation** — changesets hardcodes aggressive behavior where a minor bump triggers a major bump on all peer dependents. Bumpy uses a [three-phase algorithm](docs/version-propagation.md) with sensible defaults and full configurability.
231+
- **Sane dependency propagation** — changesets hardcodes aggressive behavior where a minor bump triggers a major bump on all peer dependents. Bumpy uses a [three-phase algorithm](https://github.com/dmno-dev/bumpy/blob/main/docs/version-propagation.md) with sensible defaults and full configurability.
225232
- **Workspace protocol resolution** — changesets uses `npm publish` even in pnpm/yarn workspaces, so `workspace:^` and `catalog:` protocols are NOT resolved, resulting in broken published packages.
226233
- **Custom publish commands** — changesets is hardcoded to `npm publish`. Bumpy supports per-package custom publish for VSCode extensions, Docker images, JSR, etc.
227234
- **Flexible package management** — changesets treats all private packages the same. Bumpy lets you include/exclude any package individually.
@@ -231,14 +238,19 @@ Bumpy is built as a successor to [@changesets/changesets](https://github.com/cha
231238
## Development
232239

233240
```bash
234-
bun install
235-
bun test
236-
bun src/cli.ts --help
241+
bun install # install deps
242+
bun test # run tests
243+
bun run build # build CLI
244+
bunx bumpy --help # invoke built cli
237245
```
238246

239247
## Roadmap
240248

241-
- Prerelease mode (for now, use [pkg.pr.new](https://github.com/stackblitz-labs/pkg.pr.new) for preview packages)
242-
- Bun standalone binary for use outside of JS projects
249+
- Prerelease mode (for now, use [pkg.pr.new](https://github.com/stackblitz-labs/pkg.pr.new) for branch preview packages)
250+
- Standalone binary for use outside of JS projects
243251
- Better support for versioning non-JS packages and usage without package.json files
252+
- Plugin system for different publish targets, and support multiple targets per package
244253
- Tracking workspace-level / non-publishable changes
254+
- More frogs 🐸
255+
256+
<!-- note this readme is also used for the bumpy package! -->

docs/bump-files.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ Added user language preference to the core config.
2020
Fixed locale fallback logic in utils.
2121
```
2222

23+
> **Tip:** The description body is optional. If left blank, the bump file still contributes to the release plan (triggering version bumps and dependency propagation), but no entry will appear in the changelog for it.
24+
2325
### Bump levels
2426

2527
| Level | When to use |

0 commit comments

Comments
 (0)