diff --git a/.bumpy/_changelog-formatter.ts b/.bumpy/_changelog-formatter.ts
index a1f7406..7116e95 100644
--- a/.bumpy/_changelog-formatter.ts
+++ b/.bumpy/_changelog-formatter.ts
@@ -1,17 +1,17 @@
import type { ChangelogFormatter } from '@varlock/bumpy';
const formatter: ChangelogFormatter = (ctx) => {
- const { release, changesets, date } = ctx;
+ const { release, bumpFiles, date } = ctx;
const lines: string[] = [];
lines.push(`## 🐸 ${release.newVersion}`);
lines.push('');
lines.push(`_${date}_`);
lines.push('');
- const relevantChangesets = changesets.filter((cs) => release.changesets.includes(cs.id));
+ const relevantBumpFiles = bumpFiles.filter((bf) => release.bumpFiles.includes(bf.id));
- if (relevantChangesets.length > 0) {
- for (const cs of relevantChangesets) {
+ if (relevantBumpFiles.length > 0) {
+ for (const cs of relevantBumpFiles) {
if (cs.summary) {
const summaryLines = cs.summary.split('\n');
lines.push(`- ${summaryLines[0]}`);
@@ -24,11 +24,11 @@ const formatter: ChangelogFormatter = (ctx) => {
}
}
- if (release.isDependencyBump && relevantChangesets.length === 0) {
+ if (release.isDependencyBump && relevantBumpFiles.length === 0) {
lines.push('- Updated dependencies');
}
- if (release.isCascadeBump && !release.isDependencyBump && relevantChangesets.length === 0) {
+ if (release.isCascadeBump && !release.isDependencyBump && relevantBumpFiles.length === 0) {
lines.push('- Version bump via cascade rule');
}
diff --git a/.gitignore b/.gitignore
index aa6d230..e4fe8d3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,4 +20,7 @@ env.d.ts
ignore
-.claude/worktrees
\ No newline at end of file
+.claude/worktrees
+
+.DS_Store
+images-raw
\ No newline at end of file
diff --git a/DIFFERENCES_FROM_CHANGESETS.md b/DIFFERENCES_FROM_CHANGESETS.md
index bd034bd..165e7ca 100644
--- a/DIFFERENCES_FROM_CHANGESETS.md
+++ b/DIFFERENCES_FROM_CHANGESETS.md
@@ -21,7 +21,7 @@ Key differences from changesets:
- Out-of-range peer dep bumps match the triggering bump level (not always major) — a minor bump on `core` → minor bump on `plugin`, not major
- Dev deps never propagate by default (configurable per-package for bundled devDeps)
- `cascadeTo` config for source-side "when I change, cascade to these packages"
-- Per-changeset `none` and `patch-isolated` to suppress propagation on specific changes
+- Per-bump-file `none` and `patch-isolated` to suppress propagation on specific changes
- Warns about `^0.x` caret range gotchas and `workspace:*` on peer deps
See [docs/version-propagation.md](docs/version-propagation.md) for the full algorithm.
@@ -121,19 +121,19 @@ Bumpy includes the release date in every changelog heading by default.
### Migration tool
-`bumpy migrate` converts `.changeset/` config and pending changesets to `.bumpy/`.
+`bumpy migrate` converts `.changeset/` config and pending bump files to `.bumpy/`.
- (Previously listed under Planned)
### Conventional commits bridge
-`bumpy generate` scans git history and auto-generates changeset files from conventional commits (`feat(scope): ...` → minor, `fix(scope): ...` → patch, `feat!(scope): ...` → major). Scope is mapped to package names automatically. Not a replacement for explicit changesets — a bridge for teams migrating from semantic-release, or a convenience when you want both.
+`bumpy generate` scans git history and auto-generates bump files from conventional commits (`feat(scope): ...` → minor, `fix(scope): ...` → patch, `feat!(scope): ...` → major). Scope is mapped to package names automatically. Not a replacement for explicit bump files — a bridge for teams migrating from semantic-release, or a convenience when you want both.
- [changesets#862](https://github.com/changesets/changesets/issues/862) — conventional commits integration (70 thumbs-up, 21 comments)
### Pluggable changelog formatters
-Custom changelog formatters with full context (release info, changesets, dates). Built-in `"default"` and `"github"` (with PR links + author attribution) formatters. Users can write custom formatters in TypeScript or JavaScript. Changesets' API is limited to two awkward string-returning functions — bumpy gives you the full context and you return the complete entry.
+Custom changelog formatters with full context (release info, bump files, dates). Built-in `"default"` and `"github"` (with PR links + author attribution) formatters. Users can write custom formatters in TypeScript or JavaScript. Changesets' API is limited to two awkward string-returning functions — bumpy gives you the full context and you return the complete entry.
- [changesets#658](https://github.com/changesets/changesets/issues/658) — changelog titles not customizable (12 thumbs-up)
- [changesets#556](https://github.com/changesets/changesets/issues/556) — changelog formatting (11 thumbs-up)
@@ -143,11 +143,11 @@ Custom changelog formatters with full context (release info, changesets, dates).
`bumpy ci check` and `bumpy ci release` handle PR checks and release automation without needing a separate GitHub Action or bot installation. Just `bunx @varlock/bumpy ci check` in any workflow. No extra repository to trust, audit, or pin — your CI runs the same package you already depend on.
-### Local changeset verification
+### Local bump file verification
-`bumpy check` verifies that all changed packages on the current branch have corresponding changesets. Designed for pre-push hooks — compares your branch to the base branch, maps changed files to packages, and exits non-zero if any are missing. No GitHub API needed.
+`bumpy check` verifies that all changed packages on the current branch have corresponding bump files. Designed for pre-push hooks — compares your branch to the base branch, maps changed files to packages, and exits non-zero if any are missing. No GitHub API needed.
-Changesets has no built-in equivalent — users rely on the CI bot comment to catch missing changesets after pushing.
+Changesets has no built-in equivalent — users rely on the CI bot comment to catch missing bump files after pushing.
---
@@ -155,7 +155,7 @@ Changesets has no built-in equivalent — users rely on the CI bot comment to ca
### Prerelease mode that actually works
-Changesets' prerelease mode is described in their own docs as "very complicated" with "mistakes that can lead to repository and publish states that are very hard to fix." Key problems: no target on changesets, multi-branch corruption, exiting pre bumps ALL packages, bad interactions with linked/fixed groups.
+Changesets' prerelease mode is described in their own docs as "very complicated" with "mistakes that can lead to repository and publish states that are very hard to fix." Key problems: no target on bump files, multi-branch corruption, exiting pre bumps ALL packages, bad interactions with linked/fixed groups.
- [changesets#729](https://github.com/changesets/changesets/issues/729) — exiting pre mode bumps all versions (14 comments)
- [changesets#786](https://github.com/changesets/changesets/issues/786) — can't control dist-tag in pre mode (13 comments)
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..80a6fab
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2026 DMNO Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
\ No newline at end of file
diff --git a/README.md b/README.md
index 7a6c415..16c26a5 100644
--- a/README.md
+++ b/README.md
@@ -1,47 +1,58 @@
-# 🐸 @varlock/bumpy
+
+
+
+
+
+
+
+
+
+
+
+
+
-A modern monorepo versioning and changelog tool. Built as a replacement for [@changesets/changesets](https://github.com/changesets/changesets) — simpler, more flexible, and with sane defaults.
+# @varlock/bumpy 🐸
-## Why?
+A modern package versioning and changelog generation tool — built for monorepos (works great in single packages too).
-Changesets is mature and widely adopted, but has stagnated. The community has hundreds of open issues around core design problems that are unlikely to be fixed without a rewrite. Bumpy addresses the biggest pain points:
+## How It Works
-### Sane dependency bump propagation
+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.
-Changesets hardcodes aggressive behavior: a **minor** bump on a package triggers a **major** bump on all packages that peer-depend on it. This is the #1 community complaint with 8+ open issues and no fix in sight.
+### Example bump file
-Bumpy splits propagation into three clear phases with sensible defaults:
+`.bumpy/add-user-language.md`:
-- **Phase A** — always fixes broken ranges: peer dep bumps match the triggering level, regular deps get patch, dev deps are skipped
-- **Phase B** — enforces fixed/linked group constraints
-- **Phase C** — opt-in proactive propagation via configurable `dependencyBumpRules` and `cascadeTo` rules
-- **Per-changeset control** — `patch-isolated` skips propagation, `none` suppresses a bump, changeset cascades push bumps downstream
-- **Per-package overrides** — in `package.json["bumpy"]`
+```markdown
+---
+'@myorg/core': minor
+'@myorg/utils': patch
+---
-### Custom publish commands
-
-Changesets is hardcoded to `npm publish`. Bumpy supports per-package custom publish commands for VSCode extensions, Docker images, JSR, private registries, or anything else.
-
-### Flexible package management
-
-Changesets treats all private packages the same — either version them all or none. Bumpy lets you include/exclude any package individually via per-package config (`managed: true/false`), glob-based `include`/`ignore` lists, or the `privatePackages` setting.
-
-### Non-interactive CLI
+Added user language preference to the core config.
+Fixed locale fallback logic in utils.
+```
-`bumpy add` works both interactively and fully non-interactively for CI/CD and AI-assisted development.
+The typical CI driven workflow is:
-### Pack-then-publish
+1. **`bumpy add`** — developers create bump files as part of their PRs
+2. **`bumpy ci check`** — CI comments on each PR with a release plan preview
+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.
-By default, bumpy uses your package manager to pack a tarball (resolving `workspace:` and `catalog:` protocols) and then publishes the tarball with `npm publish` (supporting OIDC/provenance). Fully configurable.
+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`.
-## Design Goals
+## Features
-- **Simple over clever** — one package, not a monorepo of tiny packages
-- **Explicit intent** — developers declare what changed via changeset files (not inferred from commits)
-- **Configurable propagation** — the dependency bump algorithm is the core differentiator
-- **Node.js compatible** — developed with Bun but runs on Node.js too
- **All package managers** — npm, pnpm, yarn, and bun workspaces
-- **Zero runtime dependencies** — dependencies are minimal and are bundled at release time
+- **Smart dependency propagation** — configurable rules for how version bumps cascade through your dependency graph (see [version propagation docs](docs/version-propagation.md))
+- **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.
+- **Flexible package management** — include/exclude any package individually via per-package config, glob patterns, or `privatePackages` setting
+- **Non-interactive CLI** — `bumpy add` works fully non-interactively for CI/CD and AI-assisted development
+- **Aggregated GitHub releases** — optionally create a single consolidated release instead of one per package
+- **Conventional commits bridge** — `bumpy generate` auto-creates bump files from conventional commit messages
+- **Pluggable changelog formatters** — built-in `"default"` and `"github"` formatters, or write your own
+- **Zero runtime dependencies** — dependencies are minimal and bundled at release time
## Getting Started
@@ -49,31 +60,26 @@ By default, bumpy uses your package manager to pack a tarball (resolving `worksp
# Install
bun add -d @varlock/bumpy # or npm/pnpm/yarn
-# Add a shortcut script to your root package.json (recommended)
-# { "scripts": { "bumpy": "bumpy" } }
-# Then use: bun run bumpy
-
-# Initialize
+# Initialize (creates .bumpy/ config directory)
bumpy init
-# Create a changeset
+# Create a bump file
bumpy add
-# Preview releases
+# Preview the release plan
bumpy status
-
-# Apply changesets
-bumpy version
-
-# Publish
-bumpy publish
```
+Then set up CI to automate versioning and publishing (see below).
+
## CI / GitHub Actions
-No separate action to install — just call `bumpy ci` directly in your workflows.
+No separate action to install — just call `bumpy ci` directly in your workflows. Two commands handle the entire release lifecycle:
-**PR check** — comments on PRs with a release plan:
+- **`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.
+- **`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.
+
+### PR check workflow
```yaml
# .github/workflows/bumpy-check.yml
@@ -94,7 +100,7 @@ jobs:
GH_TOKEN: ${{ github.token }}
```
-**Release** — create a "Version Packages" PR on merge to main, publish when merged:
+### Release workflow
```yaml
# .github/workflows/bumpy-release.yml — trusted publishing (OIDC, no secret needed)
@@ -156,28 +162,71 @@ jobs:
-Or use `bumpy ci release --auto-publish` to version + publish directly without a PR.
+You can also use `bumpy ci release --auto-publish` to version + publish directly on merge without the intermediate PR.
+
+### Token setup
+
+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.
+
+Run `bumpy ci setup` for interactive guidance, or set it up manually:
+
+1. Create a [fine-grained personal access token](https://github.com/settings/personal-access-tokens) with:
+ - **Repository access:** your repo only
+ - **Permissions:** Contents (read & write), Pull requests (read & write)
+2. Add it as a repository secret named `BUMPY_GH_TOKEN`
+3. Add it to your release workflow:
+ ```yaml
+ - run: bunx @varlock/bumpy ci release
+ env:
+ GH_TOKEN: ${{ github.token }}
+ BUMPY_GH_TOKEN: ${{ secrets.BUMPY_GH_TOKEN }}
+ ```
+
+### Local versioning and publishing
+
+If you prefer to version and publish locally instead of via CI:
+
+```bash
+bumpy version # consume bump files, update versions and changelogs
+bumpy publish # pack and publish, create git tags, push tags, and create GitHub releases
+```
## AI Integration
-Bumpy ships with an AI skill that teaches LLMs how to create changesets.
+Bumpy ships with an AI skill that teaches LLMs how to create bump files.
```bash
-# Claude Code — install as a plugin
-claude plugin install @varlock/bumpy
-# then use /bumpy:add-change
-
-# OpenCode / Cursor / Codex — copy a command file into your project
-bumpy ai setup --target opencode
-bumpy ai setup --target cursor
-bumpy ai setup --target codex
+bumpy ai setup --target claude # installs Claude Code plugin
+bumpy ai setup --target opencode # creates OpenCode command file
+bumpy ai setup --target cursor # creates Cursor rule file
+bumpy ai setup --target codex # creates Codex instruction file
```
The skill teaches the AI to examine git changes, identify affected packages, choose bump levels, and run `bumpy add` with the right arguments.
## Documentation
-See [llms.md](./llms.md) for the full configuration reference, CLI reference, and usage examples.
+- [Bump file format](docs/bump-files.md) — syntax, bump levels, cascade control
+- [Configuration reference](docs/configuration.md) — all `.bumpy/_config.json` and per-package options
+- [CLI reference](docs/cli.md) — every command with flags and examples
+- [GitHub Actions setup](docs/github-actions.md) — CI workflows, token setup, trusted publishing
+- [Version propagation](docs/version-propagation.md) — how dependency bumps cascade through your graph
+- [LLM-friendly reference](./llms.md) — single-file reference optimized for AI tools
+
+## Why files instead of conventional commits?
+
+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 conventional commits, `bumpy generate` can bridge the gap by auto-creating bump files from commit history.
+
+## Why not just use changesets?
+
+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.md](./DIFFERENCES_FROM_CHANGESETS.md) for a detailed comparison with links to specific issues. The biggest pain points bumpy addresses:
+
+- **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.
+- **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.
+- **Custom publish commands** — changesets is hardcoded to `npm publish`. Bumpy supports per-package custom publish for VSCode extensions, Docker images, JSR, etc.
+- **Flexible package management** — changesets treats all private packages the same. Bumpy lets you include/exclude any package individually.
+- **CI without a separate action** — just `bunx @varlock/bumpy ci check` in any workflow, no bot or action to install.
+- **`bumpy migrate`** — converts `.changeset/` config and pending changeset files to `.bumpy/`.
## Development
diff --git a/docs/bump-files.md b/docs/bump-files.md
new file mode 100644
index 0000000..99f5df5
--- /dev/null
+++ b/docs/bump-files.md
@@ -0,0 +1,109 @@
+# Bump File Format
+
+Bump files are small markdown files that declare which packages changed and at what level, and a description to go into a changelog. They live in a `.bumpy` directory at your project root. Typically you create one per PR (although more is ok), and it is normal to have multiple pending bumps building up on main until a release.
+
+When publishing (usually via CI), all pending bumps are merged into a single release plan, combining bumps and triggering bumps in dependencies as necessary. The bump files are deleted and changelogs are updated accordingly.
+
+> you may know these as "changesets" if coming from [that tool](https://github.com/changesets/changesets)
+
+## Basic syntax
+
+A bump file has YAML frontmatter mapping package names to bump levels, and a markdown body that becomes the changelog entry:
+
+```markdown
+---
+'@myorg/core': minor
+'@myorg/utils': patch
+---
+
+Added user language preference to the core config.
+Fixed locale fallback logic in utils.
+```
+
+### Bump levels
+
+| Level | When to use |
+| ---------------- | ---------------------------------------------------------------------------------------------------------------------------- |
+| `major` | Breaking changes |
+| `minor` | New features (backwards-compatible) |
+| `patch` | Bug fixes, minor improvements |
+| `patch-isolated` | Like `patch`, but skips dependency propagation (Phase C). Useful for internal fixes that shouldn't trigger downstream bumps. |
+| `none` | Suppresses a bump — used in cascades to exclude specific packages from propagation (advanced) |
+
+## File naming
+
+Bump file names are purely for human readability — bumpy doesn't derive any meaning from them. Use whatever makes sense for your workflow:
+
+- **Descriptive names** like `add-user-language.md` or `fix-login-timeout.md` make it easy to see what's pending at a glance
+- **Auto-generated names** (what `bumpy add` produces when `--name` is omitted) are fine when you don't want to think about naming
+
+## Creating bump files
+
+Bump files are just markdown files — you can create them by hand, write them in your editor, or use the `bumpy add` CLI helper. Any `.md` file in `.bumpy/` (other than `README.md` and `_config.json`) is treated as a bump file.
+
+### By hand
+
+Create a file like `.bumpy/add-user-language.md` with the frontmatter and description. Name it whatever makes sense — a short description of the change is ideal. The filename doesn't affect behavior, it's just for human readability.
+
+### With `bumpy add`
+
+The command is interactive and will create the file for you:
+
+```bash
+bumpy add
+```
+
+Or there is a non-interactive mode, helpful for AI assisted development:
+
+```bash
+bumpy add --packages "core:minor,utils:patch" --message "Added new features"
+```
+
+Flags:
+
+- `--packages ` — comma-separated `name:level` pairs
+- `--message ` — changelog description
+- `--name ` — set the filename (auto-slugified). If omitted, a random name is generated.
+- `--empty` — create an empty bump file (marks a PR as intentionally having no releases)
+
+### From conventional commits
+
+```bash
+bumpy generate
+```
+
+Scans git history and auto-creates bump files from conventional commit messages:
+
+- `feat:` → minor
+- `fix:`, `perf:`, `refactor:`, etc. → patch
+- `feat!:` or `BREAKING CHANGE:` → major
+
+Commit scopes are mapped to package names automatically.
+
+## Empty bump files
+
+For PRs that intentionally don't need a release (docs, CI changes, etc.), create an empty bump file:
+
+```bash
+bumpy add --empty --name "docs-update"
+```
+
+This prevents `bumpy ci check` from warning about missing bump files.
+
+## Cascade control (advanced)
+
+You can explicitly push bumps to downstream packages using the nested object format:
+
+```markdown
+---
+'@myorg/core':
+ bump: minor
+ cascade:
+ '@myorg/plugin-*': patch
+ '@myorg/react': minor
+---
+
+New plugin API in core.
+```
+
+Cascade targets support glob patterns. This is useful when a change in one package should always trigger releases of specific dependents, regardless of the default propagation rules.
diff --git a/docs/cli.md b/docs/cli.md
new file mode 100644
index 0000000..f5241bc
--- /dev/null
+++ b/docs/cli.md
@@ -0,0 +1,199 @@
+# CLI Reference
+
+All commands can be run via `bunx @varlock/bumpy ` or, (or just `bunx bumpy` if installed locally). Alternatively, you can invoke it via a package.json script (e.g., `bun run bumpy `).
+
+## `bumpy init`
+
+Create the `.bumpy/` config directory with default settings.
+
+```bash
+bumpy init
+```
+
+## `bumpy add`
+
+Create a bump file interactively or non-interactively.
+
+```bash
+bumpy add # interactive
+bumpy add --packages "core:minor,utils:patch" --message "Added features" # non-interactive
+bumpy add --empty --name "docs-only-pr" # empty (no releases)
+```
+
+| Flag | Description |
+| ------------------- | -------------------------------------------------------------------------- |
+| `--packages ` | Comma-separated `name:level` pairs |
+| `--message ` | Changelog description |
+| `--name ` | Bump file filename (auto-slugified) |
+| `--empty` | Create an empty bump file (marks a PR as intentionally having no releases) |
+
+## `bumpy status`
+
+Preview the release plan based on pending bump files.
+
+```bash
+bumpy status
+bumpy status --json
+bumpy status --packages
+bumpy status --bump major --filter "@myorg/*"
+bumpy status --verbose
+```
+
+| Flag | Description |
+| ------------------ | -------------------------------------------------------------- |
+| `--json` | Output the full release plan as JSON |
+| `--packages` | Output only package names, one per line (useful for scripting) |
+| `--bump ` | Filter by bump type, e.g. `"major"` or `"minor,patch"` |
+| `--filter ` | Filter by package name or glob |
+| `--verbose` | Show bump file details and summaries |
+
+Exits with code `0` if releases are pending, `1` if none.
+
+## `bumpy version`
+
+Consume all pending bump files and apply the release plan:
+
+1. Reads bump files and computes the release plan (including dependency propagation)
+2. Updates `package.json` versions
+3. Generates CHANGELOG.md entries
+4. Deletes consumed bump files
+5. Updates the lockfile
+6. Optionally commits (if `commit: true` in config)
+
+```bash
+bumpy version
+```
+
+## `bumpy publish`
+
+Publish packages that have been versioned but not yet published. For each package, bumpy packs a tarball (resolving `workspace:` and `catalog:` protocols), publishes it, creates a git tag, and after all packages are published, pushes tags and creates GitHub releases.
+
+```bash
+bumpy publish
+bumpy publish --dry-run
+bumpy publish --tag beta
+bumpy publish --filter "@myorg/*"
+```
+
+| Flag | Description |
+| ------------------ | --------------------------------------------------------- |
+| `--dry-run` | Preview what would be published without actually doing it |
+| `--tag ` | npm dist-tag (e.g., `next`, `beta`) |
+| `--no-push` | Skip pushing git tags to the remote |
+| `--filter ` | Only publish matching packages (supports globs) |
+
+**How bumpy detects unpublished packages:**
+
+1. Custom `checkPublished` command (if configured per-package)
+2. Git tags (for packages with `skipNpmPublish` or custom `publishCommand`)
+3. npm registry query (default)
+
+## `bumpy check`
+
+Verify that all changed packages on the current branch have corresponding bump files. Designed for pre-push hooks — compares your branch to the base branch, maps changed files to packages, and exits non-zero if any are missing.
+
+```bash
+bumpy check
+```
+
+No flags. No GitHub API needed.
+
+## `bumpy generate`
+
+Auto-create bump files from conventional commit messages in git history.
+
+```bash
+bumpy generate
+bumpy generate --from v1.0.0
+bumpy generate --dry-run
+```
+
+| Flag | Description |
+| --------------- | ----------------------------------------------------------------- |
+| `--from [` | Git ref to scan from (default: auto-detect from last version tag) |
+| `--dry-run` | Preview without creating files |
+| `--name ` | Bump file filename |
+
+**Commit mapping:**
+
+- `feat:` → minor
+- `fix:`, `perf:`, `refactor:`, `docs:`, `style:`, `test:`, `build:`, `ci:`, `chore:` → patch
+- `feat!:` or `BREAKING CHANGE:` → major
+
+Commit scopes (e.g., `feat(core):`) are mapped to package names automatically.
+
+## `bumpy ci check`
+
+CI command for PR checks. Computes the release plan from bump files changed in the current PR and posts/updates a comment on the PR.
+
+```bash
+bumpy ci check
+bumpy ci check --fail-on-missing
+```
+
+| Flag | Description |
+| ------------------- | ---------------------------------------------------------------- |
+| `--comment` | Force PR comment on or off (default: auto-detect CI environment) |
+| `--fail-on-missing` | Exit 1 if changed packages have no bump files |
+
+Requires `GH_TOKEN` environment variable.
+
+## `bumpy ci release`
+
+CI command for releases. Has two modes:
+
+**Version PR mode (default):** If pending bump files exist, creates or updates a "Version Packages" PR with all version bumps and changelog updates. If the current push is the Version Packages PR being merged, publishes the new versions, creates git tags, and creates GitHub releases.
+
+**Auto-publish mode (`--auto-publish`):** Versions and publishes directly on merge without an intermediate PR.
+
+```bash
+bumpy ci release
+bumpy ci release --auto-publish
+bumpy ci release --auto-publish --tag beta
+```
+
+| Flag | Description |
+| ----------------- | ---------------------------------------------------------- |
+| `--auto-publish` | Version + publish directly instead of creating a PR |
+| `--tag ` | npm dist-tag (for `--auto-publish`) |
+| `--branch ` | Version PR branch name (default: `bumpy/version-packages`) |
+
+Requires `GH_TOKEN`. Optionally uses `BUMPY_GH_TOKEN` to create PRs that trigger other workflows (see [GitHub Actions setup](github-actions.md#token-setup)).
+
+## `bumpy ci setup`
+
+Interactive guide to set up `BUMPY_GH_TOKEN` for CI. Walks through creating a fine-grained PAT or GitHub App token and storing it as a repository secret.
+
+```bash
+bumpy ci setup
+```
+
+## `bumpy migrate`
+
+Convert from changesets (`.changeset/`) to bumpy (`.bumpy/`). Migrates config and pending changeset files.
+
+```bash
+bumpy migrate
+bumpy migrate --force
+```
+
+| Flag | Description |
+| --------- | ------------------------- |
+| `--force` | Skip cleanup confirmation |
+
+## `bumpy ai setup`
+
+Install an AI skill for creating bump files in supported coding tools.
+
+```bash
+bumpy ai setup --target claude
+bumpy ai setup --target opencode
+bumpy ai setup --target cursor
+bumpy ai setup --target codex
+```
+
+| Flag | Description |
+| ----------------- | ------------------------------------------ |
+| `--target ` | `claude`, `opencode`, `cursor`, or `codex` |
+
+For Claude Code, this runs `claude plugin install @varlock/bumpy` under the hood. For other targets, it copies a command/rule file into your project.
diff --git a/docs/configuration.md b/docs/configuration.md
new file mode 100644
index 0000000..068d077
--- /dev/null
+++ b/docs/configuration.md
@@ -0,0 +1,150 @@
+# Configuration Reference
+
+Bumpy is configured via `.bumpy/_config.json`, created by `bumpy init`. Per-package config can also be set in each `package.json` under the `"bumpy"` key.
+
+## Global config (`.bumpy/_config.json`)
+
+| Option | Type | Default | Description |
+| ---------------------------- | -------------------------------------- | -------------------------------- | ----------------------------------------------------------------------------------- |
+| `baseBranch` | `string` | `"main"` | Branch used for release comparisons |
+| `access` | `"public" \| "restricted"` | `"public"` | Default npm publish access level |
+| `changelog` | `string \| [string, options]` | `"default"` | Changelog formatter — `"default"`, `"github"`, or path to a custom formatter |
+| `fixed` | `string[][]` | `[]` | Package groups that always bump together to the same version |
+| `linked` | `string[][]` | `[]` | Package groups that share the highest bump level |
+| `ignore` | `string[]` | `[]` | Package name globs to exclude from versioning |
+| `include` | `string[]` | `[]` | Package name globs to explicitly include (overrides `ignore` and `privatePackages`) |
+| `privatePackages` | `{ version, tag }` | `{ version: false, tag: false }` | Whether to version and/or create git tags for private packages |
+| `updateInternalDependencies` | `"patch" \| "minor" \| "out-of-range"` | `"out-of-range"` | When to update internal dependency version ranges |
+| `dependencyBumpRules` | `object` | see below | Controls how bumps propagate through dependency types |
+| `aggregateRelease` | `boolean \| { enabled, title }` | `false` | Create a single GitHub release instead of one per package |
+| `commit` | `boolean` | `false` | Auto-commit changes after `bumpy version` |
+| `publish` | `object` | see below | Publishing pipeline config |
+| `gitUser` | `{ name, email }` | bumpy-bot | Git identity for CI commits |
+| `versionPr` | `{ title, branch, preamble }` | see below | Customize the version PR |
+| `packages` | `object` | `{}` | Per-package config overrides (keyed by package name) |
+
+### Dependency bump rules
+
+Controls how a version bump in one package propagates to packages that depend on it. Set globally in `dependencyBumpRules` or per-package.
+
+Each rule has:
+
+- `trigger` — minimum bump level that triggers propagation (`major`, `minor`, or `patch`)
+- `bumpAs` — what level to bump the dependent (`major`, `minor`, `patch`, or `match` to mirror the triggering level)
+
+Set a dependency type to `false` to disable propagation entirely.
+
+**Defaults:**
+
+| Dependency type | Trigger | Bump as |
+| ---------------------- | ------- | -------- |
+| `dependencies` | `patch` | `patch` |
+| `peerDependencies` | `major` | `match` |
+| `devDependencies` | — | disabled |
+| `optionalDependencies` | `minor` | `patch` |
+
+See [version-propagation.md](version-propagation.md) for the full propagation algorithm.
+
+### Publishing config
+
+The `publish` object controls how packages are packed and published:
+
+| Option | Type | Default | Description |
+| -------------------- | ---------------------- | -------- | --------------------------------------------------------------------- |
+| `packManager` | `string` | `"auto"` | Which package manager packs tarballs (`"auto"` detects from lockfile) |
+| `publishManager` | `string` | `"npm"` | Which tool runs `publish` (npm supports OIDC/provenance) |
+| `publishArgs` | `string[]` | `[]` | Extra args passed to publish (e.g., `["--provenance"]`) |
+| `protocolResolution` | `"pack" \| "in-place"` | `"pack"` | How `workspace:` and `catalog:` protocols are resolved |
+
+### Version PR config
+
+The `versionPr` object customizes the PR that `bumpy ci release` creates:
+
+| Option | Type | Default | Description |
+| ---------- | -------- | -------------------------- | ------------------------------------- |
+| `title` | `string` | `"🐸 Versioned release"` | PR title |
+| `branch` | `string` | `"bumpy/version-packages"` | Branch name for the version PR |
+| `preamble` | `string` | — | HTML content prepended to the PR body |
+
+## Per-package config
+
+Per-package settings can be defined in two places:
+
+1. In `.bumpy/_config.json` under the `packages` key (keyed by package name)
+2. In each package's `package.json` under the `"bumpy"` key
+
+`package.json` settings take precedence over global config.
+
+| Option | Type | Description |
+| --------------------- | -------------------------- | ----------------------------------------------------------------------- |
+| `managed` | `boolean` | Opt this package in or out of versioning |
+| `access` | `"public" \| "restricted"` | Override the global access level |
+| `publishCommand` | `string \| string[]` | Custom command(s) to publish this package (replaces npm publish) |
+| `buildCommand` | `string` | Command to run before publishing |
+| `registry` | `string` | Custom npm registry URL |
+| `skipNpmPublish` | `boolean` | Don't publish to npm (still creates git tags) |
+| `checkPublished` | `string` | Custom command that outputs the currently published version |
+| `dependencyBumpRules` | `object` | Per-package override for dependency propagation rules |
+| `cascadeTo` | `object` | Explicit cascade targets — glob pattern mapped to `{ trigger, bumpAs }` |
+
+### Example: custom publish for a VSCode extension
+
+```json
+{
+ "name": "my-vscode-extension",
+ "bumpy": {
+ "publishCommand": "vsce publish",
+ "skipNpmPublish": true
+ }
+}
+```
+
+### Example: cascade from core to plugins
+
+```json
+{
+ "name": "@myorg/core",
+ "bumpy": {
+ "cascadeTo": {
+ "@myorg/plugin-*": { "trigger": "minor", "bumpAs": "patch" }
+ }
+ }
+}
+```
+
+## Changelog formatters
+
+Set `changelog` in config to control how changelog entries are generated:
+
+- **`"default"`** — simple markdown with dates and bump file descriptions
+- **`"github"`** — includes PR links and author attribution (requires `GH_TOKEN`)
+- **Custom** — path to a TypeScript or JavaScript module that exports a formatter function
+
+```json
+{
+ "changelog": ["github", { "repo": "myorg/myrepo" }]
+}
+```
+
+## Example config
+
+```json
+{
+ "baseBranch": "main",
+ "access": "public",
+ "changelog": "github",
+ "fixed": [["@myorg/core", "@myorg/types"]],
+ "ignore": ["@myorg/internal-tools"],
+ "privatePackages": { "version": true, "tag": false },
+ "dependencyBumpRules": {
+ "peerDependencies": { "trigger": "minor", "bumpAs": "match" }
+ },
+ "aggregateRelease": true,
+ "packages": {
+ "@myorg/vscode-extension": {
+ "publishCommand": "vsce publish",
+ "skipNpmPublish": true
+ }
+ }
+}
+```
diff --git a/docs/github-actions.md b/docs/github-actions.md
new file mode 100644
index 0000000..348c543
--- /dev/null
+++ b/docs/github-actions.md
@@ -0,0 +1,169 @@
+# GitHub Actions Setup
+
+Bumpy handles CI automation with two commands — no separate GitHub Action or bot to install. Just call `bumpy ci` directly in your workflows.
+
+## Overview
+
+| Command | Trigger | What it does |
+| ------------------ | -------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
+| `bumpy ci check` | `pull_request` | Posts/updates a PR comment with the release plan. Warns about missing bump files. |
+| `bumpy ci release` | `push` to main | Creates/updates a "Version Packages" PR. When that PR is merged, publishes packages, creates git tags, and creates GitHub releases. |
+
+## PR check workflow
+
+```yaml
+# .github/workflows/bumpy-check.yml
+name: Bumpy Check
+on: pull_request
+
+jobs:
+ check:
+ runs-on: ubuntu-latest
+ permissions:
+ pull-requests: write
+ steps:
+ - uses: actions/checkout@v6
+ - uses: oven-sh/setup-bun@v2
+ - run: bun install
+ - run: bunx @varlock/bumpy ci check
+ env:
+ GH_TOKEN: ${{ github.token }}
+```
+
+## Release workflow
+
+### Trusted publishing (OIDC — recommended)
+
+No `NPM_TOKEN` secret needed. Requires npm >= 11.5.1.
+
+```yaml
+# .github/workflows/bumpy-release.yml
+name: Bumpy Release
+on:
+ push:
+ branches: [main]
+
+jobs:
+ release:
+ runs-on: ubuntu-latest
+ permissions:
+ contents: write
+ pull-requests: write
+ id-token: write # required for npm trusted publishing (OIDC)
+ steps:
+ - uses: actions/checkout@v6
+ with:
+ fetch-depth: 0
+ - uses: oven-sh/setup-bun@v2
+ - uses: actions/setup-node@v6
+ with:
+ node-version: lts/*
+ - run: bun install
+ - run: bunx @varlock/bumpy ci release
+ env:
+ GH_TOKEN: ${{ github.token }}
+ BUMPY_GH_TOKEN: ${{ secrets.BUMPY_GH_TOKEN }}
+```
+
+**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`).
+
+### Token-based auth (NPM_TOKEN)
+
+If you can't use trusted publishing, use an npm access token instead:
+
+```yaml
+# .github/workflows/bumpy-release.yml
+name: Bumpy Release
+on:
+ push:
+ branches: [main]
+
+jobs:
+ release:
+ runs-on: ubuntu-latest
+ permissions:
+ contents: write
+ pull-requests: write
+ steps:
+ - uses: actions/checkout@v6
+ with:
+ fetch-depth: 0
+ - uses: oven-sh/setup-bun@v2
+ - run: bun install
+ - run: bunx @varlock/bumpy ci release
+ env:
+ GH_TOKEN: ${{ github.token }}
+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
+ BUMPY_GH_TOKEN: ${{ secrets.BUMPY_GH_TOKEN }}
+```
+
+### Auto-publish mode
+
+Instead of the two-step flow (version PR → merge → publish), you can version and publish directly on merge:
+
+```yaml
+- run: bunx @varlock/bumpy ci release --auto-publish
+```
+
+## Token setup
+
+### `GH_TOKEN` (required)
+
+The default `${{ github.token }}` provides the basic permissions needed for both `ci check` and `ci release`.
+
+**Permissions needed:**
+
+- `pull-requests: write` — for posting PR comments and creating the version PR
+- `contents: write` — for pushing commits and tags (release workflow only)
+- `id-token: write` — for npm trusted publishing / OIDC (release workflow only)
+
+### `BUMPY_GH_TOKEN` (recommended)
+
+GitHub's anti-recursion guard prevents PRs created by the default `github.token` from triggering other workflows. This means your regular CI workflows (tests, linting, etc.) won't run automatically on the Version Packages PR — so you can't verify that the version bumps don't break anything before merging.
+
+To fix this, provide a `BUMPY_GH_TOKEN` using either a **fine-grained PAT** or a **GitHub App token**. Bumpy uses this token to push the version branch and create the PR, which allows your CI workflows to trigger normally.
+
+Run `bumpy ci setup` for interactive guidance, or set it up manually:
+
+#### Option 1: Fine-grained personal access token
+
+1. Go to [GitHub → Settings → Personal access tokens → Fine-grained tokens](https://github.com/settings/personal-access-tokens)
+2. Create a new token with:
+ - **Repository access:** select your repo only
+ - **Permissions:**
+ - Contents: Read and write
+ - Pull requests: Read and write
+ - Metadata: Read (auto-selected)
+3. Add it as a repository secret named `BUMPY_GH_TOKEN`
+
+#### Option 2: GitHub App token
+
+For organizations, a GitHub App avoids tying automation to a personal account:
+
+1. Create a GitHub App with Contents and Pull Requests permissions (read & write)
+2. Install it on your repository
+3. Store `BUMPY_APP_ID` and `BUMPY_APP_PRIVATE_KEY` as repository secrets
+4. Generate the token in your workflow:
+ ```yaml
+ - uses: actions/create-github-app-token@v2
+ id: app-token
+ with:
+ app-id: ${{ secrets.BUMPY_APP_ID }}
+ private-key: ${{ secrets.BUMPY_APP_PRIVATE_KEY }}
+ - run: bunx @varlock/bumpy ci release
+ env:
+ GH_TOKEN: ${{ github.token }}
+ BUMPY_GH_TOKEN: ${{ steps.app-token.outputs.token }}
+ ```
+
+### `NPM_TOKEN` (if not using trusted publishing)
+
+A classic npm access token. Create one at [npmjs.com → Access Tokens](https://www.npmjs.com/settings/~/tokens) and add it as a repository secret named `NPM_TOKEN`.
+
+## Environment variables summary
+
+| Variable | Required | Used by | Description |
+| ---------------- | ----------------- | ------------------------ | ------------------------------------------------- |
+| `GH_TOKEN` | Yes | `ci check`, `ci release` | GitHub token for API access |
+| `BUMPY_GH_TOKEN` | Recommended | `ci release` | PAT or App token so version PRs trigger workflows |
+| `NPM_TOKEN` | If not using OIDC | `ci release` | npm access token for publishing |
diff --git a/docs/version-propagation.md b/docs/version-propagation.md
index 199b281..aa66895 100644
--- a/docs/version-propagation.md
+++ b/docs/version-propagation.md
@@ -1,10 +1,10 @@
# How bumpy calculates version bumps
-When you run `bumpy version` (or `bumpy status` to preview), bumpy reads all pending changeset files and builds a **release plan** — a list of packages to bump and by how much. This document explains the full algorithm, including how bumps propagate to dependent packages and the available settings.
+When you run `bumpy version` (or `bumpy status` to preview), bumpy reads all pending bump files and builds a **release plan** — a list of packages to bump and by how much. This document explains the full algorithm, including how bumps propagate to dependent packages and the available settings.
## Overview
-After collecting explicit bumps from changeset files, bumpy runs a **propagation loop** that repeats until stable:
+After collecting explicit bumps from bump files, bumpy runs a **propagation loop** that repeats until stable:
- **Phase A** — fix out-of-range dependencies (always runs)
- **Phase B** — enforce fixed/linked group constraints (optional/advanced)
@@ -73,7 +73,7 @@ Example: propagation bumps `@myorg/types` as patch → `@myorg/core` also gets a
### Linked groups
-Packages in a `linked` group share the **same bump level** but keep independent version numbers. Only packages already in the release plan are affected — linked groups don't pull in packages that have no changesets. Entries can be specific names or glob patterns.
+Packages in a `linked` group share the **same bump level** but keep independent version numbers. Only packages already in the release plan are affected — linked groups don't pull in packages that have no bump files. Entries can be specific names or glob patterns.
```json
{ "linked": [["@myorg/plugin-*"]] }
@@ -159,11 +159,11 @@ Unlike dependency bump rules (configured on the _dependent_), `cascadeTo` is con
`cascadeTo` is checked separately from dependency bump rules and can add bumps beyond what the rules produce. All keys support glob patterns (`*`, `**`).
-### Per-changeset overrides
+### Per-bump-file overrides
-These are set directly in changeset files for one-off control over a specific release.
+These are set directly in bump files for one-off control over a specific release.
-**`patch-isolated`** — bumps the package as a patch but skips all Phase C propagation from it (cascades and proactive bumps). If the bump would break a dependent's declared range, bumpy throws an error rather than silently propagating — you'll need to either widen the range, drop the `-isolated` flag, or explicitly bump the dependent in the changeset.
+**`patch-isolated`** — bumps the package as a patch but skips all Phase C propagation from it (cascades and proactive bumps). If the bump would break a dependent's declared range, bumpy throws an error rather than silently propagating — you'll need to either widen the range, drop the `-isolated` flag, or explicitly bump the dependent in the bump file.
```yaml
---
@@ -181,7 +181,7 @@ Internal refactor, no API changes.
---
```
-**Changeset-level cascades** — explicitly cascade bumps to other packages with glob support. The difference from listing packages directly in the changeset is that cascaded packages are marked as dependency bumps (not direct changes), which affects how they appear in changelogs and PR comments. These always apply (no trigger threshold check):
+**Bump-file-level cascades** — explicitly cascade bumps to other packages with glob support. The difference from listing packages directly in the bump file is that cascaded packages are marked as dependency bumps (not direct changes), which affects how they appear in changelogs and PR comments. These always apply (no trigger threshold check):
```yaml
---
@@ -192,7 +192,7 @@ Internal refactor, no API changes.
---
```
-Compare with listing packages directly — these are treated as independent changes and each gets the changeset's summary in their changelog:
+Compare with listing packages directly — these are treated as independent changes and each gets the bump file's summary in their changelog:
```yaml
---
@@ -202,4 +202,4 @@ Compare with listing packages directly — these are treated as independent chan
---
```
-> **Note:** `patch-isolated`, `none`, and changeset cascades are not available in the interactive `bumpy add` UI — they are power-user features for changeset files and the `--packages` CLI flag.
+> **Note:** `patch-isolated`, `none`, and bump-file-level cascades are not available in the interactive `bumpy add` UI — they are power-user features for bump files and the `--packages` CLI flag.
diff --git a/images/github-readme-banner.png b/images/github-readme-banner.png
new file mode 100644
index 0000000..790a925
Binary files /dev/null and b/images/github-readme-banner.png differ
diff --git a/llms.md b/llms.md
index cc7c29b..020f868 100644
--- a/llms.md
+++ b/llms.md
@@ -8,10 +8,10 @@
# Initialize in a monorepo root
bumpy init
-# Create a changeset (interactive)
+# Create a bump file (interactive)
bumpy add
-# Create a changeset (non-interactive, for CI/AI)
+# Create a bump file (non-interactive, for CI/AI)
bumpy add --packages "pkg-a:minor,pkg-b:patch" --message "Added feature X" --name "add-feature-x"
# Preview what would be released
@@ -19,7 +19,7 @@ bumpy status
bumpy status --json
bumpy status --packages # one name per line, for piping
-# Apply changesets — bumps versions, updates changelogs, deletes changeset files
+# Apply bump files — bumps versions, updates changelogs, deletes bump files
bumpy version
# Publish (pack with PM, publish tarball with npm)
@@ -30,13 +30,13 @@ bumpy publish --tag beta
## How It Works
-1. Developers create **changeset files** in `.bumpy/` describing what changed and which packages are affected
-2. `bumpy version` reads all pending changesets, calculates version bumps (including dependency propagation), updates `package.json` versions and `CHANGELOG.md` files, then deletes the consumed changesets
+1. Developers create **bump files** in `.bumpy/` describing what changed and which packages are affected
+2. `bumpy version` reads all pending bump files, calculates version bumps (including dependency propagation), updates `package.json` versions and `CHANGELOG.md` files, then deletes the consumed bump files
3. `bumpy publish` finds packages with unpublished versions and publishes them in dependency order
-## Changeset File Format
+## Bump File Format
-Changeset files are markdown with YAML frontmatter, stored in `.bumpy/.md`.
+Bump files are markdown with YAML frontmatter, stored in `.bumpy/.md`.
### Simple format
@@ -248,7 +248,7 @@ When package A bumps and package B depends on A, bumpy looks for a Phase C rule
2. **Global dep type rule** — root config `dependencyBumpRules[depType]`
3. **Built-in defaults** _(least specific)_
-Changeset cascades and `cascadeTo` config are separate from dependency bump rules and always apply.
+Bump file cascades and `cascadeTo` config are separate from dependency bump rules and always apply.
### Built-in defaults (the key difference from changesets)
@@ -269,28 +269,28 @@ Creates `.bumpy/` directory with default `_config.json` and a README.
### `bumpy add`
-Create a new changeset.
+Create a new bump file.
| Flag | Description |
| ------------------- | -------------------------------------------------------- |
| `--packages ]` | Non-interactive: comma-separated `"name:bumpType"` pairs |
-| `--message ` | Changeset summary |
-| `--name ` | Changeset filename (default: random adjective-noun) |
-| `--empty` | Create an empty changeset (no packages, for CI skip) |
+| `--message ` | Bump file summary |
+| `--name ` | Bump file filename (default: random adjective-noun) |
+| `--empty` | Create an empty bump file (no packages, for CI skip) |
-Interactive mode prompts for: packages, bump type per package, cascade options, summary, and filename.
+Interactive mode prompts for: packages, bump type per package, cascade options, summary, and filename for the bump file.
### `bumpy status`
Show pending releases.
-| Flag | Description |
-| --------------------- | -------------------------------------------------------------------- |
-| `--json` | Full JSON output with `releases[]`, `changesets[]`, `packageNames[]` |
-| `--packages` | One package name per line (for piping to other commands) |
-| `--bump ` | Filter by bump type: `"major"`, `"minor,patch"` |
-| `--filter ` | Filter by package name/glob: `"@myorg/*"` |
-| `--verbose` | Show changeset details |
+| Flag | Description |
+| --------------------- | ------------------------------------------------------------------- |
+| `--json` | Full JSON output with `releases[]`, `bumpFiles[]`, `packageNames[]` |
+| `--packages` | One package name per line (for piping to other commands) |
+| `--bump ` | Filter by bump type: `"major"`, `"minor,patch"` |
+| `--filter ` | Filter by package name/glob: `"@myorg/*"` |
+| `--verbose` | Show bump file details |
Exit codes: `0` = releases pending, `1` = no releases pending.
@@ -317,7 +317,7 @@ JSON output shape:
### `bumpy check`
-Verify that all changed packages on the current branch have corresponding changesets. Compares files changed vs the base branch, maps them to managed packages, and exits non-zero if any are missing changesets.
+Verify that all changed packages on the current branch have corresponding bump files. Compares files changed vs the base branch, maps them to managed packages, and exits non-zero if any are missing bump files.
Designed for pre-push hooks — no GitHub API needed.
@@ -331,7 +331,7 @@ pre-push:
### `bumpy version`
-Apply all pending changesets: bump versions in `package.json`, update `CHANGELOG.md`, delete consumed changeset files. Optionally creates a git commit if `commit: true` in config.
+Apply all pending bump files: bump versions in `package.json`, update `CHANGELOG.md`, delete consumed bump files. Optionally creates a git commit if `commit: true` in config.
### `bumpy publish`
@@ -347,12 +347,12 @@ Default flow: detects PM → packs tarball (resolves workspace:/catalog: protoco
### `bumpy ci check`
-PR check — reports pending changesets and optionally comments on the PR with the release plan.
+PR check — reports pending bump files and optionally comments on the PR with the release plan.
| Flag | Description |
| ------------------- | ------------------------------------------------------------- |
| `--comment` | Force PR commenting on/off (auto-detected in CI environments) |
-| `--fail-on-missing` | Exit 1 if no changesets found |
+| `--fail-on-missing` | Exit 1 if no bump files found |
Auto-detects PR number from `GITHUB_REF` in GitHub Actions. Also checks `BUMPY_PR_NUMBER` and `PR_NUMBER` env vars.
@@ -378,7 +378,7 @@ Migrate from `.changeset/` to `.bumpy/`.
| --------- | ---------------------------------------------------------- |
| `--force` | Skip interactive prompts (don't ask to delete .changeset/) |
-Migrates `.changeset/config.json` fields to `.bumpy/_config.json`, copies pending changeset files, and prints key differences from changesets.
+Migrates `.changeset/config.json` fields to `.bumpy/_config.json`, copies pending bump files, and prints key differences from changesets.
## Changelog Customization
@@ -390,14 +390,14 @@ The `changelog` config controls how CHANGELOG.md entries are formatted.
{ "changelog": "default" }
```
-Simple format: version heading, date, bullet points from changeset summaries.
+Simple format: version heading, date, bullet points from bump file summaries.
```json
{ "changelog": "github" }
{ "changelog": ["github", { "repo": "dmno-dev/bumpy" }] }
```
-GitHub-enhanced: adds PR links and author attribution (`- Added feature (#123) by @user`). Looks up PRs via `gh` CLI by finding the commit that introduced each changeset file.
+GitHub-enhanced: adds PR links and author attribution (`- Added feature (#123) by @user`). Looks up PRs via `gh` CLI by finding the commit that introduced each bump file.
### Custom formatter (TypeScript or JavaScript)
@@ -645,7 +645,7 @@ jobs:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
```
-### Non-interactive changeset creation (AI/CI)
+### Non-interactive bump file creation (AI/CI)
```bash
bumpy add \
@@ -685,7 +685,7 @@ bumpy migrate
This will:
1. Create `.bumpy/` and migrate settings to `_config.json`
-2. Copy pending changeset `.md` files
+2. Copy pending bump `.md` files
3. Optionally remove `.changeset/` directory
Key behavioral differences after migration:
@@ -696,7 +696,7 @@ Key behavioral differences after migration:
## AI Integration
-Bumpy ships with an AI skill that teaches LLMs how to create changesets.
+Bumpy ships with an AI skill that teaches LLMs how to create bump files.
### Claude Code (plugin)
@@ -704,7 +704,7 @@ Bumpy ships with an AI skill that teaches LLMs how to create changesets.
claude plugin install @varlock/bumpy
```
-Then use `/bumpy:add-change` in Claude Code to create a changeset.
+Then use `/bumpy:add-change` in Claude Code to create a bump file.
### OpenCode / Cursor / Codex (setup command)
@@ -721,7 +721,7 @@ bumpy ai setup --target codex
### Any AI tool (non-interactive CLI)
-Any LLM can create changesets using the non-interactive CLI:
+Any LLM can create bump files using the non-interactive CLI:
```bash
bumpy add \
@@ -730,4 +730,4 @@ bumpy add \
--name "add-encryption-api"
```
-See the "Non-interactive changeset creation" section above for details.
+See the "Non-interactive bump file creation" section above for details.
diff --git a/package.json b/package.json
index f3dfc7e..62f22d3 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,7 @@
{
"name": "bumpy-monorepo",
"private": true,
+ "license": "MIT",
"workspaces": {
"packages": [
"packages/*"
diff --git a/packages/bumpy/.claude-plugin/plugin.json b/packages/bumpy/.claude-plugin/plugin.json
index 9abfdd9..582d100 100644
--- a/packages/bumpy/.claude-plugin/plugin.json
+++ b/packages/bumpy/.claude-plugin/plugin.json
@@ -1,13 +1,13 @@
{
"name": "bumpy",
"version": "0.0.1",
- "description": "AI-assisted changeset creation for bumpy monorepo versioning",
+ "description": "AI-assisted bump file creation for bumpy monorepo versioning",
"author": {
"name": "DMNO",
"url": "https://github.com/dmno-dev"
},
"repository": "https://github.com/dmno-dev/bumpy",
"license": "MIT",
- "keywords": ["monorepo", "versioning", "changelog", "changesets"],
+ "keywords": ["monorepo", "versioning", "changelog", "bump-files"],
"skills": "./skills/"
}
diff --git a/packages/bumpy/package.json b/packages/bumpy/package.json
index b663751..7cac5cf 100644
--- a/packages/bumpy/package.json
+++ b/packages/bumpy/package.json
@@ -2,6 +2,16 @@
"name": "@varlock/bumpy",
"version": "0.0.2",
"description": "Modern monorepo versioning and changelog tool",
+ "keywords": [
+ "bump",
+ "changelog",
+ "changesets",
+ "monorepo",
+ "version",
+ "version management"
+ ],
+ "license": "MIT",
+ "author": "dmno-dev",
"repository": {
"type": "git",
"url": "https://github.com/dmno-dev/bumpy",
diff --git a/packages/bumpy/skills/add-change/SKILL.md b/packages/bumpy/skills/add-change/SKILL.md
index b8b734a..b62d4cb 100644
--- a/packages/bumpy/skills/add-change/SKILL.md
+++ b/packages/bumpy/skills/add-change/SKILL.md
@@ -1,13 +1,13 @@
---
name: add-change
-description: Create a bumpy changeset describing which packages changed and how, for version bumping and changelog generation. Use when the user wants to record a change, add a changeset, or prepare packages for release.
+description: Create a bumpy bump file describing which packages changed and how, for version bumping and changelog generation. Use when the user wants to record a change, add a bump file, or prepare packages for release.
argument-hint: '[description of changes]'
allowed-tools: Read Grep Glob Bash Edit Write
---
-# Create a bumpy changeset
+# Create a bumpy bump file
-You are helping the user create a **bumpy changeset** — a markdown file in `.bumpy/` that describes which packages changed and how. Bumpy uses these to bump versions and generate changelogs.
+You are helping the user create a **bumpy bump file** — a markdown file in `.bumpy/` that describes which packages changed and how. Bumpy uses these to bump versions and generate changelogs.
## Steps
@@ -17,7 +17,7 @@ First, understand what changed. Run these in parallel:
- `git diff --stat` — see which files changed
- `git diff --cached --stat` — see staged changes
-- `bumpy status --json` — see if there are already pending changesets
+- `bumpy status --json` — see if there are already pending bump files
If the user provided a description via `$ARGUMENTS`, use that as additional context for understanding the change.
@@ -49,7 +49,7 @@ Use `patch-isolated` if the change is purely internal and dependents should NOT
- Dev tooling / test changes
- Documentation-only changes
-Use `none` in a changeset to suppress a bump on a package that would otherwise be included via propagation. If skipping would leave a broken range, bumpy throws an error.
+Use `none` in a bump file to suppress a bump on a package that would otherwise be included via propagation. If skipping would leave a broken range, bumpy throws an error.
### 4. Write a clear summary
@@ -59,7 +59,7 @@ Write a concise summary (1-3 sentences) describing **what** changed and **why**.
- Focus on user-facing impact, not implementation details
- Are specific enough to be useful months later
-### 5. Create the changeset
+### 5. Create the bump file
Use the non-interactive CLI:
@@ -85,7 +85,7 @@ bumpy add \
## Advanced: cascading bumps
-If a change in a core package should explicitly cascade to dependents with specific bump levels, write the changeset file directly instead of using the CLI:
+If a change in a core package should explicitly cascade to dependents with specific bump levels, write the bump file directly instead of using the CLI:
```bash
cat > .bumpy/.md << 'EOF'
@@ -107,4 +107,4 @@ EOF
- Only include packages that have **actual code changes** — bumpy handles dependency propagation automatically
- If the user hasn't made any changes yet, ask what they're planning to change
- If the change doesn't affect any publishable packages (e.g., only root config files), suggest using `bumpy add --empty` to satisfy CI checks
-- One changeset per logical change — don't combine unrelated changes
+- One bump file per logical change — don't combine unrelated changes
diff --git a/packages/bumpy/src/cli.ts b/packages/bumpy/src/cli.ts
index 421de66..d38e464 100644
--- a/packages/bumpy/src/cli.ts
+++ b/packages/bumpy/src/cli.ts
@@ -184,35 +184,35 @@ function printHelp() {
Commands:
init Initialize .bumpy/ directory
- add Create a new changeset
- generate Generate changeset from conventional commits
+ add Create a new bump file
+ generate Generate bump file from conventional commits
status Show pending releases
- check Verify changed packages have changesets (for pre-push hooks)
- version Apply changesets and bump versions
+ check Verify changed packages have bump files (for pre-push hooks)
+ version Apply bump files and bump versions
publish Publish versioned packages
ci check PR check — report pending releases, comment on PR
ci release Release — create version PR or auto-publish
ci setup Set up a token for triggering CI on version PRs
migrate Migrate from .changeset/ to .bumpy/
- ai setup Install AI skill for creating changesets
+ ai setup Install AI skill for creating bump files
Add options:
--packages Package bumps (e.g., "pkg-a:minor,pkg-b:patch")
- --message Changeset summary
- --name Changeset filename
- --empty Create an empty changeset
+ --message Bump file summary
+ --name Bump file filename
+ --empty Create an empty bump file
Generate options:
--from [ Git ref to scan from (default: last version tag)
- --dry-run Preview without creating a changeset
- --name Changeset filename
+ --dry-run Preview without creating a bump file
+ --name Bump file filename
Status options:
- --json Output as JSON (includes dirs, changesets, packageNames)
+ --json Output as JSON (includes dirs, bumpFiles, packageNames)
--packages Output only package names, one per line
--bump Filter by bump type (e.g., "major", "minor,patch")
--filter Filter by package name/glob (e.g., "@myorg/*")
- --verbose Show changeset details
+ --verbose Show bump file details
Publish options:
--dry-run Preview without publishing
@@ -222,7 +222,7 @@ function printHelp() {
CI check options:
--comment Force PR comment on/off (auto-detected in CI)
- --fail-on-missing Exit 1 if no changesets found
+ --fail-on-missing Exit 1 if no bump files found
CI release options:
--auto-publish Version + publish directly (default: create version PR)
diff --git a/packages/bumpy/src/commands/add.ts b/packages/bumpy/src/commands/add.ts
index 434f90e..7bfe566 100644
--- a/packages/bumpy/src/commands/add.ts
+++ b/packages/bumpy/src/commands/add.ts
@@ -4,12 +4,12 @@ import { log } from '../utils/logger.ts';
import { p, unwrap } from '../utils/clack.ts';
import { ensureDir, exists } from '../utils/fs.ts';
import { randomName, slugify } from '../utils/names.ts';
-import { writeChangeset } from '../core/changeset.ts';
+import { writeBumpFile } from '../core/bump-file.ts';
import { getBumpyDir, loadConfig } from '../core/config.ts';
import { discoverPackages } from '../core/workspace.ts';
import { DependencyGraph } from '../core/dep-graph.ts';
import { matchGlob } from '../core/config.ts';
-import type { BumpType, BumpTypeWithIsolated, ChangesetRelease, ChangesetReleaseCascade } from '../types.ts';
+import type { BumpType, BumpTypeWithIsolated, BumpFileRelease, BumpFileReleaseCascade } from '../types.ts';
interface AddOptions {
packages?: string; // "pkg-a:minor,pkg-b:patch-isolated"
@@ -42,11 +42,11 @@ export async function addCommand(rootDir: string, opts: AddOptions): Promise({
- message: 'Which packages should be included in this changeset?',
+ message: 'Which packages should be included in this bump file?',
options: [...pkgs.values()].map((pkg) => ({
label: pkg.name,
value: pkg.name,
@@ -88,7 +88,7 @@ export async function addCommand(rootDir: string, opts: AddOptions): Promise {
@@ -175,29 +175,29 @@ export async function addCommand(rootDir: string, opts: AddOptions): Promise `${pc.cyan(r.name)} ${pc.dim('→')} ${pc.bold(r.type)}${formatCascade(r)}`).join('\n'),
- 'Changeset',
+ 'Bump file',
);
p.outro(pc.green(`Created .bumpy/${filename}.md`));
}
}
-function formatCascade(r: ChangesetRelease): string {
+function formatCascade(r: BumpFileRelease): string {
if (!('cascade' in r) || Object.keys(r.cascade).length === 0) return '';
const parts = Object.entries(r.cascade).map(([k, v]) => `${k}:${v}`);
return pc.dim(` (cascade: ${parts.join(', ')})`);
}
-function parsePackagesFlag(input: string): ChangesetRelease[] {
+function parsePackagesFlag(input: string): BumpFileRelease[] {
return input.split(',').map((entry) => {
const [name, type] = entry.trim().split(':');
if (!name || !type) {
diff --git a/packages/bumpy/src/commands/ai.ts b/packages/bumpy/src/commands/ai.ts
index 5a03ca2..5edc68c 100644
--- a/packages/bumpy/src/commands/ai.ts
+++ b/packages/bumpy/src/commands/ai.ts
@@ -1,10 +1,11 @@
import { resolve, dirname } from 'node:path';
import { readFile } from 'node:fs/promises';
import { fileURLToPath } from 'node:url';
+import { execSync } from 'node:child_process';
import { ensureDir, exists, writeText } from '../utils/fs.ts';
import { log } from '../utils/logger.ts';
-const SUPPORTED_TARGETS = ['opencode', 'cursor', 'codex'] as const;
+const SUPPORTED_TARGETS = ['claude', 'opencode', 'cursor', 'codex'] as const;
type AiTarget = (typeof SUPPORTED_TARGETS)[number];
interface AiSetupOptions {
@@ -16,7 +17,6 @@ export async function aiSetupCommand(rootDir: string, opts: AiSetupOptions): Pro
if (!target) {
log.error(`Please specify a target: bumpy ai setup --target <${SUPPORTED_TARGETS.join('|')}>`);
- log.dim(' Claude Code users: install the plugin instead — claude plugin install @varlock/bumpy');
process.exit(1);
}
@@ -25,6 +25,11 @@ export async function aiSetupCommand(rootDir: string, opts: AiSetupOptions): Pro
process.exit(1);
}
+ if (target === 'claude') {
+ setupClaude();
+ return;
+ }
+
// Read the prompt template bundled with bumpy
const promptContent = await loadPromptTemplate();
@@ -50,6 +55,19 @@ async function loadPromptTemplate(): Promise {
return content.replace(/^---\n[\s\S]*?\n---\n\n?/, '');
}
+/** Install as a Claude Code plugin */
+function setupClaude(): void {
+ log.step('Installing Claude Code plugin...');
+ try {
+ execSync('claude plugin install @varlock/bumpy', { stdio: 'inherit' });
+ log.success('Installed Claude Code plugin');
+ log.dim(' Usage: /bumpy:add-change in Claude Code');
+ } catch {
+ log.error('Failed to install Claude Code plugin. Make sure `claude` is installed and available in your PATH.');
+ process.exit(1);
+ }
+}
+
/** Install as an OpenCode custom command */
async function setupOpenCode(rootDir: string, promptContent: string): Promise {
const commandsDir = resolve(rootDir, '.opencode', 'commands');
@@ -63,7 +81,7 @@ async function setupOpenCode(rootDir: string, promptContent: string): Promise {
const config = await loadConfig(rootDir);
const { packages } = await discoverWorkspace(rootDir, config);
- const changesets = await readChangesets(rootDir);
+ const bumpFiles = await readBumpFiles(rootDir);
- // Find which packages already have changesets
+ // Find which packages already have bump files
const coveredPackages = new Set();
- for (const cs of changesets) {
- for (const release of cs.releases) {
+ for (const bf of bumpFiles) {
+ for (const release of bf.releases) {
coveredPackages.add(release.name);
}
}
@@ -40,21 +40,21 @@ export async function checkCommand(rootDir: string): Promise {
return;
}
- // Check which changed packages are missing changesets
+ // Check which changed packages are missing bump files
const missing = changedPackages.filter((name) => !coveredPackages.has(name));
if (missing.length === 0) {
- log.success(`All ${changedPackages.length} changed package(s) have changesets.`);
+ log.success(`All ${changedPackages.length} changed package(s) have bump files.`);
return;
}
// Report missing
- log.warn(`${missing.length} changed package(s) missing changesets:\n`);
+ log.warn(`${missing.length} changed package(s) missing bump files:\n`);
for (const name of missing) {
console.log(` ${colorize(name, 'yellow')}`);
}
console.log();
- log.dim('Run `bumpy add` to create a changeset, or `bumpy add --empty` if no release is needed.');
+ log.dim('Run `bumpy add` to create a bump file, or `bumpy add --empty` if no release is needed.');
process.exit(1);
}
diff --git a/packages/bumpy/src/commands/ci.ts b/packages/bumpy/src/commands/ci.ts
index 5a316a1..eee732e 100644
--- a/packages/bumpy/src/commands/ci.ts
+++ b/packages/bumpy/src/commands/ci.ts
@@ -2,13 +2,13 @@ import { log, colorize } from '../utils/logger.ts';
import { loadConfig } from '../core/config.ts';
import { discoverWorkspace } from '../core/workspace.ts';
import { DependencyGraph } from '../core/dep-graph.ts';
-import { readChangesets } from '../core/changeset.ts';
+import { readBumpFiles } from '../core/bump-file.ts';
import { getChangedFiles } from '../core/git.ts';
import { assembleReleasePlan } from '../core/release-plan.ts';
import { runArgs, runArgsAsync, tryRunArgs } from '../utils/shell.ts';
import { randomName } from '../utils/names.ts';
import { detectPackageManager } from '../utils/package-manager.ts';
-import type { BumpyConfig, Changeset, PackageManager, ReleasePlan, PlannedRelease } from '../types.ts';
+import type { BumpyConfig, BumpFile, PackageManager, ReleasePlan, PlannedRelease } from '../types.ts';
// ---- Validation helpers ----
@@ -43,20 +43,20 @@ function ensureGitIdentity(rootDir: string, config: BumpyConfig): void {
interface CheckOptions {
comment?: boolean; // post a PR comment via gh (default: true in CI)
- failOnMissing?: boolean; // exit 1 if no changesets (default: false)
+ failOnMissing?: boolean; // exit 1 if no bump files (default: false)
}
/**
- * CI check: report on pending changesets.
+ * CI check: report on pending bump files.
* Designed for PR workflows — shows what would be released and optionally comments on the PR.
*/
export async function ciCheckCommand(rootDir: string, opts: CheckOptions): Promise {
const config = await loadConfig(rootDir);
const { packages } = await discoverWorkspace(rootDir, config);
const depGraph = new DependencyGraph(packages);
- const allChangesets = await readChangesets(rootDir);
+ const allBumpFiles = await readBumpFiles(rootDir);
- // Skip on the version PR branch — it has no changesets by design
+ // Skip on the version PR branch — it has no bump files by design
const prBranchName = detectPrBranch(rootDir);
if (prBranchName === config.versionPr.branch) {
log.dim(' Skipping — this is the version PR branch.');
@@ -68,22 +68,22 @@ export async function ciCheckCommand(rootDir: string, opts: CheckOptions): Promi
const prNumber = detectPrNumber();
const pm = await detectPackageManager(rootDir);
- // Filter to only changesets added/modified in this PR
+ // Filter to only bump files added/modified in this PR
const changedFiles = getChangedFiles(rootDir, config.baseBranch);
- const prChangesetIds = new Set(
+ const prBumpFileIds = new Set(
changedFiles
.filter((f) => /^\.bumpy\/.*\.md$/.test(f) && !f.endsWith('README.md'))
.map((f) => f.replace(/^\.bumpy\//, '').replace(/\.md$/, '')),
);
- const prChangesets = allChangesets.filter((cs) => prChangesetIds.has(cs.id));
+ const prBumpFiles = allBumpFiles.filter((bf) => prBumpFileIds.has(bf.id));
- if (prChangesets.length === 0) {
- const msg = 'No changesets found in this PR.';
+ if (prBumpFiles.length === 0) {
+ const msg = 'No bump files found in this PR.';
log.info(msg);
if (shouldComment && prNumber) {
const prBranch = detectPrBranch(rootDir);
- await postOrUpdatePrComment(prNumber, formatNoChangesetsComment(prBranch, pm), rootDir);
+ await postOrUpdatePrComment(prNumber, formatNoBumpFilesComment(prBranch, pm), rootDir);
}
if (opts.failOnMissing) {
@@ -92,10 +92,10 @@ export async function ciCheckCommand(rootDir: string, opts: CheckOptions): Promi
return;
}
- const plan = assembleReleasePlan(prChangesets, packages, depGraph, config);
+ const plan = assembleReleasePlan(prBumpFiles, packages, depGraph, config);
// Pretty output for logs
- log.bold(`${prChangesets.length} changeset(s) → ${plan.releases.length} package(s) to release\n`);
+ log.bold(`${prBumpFiles.length} bump file(s) → ${plan.releases.length} package(s) to release\n`);
for (const r of plan.releases) {
const tag = r.isDependencyBump ? ' (dep)' : r.isCascadeBump ? ' (cascade)' : '';
console.log(` ${r.name}: ${r.oldVersion} → ${colorize(r.newVersion, 'cyan')}${tag}`);
@@ -109,7 +109,7 @@ export async function ciCheckCommand(rootDir: string, opts: CheckOptions): Promi
// Comment on PR
if (shouldComment && prNumber) {
const prBranch = detectPrBranch(rootDir);
- const comment = formatReleasePlanComment(plan, prChangesets, prNumber, prBranch, pm, plan.warnings);
+ const comment = formatReleasePlanComment(plan, prBumpFiles, prNumber, prBranch, pm, plan.warnings);
await postOrUpdatePrComment(prNumber, comment, rootDir);
}
}
@@ -131,20 +131,20 @@ export async function ciReleaseCommand(rootDir: string, opts: ReleaseOptions): P
ensureGitIdentity(rootDir, config);
const { packages } = await discoverWorkspace(rootDir, config);
const depGraph = new DependencyGraph(packages);
- const changesets = await readChangesets(rootDir);
+ const bumpFiles = await readBumpFiles(rootDir);
- if (changesets.length === 0) {
- // No changesets — check if there are unpublished packages to publish
+ if (bumpFiles.length === 0) {
+ // No bump files — check if there are unpublished packages to publish
// (this handles the case where a version PR was just merged)
- log.info('No pending changesets — checking for unpublished packages...');
+ log.info('No pending bump files — checking for unpublished packages...');
const { publishCommand } = await import('./publish.ts');
await publishCommand(rootDir, { tag: opts.tag });
return;
}
- const plan = assembleReleasePlan(changesets, packages, depGraph, config);
+ const plan = assembleReleasePlan(bumpFiles, packages, depGraph, config);
if (plan.releases.length === 0) {
- log.info('Changesets found but no packages would be released.');
+ log.info('Bump files found but no packages would be released.');
return;
}
@@ -332,7 +332,7 @@ async function createVersionPr(
const FROG_IMG_BASE = 'https://raw.githubusercontent.com/dmno-dev/bumpy/main/images';
-function buildAddChangesetLink(prBranch: string | null): string | null {
+function buildAddBumpFileLink(prBranch: string | null): string | null {
if (!prBranch) return null;
const repo = process.env.GITHUB_REPOSITORY;
if (!repo) return null;
@@ -351,7 +351,7 @@ function pmRunCommand(pm: PackageManager): string {
function formatReleasePlanComment(
plan: ReleasePlan,
- changesets: Changeset[],
+ bumpFiles: BumpFile[],
prNumber: string,
prBranch: string | null,
pm: PackageManager,
@@ -388,11 +388,11 @@ function formatReleasePlanComment(
lines.push('');
}
- // Changeset file list with links
- lines.push(`#### Changesets in this PR`);
+ // Bump file list with links
+ lines.push(`#### Bump files in this PR`);
lines.push('');
- for (const cs of changesets) {
- const filename = `${cs.id}.md`;
+ for (const bf of bumpFiles) {
+ const filename = `${bf.id}.md`;
const parts: string[] = [`\`${filename}\``];
if (repo) {
parts.push(`([view diff](https://github.com/${repo}/pull/${prNumber}/files#diff-.bumpy/${filename}))`);
@@ -413,11 +413,11 @@ function formatReleasePlanComment(
lines.push('');
}
- const addLink = buildAddChangesetLink(prBranch);
+ const addLink = buildAddBumpFileLink(prBranch);
if (addLink) {
- lines.push(`[Click here if you want to add another changeset to this PR](${addLink})\n`);
+ lines.push(`[Click here if you want to add another bump file to this PR](${addLink})\n`);
} else {
- lines.push(`To add another changeset, run \`${pmRunCommand(pm)} add\`\n`);
+ lines.push(`To add another bump file, run \`${pmRunCommand(pm)} add\`\n`);
}
lines.push('---');
@@ -425,23 +425,23 @@ function formatReleasePlanComment(
return lines.join('\n');
}
-function formatNoChangesetsComment(prBranch: string | null, pm: PackageManager): string {
+function formatNoBumpFilesComment(prBranch: string | null, pm: PackageManager): string {
const runCmd = pmRunCommand(pm);
const lines = [
`]
`,
'',
- "Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. **If these changes should result in a version bump, you need to add a changeset.**",
+ "Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. **If these changes should result in a version bump, you need to add a bump file.**",
'
\n',
- 'You can add a changeset by running:\n',
+ 'You can add a bump file by running:\n',
'```bash',
`${runCmd} add`,
'```',
];
- const addLink = buildAddChangesetLink(prBranch);
+ const addLink = buildAddBumpFileLink(prBranch);
if (addLink) {
lines.push('');
- lines.push(`Or [click here to add a changeset](${addLink}) directly on GitHub.`);
+ lines.push(`Or [click here to add a bump file](${addLink}) directly on GitHub.`);
}
lines.push('\n---');
@@ -498,14 +498,14 @@ function formatVersionPrBody(plan: ReleasePlan, preamble: string, packageDirs: M
lines.push(`#### \`${r.name}\` ${r.oldVersion} → **${r.newVersion}**${suffix}${diffLinks}`);
lines.push('');
- const relevantChangesets = plan.changesets.filter((cs) => r.changesets.includes(cs.id));
+ const relevantBumpFiles = plan.bumpFiles.filter((bf) => r.bumpFiles.includes(bf.id));
- if (relevantChangesets.length > 0) {
- for (const cs of relevantChangesets) {
- if (cs.summary) {
- const csLink = ` ([changeset](#diff-${sha256Hex(`.bumpy/${cs.id}.md`)}))`;
- const summaryLines = cs.summary.split('\n');
- lines.push(`- ${summaryLines[0]}${csLink}`);
+ if (relevantBumpFiles.length > 0) {
+ for (const bf of relevantBumpFiles) {
+ if (bf.summary) {
+ const bfLink = ` ([bump file](#diff-${sha256Hex(`.bumpy/${bf.id}.md`)}))`;
+ const summaryLines = bf.summary.split('\n');
+ lines.push(`- ${summaryLines[0]}${bfLink}`);
for (let i = 1; i < summaryLines.length; i++) {
if (summaryLines[i]!.trim()) {
lines.push(` ${summaryLines[i]}`);
diff --git a/packages/bumpy/src/commands/generate.ts b/packages/bumpy/src/commands/generate.ts
index 8a3c696..ea57226 100644
--- a/packages/bumpy/src/commands/generate.ts
+++ b/packages/bumpy/src/commands/generate.ts
@@ -2,11 +2,11 @@ import { log, colorize } from '../utils/logger.ts';
import { tryRunArgs } from '../utils/shell.ts';
import { loadConfig } from '../core/config.ts';
import { discoverPackages } from '../core/workspace.ts';
-import { writeChangeset } from '../core/changeset.ts';
+import { writeBumpFile } from '../core/bump-file.ts';
import { getBumpyDir } from '../core/config.ts';
import { ensureDir } from '../utils/fs.ts';
import { slugify, randomName } from '../utils/names.ts';
-import type { BumpType, BumpTypeWithIsolated, BumpyConfig, ChangesetRelease, WorkspacePackage } from '../types.ts';
+import type { BumpType, BumpTypeWithIsolated, BumpyConfig, BumpFileRelease, WorkspacePackage } from '../types.ts';
interface GenerateOptions {
from?: string; // git ref to start from (default: auto-detect last version tag)
@@ -112,7 +112,7 @@ export async function generateCommand(rootDir: string, opts: GenerateOptions): P
}
// Build releases and summary
- const releases: ChangesetRelease[] = [];
+ const releases: BumpFileRelease[] = [];
const summaryLines: string[] = [];
for (const [name, info] of releaseMap) {
@@ -123,7 +123,7 @@ export async function generateCommand(rootDir: string, opts: GenerateOptions): P
}
if (opts.dryRun) {
- log.bold('Would create changeset:');
+ log.bold('Would create bump file:');
for (const r of releases) {
console.log(
` ${r.name}: ${colorize(r.type, r.type === 'major' ? 'red' : r.type === 'minor' ? 'yellow' : 'green')}`,
@@ -137,13 +137,13 @@ export async function generateCommand(rootDir: string, opts: GenerateOptions): P
return;
}
- // Write the changeset
+ // Write the bump file
await ensureDir(getBumpyDir(rootDir));
const filename = opts.name ? slugify(opts.name) : randomName();
const summary = summaryLines.join('\n');
- await writeChangeset(rootDir, filename, releases, summary);
+ await writeBumpFile(rootDir, filename, releases, summary);
- log.success(`Created changeset: .bumpy/${filename}.md`);
+ log.success(`Created bump file: .bumpy/${filename}.md`);
for (const r of releases) {
log.dim(` ${r.name}: ${r.type}`);
}
diff --git a/packages/bumpy/src/commands/init.ts b/packages/bumpy/src/commands/init.ts
index dd62405..518ea68 100644
--- a/packages/bumpy/src/commands/init.ts
+++ b/packages/bumpy/src/commands/init.ts
@@ -23,7 +23,7 @@ export async function initCommand(rootDir: string): Promise {
// Write a README explaining the directory
await writeText(
resolve(bumpyDir, 'README.md'),
- `# 🐸 Bumpy\n\nThis directory is used by [bumpy](${__BUMPY_WEBSITE_URL__}) to manage versioning.\n\nChangeset files (\`.md\`) in this directory describe pending version bumps.\nRun \`bumpy add\` to create a new changeset.\n`,
+ `# 🐸 Bumpy\n\nThis directory is used by [bumpy](${__BUMPY_WEBSITE_URL__}) to manage versioning.\n\nBump files (\`.md\`) in this directory describe pending version bumps.\nRun \`bumpy add\` to create a new bump file.\n`,
);
log.success('Initialized .bumpy/ directory');
diff --git a/packages/bumpy/src/commands/migrate.ts b/packages/bumpy/src/commands/migrate.ts
index f8c8097..e2586fd 100644
--- a/packages/bumpy/src/commands/migrate.ts
+++ b/packages/bumpy/src/commands/migrate.ts
@@ -4,10 +4,10 @@ import pc from 'picocolors';
import { log } from '../utils/logger.ts';
import { readJson, readText, exists } from '../utils/fs.ts';
import { getBumpyDir } from '../core/config.ts';
-import { writeChangeset } from '../core/changeset.ts';
+import { writeBumpFile } from '../core/bump-file.ts';
import { p, unwrap } from '../utils/clack.ts';
import { initCommand } from './init.ts';
-import type { ChangesetRelease, BumpTypeWithIsolated } from '../types.ts';
+import type { BumpFileRelease, BumpTypeWithIsolated } from '../types.ts';
interface MigrateOptions {
force?: boolean;
@@ -36,12 +36,12 @@ export async function migrateCommand(rootDir: string, opts: MigrateOptions): Pro
await migrateConfig(changesetConfigPath, bumpyDir);
}
- // Step 2: Migrate pending changeset files
+ // Step 2: Migrate pending changeset files to bump files
const files = await readdir(changesetDir);
const mdFiles = files.filter((f) => f.endsWith('.md') && f !== 'README.md');
if (mdFiles.length > 0) {
- log.step(`Migrating ${mdFiles.length} pending changeset(s)...`);
+ log.step(`Migrating ${mdFiles.length} pending changeset(s) to bump files...`);
let migrated = 0;
for (const file of mdFiles) {
const content = await readText(resolve(changesetDir, file));
@@ -59,11 +59,11 @@ export async function migrateCommand(rootDir: string, opts: MigrateOptions): Pro
}
// Write in bumpy format (which is the same, but let's go through our writer for consistency)
- await writeChangeset(rootDir, name, result.releases, result.summary);
+ await writeBumpFile(rootDir, name, result.releases, result.summary);
migrated++;
log.dim(` Migrated ${file}`);
}
- log.success(`Migrated ${migrated} changeset(s)`);
+ log.success(`Migrated ${migrated} bump file(s)`);
} else {
log.info('No pending changesets to migrate.');
}
@@ -95,7 +95,7 @@ export async function migrateCommand(rootDir: string, opts: MigrateOptions): Pro
log.dim('Key differences from changesets:');
log.dim(' - Out-of-range peer dep bumps match the triggering bump level (not always major)');
log.dim(" - Use 'patch-isolated' to skip Phase C propagation");
- log.dim(" - Use 'none' in a changeset to suppress a propagated bump");
+ log.dim(" - Use 'none' in a bump file to suppress a propagated bump");
log.dim(' - Per-package config goes in package.json["bumpy"]');
}
@@ -140,7 +140,7 @@ async function migrateConfig(changesetConfigPath: string, bumpyDir: string): Pro
}
/** Parse a changesets-format markdown file */
-function parseChangesetFile(content: string): { releases: ChangesetRelease[]; summary: string } | null {
+function parseChangesetFile(content: string): { releases: BumpFileRelease[]; summary: string } | null {
const match = content.match(/^---\n([\s\S]*?)\n---\n?([\s\S]*)$/);
if (!match) return null;
@@ -149,7 +149,7 @@ function parseChangesetFile(content: string): { releases: ChangesetRelease[]; su
if (!frontmatter) return null;
- const releases: ChangesetRelease[] = [];
+ const releases: BumpFileRelease[] = [];
for (const line of frontmatter.split('\n')) {
const trimmed = line.trim();
if (!trimmed) continue;
diff --git a/packages/bumpy/src/commands/publish.ts b/packages/bumpy/src/commands/publish.ts
index ad00849..d6ecf44 100644
--- a/packages/bumpy/src/commands/publish.ts
+++ b/packages/bumpy/src/commands/publish.ts
@@ -49,7 +49,7 @@ export async function publishCommand(rootDir: string, opts: PublishCommandOption
// Build a synthetic release plan from unpublished packages
const releasePlan: ReleasePlan = {
- changesets: [],
+ bumpFiles: [],
releases: toPublish,
warnings: [],
};
@@ -109,12 +109,12 @@ export async function publishCommand(rootDir: string, opts: PublishCommandOption
const aggTitle = typeof aggConfig === 'object' ? aggConfig.title : undefined;
if (isAggregate) {
- await createAggregateRelease(publishedReleases, releasePlan.changesets, rootDir, {
+ await createAggregateRelease(publishedReleases, releasePlan.bumpFiles, rootDir, {
dryRun: opts.dryRun,
title: aggTitle,
});
} else {
- await createIndividualReleases(publishedReleases, releasePlan.changesets, rootDir, {
+ await createIndividualReleases(publishedReleases, releasePlan.bumpFiles, rootDir, {
dryRun: opts.dryRun,
});
}
@@ -148,7 +148,7 @@ async function findUnpublishedPackages(
type: 'patch', // doesn't matter for publish, just needs a value
oldVersion: pkg.version, // we don't know the old version
newVersion: pkg.version,
- changesets: [],
+ bumpFiles: [],
isDependencyBump: false,
isCascadeBump: false,
});
diff --git a/packages/bumpy/src/commands/status.ts b/packages/bumpy/src/commands/status.ts
index 24b9479..3a716b7 100644
--- a/packages/bumpy/src/commands/status.ts
+++ b/packages/bumpy/src/commands/status.ts
@@ -2,7 +2,7 @@ import { log, colorize } from '../utils/logger.ts';
import { loadConfig } from '../core/config.ts';
import { discoverPackages } from '../core/workspace.ts';
import { DependencyGraph } from '../core/dep-graph.ts';
-import { readChangesets } from '../core/changeset.ts';
+import { readBumpFiles } from '../core/bump-file.ts';
import { assembleReleasePlan } from '../core/release-plan.ts';
import type { PlannedRelease, WorkspacePackage } from '../types.ts';
@@ -14,7 +14,7 @@ interface StatusOptions {
bumpType?: string;
/** Filter to specific packages (comma-separated names or globs) */
filter?: string;
- /** Show verbose output including changeset details */
+ /** Show verbose output including bump file details */
verbose?: boolean;
}
@@ -22,18 +22,18 @@ export async function statusCommand(rootDir: string, opts: StatusOptions): Promi
const config = await loadConfig(rootDir);
const packages = await discoverPackages(rootDir, config);
const depGraph = new DependencyGraph(packages);
- const changesets = await readChangesets(rootDir);
+ const bumpFiles = await readBumpFiles(rootDir);
- if (changesets.length === 0) {
+ if (bumpFiles.length === 0) {
if (opts.json) {
- console.log(JSON.stringify({ changesets: [], releases: [], packageNames: [] }, null, 2));
+ console.log(JSON.stringify({ bumpFiles: [], releases: [], packageNames: [] }, null, 2));
} else if (!opts.packagesOnly) {
- log.info('No pending changesets.');
+ log.info('No pending bump files.');
}
process.exit(1); // exit 1 = no releases pending (useful for CI)
}
- const plan = assembleReleasePlan(changesets, packages, depGraph, config);
+ const plan = assembleReleasePlan(bumpFiles, packages, depGraph, config);
// Apply filters
let releases = plan.releases;
@@ -49,10 +49,10 @@ export async function statusCommand(rootDir: string, opts: StatusOptions): Promi
if (opts.json) {
const jsonOutput = {
- changesets: plan.changesets.map((cs) => ({
- id: cs.id,
- summary: cs.summary,
- releases: cs.releases.map((r) => ({ name: r.name, type: r.type })),
+ bumpFiles: plan.bumpFiles.map((bf) => ({
+ id: bf.id,
+ summary: bf.summary,
+ releases: bf.releases.map((r) => ({ name: r.name, type: r.type })),
})),
releases: releases.map((r) => ({
name: r.name,
@@ -60,7 +60,7 @@ export async function statusCommand(rootDir: string, opts: StatusOptions): Promi
oldVersion: r.oldVersion,
newVersion: r.newVersion,
dir: packages.get(r.name)?.relativeDir,
- changesets: r.changesets,
+ bumpFiles: r.bumpFiles,
isDependencyBump: r.isDependencyBump,
isCascadeBump: r.isCascadeBump,
})),
@@ -78,7 +78,7 @@ export async function statusCommand(rootDir: string, opts: StatusOptions): Promi
}
// Pretty output
- log.bold(`${changesets.length} changeset(s) pending\n`);
+ log.bold(`${bumpFiles.length} bump file(s) pending\n`);
if (releases.length === 0) {
log.warn('No packages match the current filters.');
@@ -110,14 +110,14 @@ export async function statusCommand(rootDir: string, opts: StatusOptions): Promi
}
if (opts.verbose) {
- log.bold('Changesets:');
- for (const cs of plan.changesets) {
- console.log(` ${colorize(cs.id, 'cyan')}`);
- for (const r of cs.releases) {
+ log.bold('Bump files:');
+ for (const bf of plan.bumpFiles) {
+ console.log(` ${colorize(bf.id, 'cyan')}`);
+ for (const r of bf.releases) {
console.log(` ${r.name}: ${r.type}`);
}
- if (cs.summary) {
- console.log(` ${colorize(cs.summary.split('\n')[0]!, 'dim')}`);
+ if (bf.summary) {
+ console.log(` ${colorize(bf.summary.split('\n')[0]!, 'dim')}`);
}
}
}
diff --git a/packages/bumpy/src/commands/version.ts b/packages/bumpy/src/commands/version.ts
index ce015e9..233c30a 100644
--- a/packages/bumpy/src/commands/version.ts
+++ b/packages/bumpy/src/commands/version.ts
@@ -2,7 +2,7 @@ import { log, colorize } from '../utils/logger.ts';
import { loadConfig } from '../core/config.ts';
import { discoverPackages } from '../core/workspace.ts';
import { DependencyGraph } from '../core/dep-graph.ts';
-import { readChangesets } from '../core/changeset.ts';
+import { readBumpFiles } from '../core/bump-file.ts';
import { assembleReleasePlan } from '../core/release-plan.ts';
import { applyReleasePlan } from '../core/apply-release-plan.ts';
import { runArgs, tryRunArgs } from '../utils/shell.ts';
@@ -12,17 +12,17 @@ export async function versionCommand(rootDir: string): Promise {
const config = await loadConfig(rootDir);
const packages = await discoverPackages(rootDir, config);
const depGraph = new DependencyGraph(packages);
- const changesets = await readChangesets(rootDir);
+ const bumpFiles = await readBumpFiles(rootDir);
- if (changesets.length === 0) {
- log.info('No pending changesets.');
+ if (bumpFiles.length === 0) {
+ log.info('No pending bump files.');
return;
}
- const plan = assembleReleasePlan(changesets, packages, depGraph, config);
+ const plan = assembleReleasePlan(bumpFiles, packages, depGraph, config);
if (plan.releases.length === 0) {
- log.warn('Changesets found but no packages would be released.');
+ log.warn('Bump files found but no packages would be released.');
return;
}
@@ -45,7 +45,7 @@ export async function versionCommand(rootDir: string): Promise {
await applyReleasePlan(plan, packages, rootDir, config);
log.success(`Updated ${plan.releases.length} package(s)`);
- log.dim(` Deleted ${changesets.length} changeset file(s)`);
+ log.dim(` Deleted ${bumpFiles.length} bump file(s)`);
// Update lockfile so it stays in sync with bumped versions
await updateLockfile(rootDir);
@@ -53,7 +53,7 @@ export async function versionCommand(rootDir: string): Promise {
// Optionally commit
if (config.commit) {
try {
- // Stage version changes, changelogs, deleted changesets, and lockfile
+ // Stage version changes, changelogs, deleted bump files, and lockfile
runArgs(['git', 'add', '-A', '.bumpy/'], { cwd: rootDir });
for (const r of plan.releases) {
const pkg = packages.get(r.name)!;
diff --git a/packages/bumpy/src/core/apply-release-plan.ts b/packages/bumpy/src/core/apply-release-plan.ts
index ee7f1b8..54f350a 100644
--- a/packages/bumpy/src/core/apply-release-plan.ts
+++ b/packages/bumpy/src/core/apply-release-plan.ts
@@ -1,10 +1,10 @@
import { resolve } from 'node:path';
import { readJson, readText, writeText, exists, updateJsonFields, updateJsonNestedField } from '../utils/fs.ts';
-import { deleteChangesets } from './changeset.ts';
+import { deleteBumpFiles } from './bump-file.ts';
import { generateChangelogEntry, prependToChangelog, loadFormatter } from './changelog.ts';
import type { ReleasePlan, WorkspacePackage, BumpyConfig } from '../types.ts';
-/** Apply the release plan: bump versions, update changelogs, delete changesets */
+/** Apply the release plan: bump versions, update changelogs, delete bump files */
export async function applyReleasePlan(
releasePlan: ReleasePlan,
packages: Map,
@@ -41,7 +41,7 @@ export async function applyReleasePlan(
const pkg = packages.get(release.name)!;
const changelogPath = resolve(pkg.dir, 'CHANGELOG.md');
- const entry = await generateChangelogEntry(release, releasePlan.changesets, formatter);
+ const entry = await generateChangelogEntry(release, releasePlan.bumpFiles, formatter);
let existingContent = '';
if (await exists(changelogPath)) {
existingContent = await readText(changelogPath);
@@ -50,9 +50,9 @@ export async function applyReleasePlan(
await writeText(changelogPath, newContent);
}
- // 3. Delete consumed changeset files
- const csIds = releasePlan.changesets.map((cs) => cs.id);
- await deleteChangesets(rootDir, csIds);
+ // 3. Delete consumed bump files
+ const bfIds = releasePlan.bumpFiles.map((bf) => bf.id);
+ await deleteBumpFiles(rootDir, bfIds);
}
/** Update a version range to include a new version, preserving the range prefix */
diff --git a/packages/bumpy/src/core/changeset.ts b/packages/bumpy/src/core/bump-file.ts
similarity index 70%
rename from packages/bumpy/src/core/changeset.ts
rename to packages/bumpy/src/core/bump-file.ts
index 72e90bf..42fca34 100644
--- a/packages/bumpy/src/core/changeset.ts
+++ b/packages/bumpy/src/core/bump-file.ts
@@ -3,38 +3,38 @@ import yaml from 'js-yaml';
import { readText, writeText, listFiles, removeFile } from '../utils/fs.ts';
import { getBumpyDir } from './config.ts';
import { tryRunArgs } from '../utils/shell.ts';
-import type { Changeset, ChangesetRelease, ChangesetReleaseCascade, BumpType, BumpTypeWithIsolated } from '../types.ts';
+import type { BumpFile, BumpFileRelease, BumpFileReleaseCascade, BumpType, BumpTypeWithIsolated } from '../types.ts';
-/** Read all changeset files from .bumpy/ directory, sorted by git creation order */
-export async function readChangesets(rootDir: string): Promise {
+/** Read all bump files from .bumpy/ directory, sorted by git creation order */
+export async function readBumpFiles(rootDir: string): Promise {
const dir = getBumpyDir(rootDir);
const files = await listFiles(dir, '.md');
- const changesets: Changeset[] = [];
+ const bumpFiles: BumpFile[] = [];
for (const file of files) {
if (file === 'README.md') continue;
- const cs = await parseChangesetFile(resolve(dir, file));
- if (cs) changesets.push(cs);
+ const bf = await parseBumpFileFromPath(resolve(dir, file));
+ if (bf) bumpFiles.push(bf);
}
- // Sort by the commit date when each changeset was first added to git.
- // Falls back to filename order for uncommitted changesets.
- const creationOrder = getChangesetCreationOrder(rootDir);
+ // Sort by the commit date when each bump file was first added to git.
+ // Falls back to filename order for uncommitted bump files.
+ const creationOrder = getBumpFileCreationOrder(rootDir);
if (creationOrder.size > 0) {
- changesets.sort((a, b) => {
+ bumpFiles.sort((a, b) => {
const aOrder = creationOrder.get(a.id) ?? Infinity;
const bOrder = creationOrder.get(b.id) ?? Infinity;
return aOrder - bOrder || a.id.localeCompare(b.id);
});
}
- return changesets;
+ return bumpFiles;
}
/**
- * Use `git log` to get the commit timestamp when each changeset file was first added.
- * Returns a map of changeset ID → unix timestamp (seconds).
+ * Use `git log` to get the commit timestamp when each bump file was first added.
+ * Returns a map of bump file ID → unix timestamp (seconds).
*/
-function getChangesetCreationOrder(rootDir: string): Map {
+function getBumpFileCreationOrder(rootDir: string): Map {
const order = new Map();
// git log with --diff-filter=A shows only commits that added files
@@ -62,14 +62,14 @@ function getChangesetCreationOrder(rootDir: string): Map {
return order;
}
-/** Parse a single changeset markdown file */
-export async function parseChangesetFile(filePath: string): Promise {
+/** Parse a single bump file from disk */
+export async function parseBumpFileFromPath(filePath: string): Promise {
const content = await readText(filePath);
- return parseChangeset(content, fileToId(filePath));
+ return parseBumpFile(content, fileToId(filePath));
}
-/** Parse changeset content (for testing) */
-export function parseChangeset(content: string, id: string): Changeset | null {
+/** Parse bump file content (for testing) */
+export function parseBumpFile(content: string, id: string): BumpFile | null {
const match = content.match(/^---\n([\s\S]*?)\n---\n?([\s\S]*)$/);
if (!match) return null;
@@ -79,7 +79,7 @@ export function parseChangeset(content: string, id: string): Changeset | null {
const parsed = yaml.load(frontmatter) as Record;
if (!parsed || typeof parsed !== 'object') return null;
- const releases: ChangesetRelease[] = [];
+ const releases: BumpFileRelease[] = [];
for (const [name, value] of Object.entries(parsed)) {
if (typeof value === 'string') {
// Simple format: "pkg-name": minor
@@ -87,7 +87,7 @@ export function parseChangeset(content: string, id: string): Changeset | null {
} else if (value && typeof value === 'object') {
// Nested format: "pkg-name": { bump: minor, cascade: { ... } }
const obj = value as { bump: BumpTypeWithIsolated; cascade?: Record };
- const release: ChangesetReleaseCascade = {
+ const release: BumpFileReleaseCascade = {
name,
type: obj.bump,
cascade: obj.cascade || {},
@@ -100,11 +100,11 @@ export function parseChangeset(content: string, id: string): Changeset | null {
return { id, releases, summary };
}
-/** Write a changeset file */
-export async function writeChangeset(
+/** Write a bump file */
+export async function writeBumpFile(
rootDir: string,
filename: string,
- releases: ChangesetRelease[],
+ releases: BumpFileRelease[],
summary: string,
): Promise {
const dir = getBumpyDir(rootDir);
@@ -126,8 +126,8 @@ export async function writeChangeset(
return filePath;
}
-/** Delete consumed changeset files */
-export async function deleteChangesets(rootDir: string, ids: string[]): Promise {
+/** Delete consumed bump files */
+export async function deleteBumpFiles(rootDir: string, ids: string[]): Promise {
const dir = getBumpyDir(rootDir);
for (const id of ids) {
await removeFile(resolve(dir, `${id}.md`));
diff --git a/packages/bumpy/src/core/changelog-github.ts b/packages/bumpy/src/core/changelog-github.ts
index 6395b89..a9eb01d 100644
--- a/packages/bumpy/src/core/changelog-github.ts
+++ b/packages/bumpy/src/core/changelog-github.ts
@@ -21,7 +21,7 @@ export function createGithubFormatter(options: GithubChangelogOptions = {}): Cha
const internalAuthorsSet = new Set((options.internalAuthors ?? []).map((a) => a.toLowerCase()));
return async (ctx: ChangelogContext) => {
- const { release, changesets, date } = ctx;
+ const { release, bumpFiles, date } = ctx;
const repoSlug = options.repo ?? detectRepo();
const serverUrl = process.env.GITHUB_SERVER_URL || 'https://github.com';
@@ -31,17 +31,17 @@ export function createGithubFormatter(options: GithubChangelogOptions = {}): Cha
lines.push(`_${date}_`);
lines.push('');
- const relevantChangesets = changesets.filter((cs) => release.changesets.includes(cs.id));
+ const relevantBumpFiles = bumpFiles.filter((bf) => release.bumpFiles.includes(bf.id));
- if (relevantChangesets.length > 0) {
- for (const cs of relevantChangesets) {
- if (!cs.summary) continue;
+ if (relevantBumpFiles.length > 0) {
+ for (const bf of relevantBumpFiles) {
+ if (!bf.summary) continue;
// Extract metadata overrides from summary (pr, commit, author lines)
- const { cleanSummary, overrides } = extractSummaryMeta(cs.summary);
+ const { cleanSummary, overrides } = extractSummaryMeta(bf.summary);
// Look up git/PR info, with overrides taking precedence
- const gitInfo = resolveChangesetInfo(cs.id, repoSlug, serverUrl, overrides);
+ const gitInfo = resolveBumpFileInfo(bf.id, repoSlug, serverUrl, overrides);
const summaryLines = cleanSummary.split('\n');
const firstLine = linkifyIssueRefs(summaryLines[0]!, serverUrl, repoSlug);
@@ -60,11 +60,11 @@ export function createGithubFormatter(options: GithubChangelogOptions = {}): Cha
}
}
- if (release.isDependencyBump && relevantChangesets.length === 0) {
+ if (release.isDependencyBump && relevantBumpFiles.length === 0) {
lines.push('- Updated dependencies');
}
- if (release.isCascadeBump && !release.isDependencyBump && relevantChangesets.length === 0) {
+ if (release.isCascadeBump && !release.isDependencyBump && relevantBumpFiles.length === 0) {
lines.push('- Version bump via cascade rule');
}
@@ -75,7 +75,7 @@ export function createGithubFormatter(options: GithubChangelogOptions = {}): Cha
// ---- Types ----
-interface ChangesetGitInfo {
+interface BumpFileGitInfo {
prNumber?: number;
prUrl?: string;
commitHash?: string;
@@ -88,10 +88,10 @@ interface SummaryOverrides {
authors?: string[];
}
-// ---- Metadata extraction from changeset summary ----
+// ---- Metadata extraction from bump file summary ----
/**
- * Extract metadata lines (pr, commit, author) from a changeset summary.
+ * Extract metadata lines (pr, commit, author) from a bump file summary.
* These override git-derived info, matching the behavior of @changesets/changelog-github.
*/
function extractSummaryMeta(summary: string): { cleanSummary: string; overrides: SummaryOverrides } {
@@ -120,15 +120,15 @@ function extractSummaryMeta(summary: string): { cleanSummary: string; overrides:
// ---- Git/PR info resolution ----
/**
- * Resolve PR, commit, and author info for a changeset.
+ * Resolve PR, commit, and author info for a bump file.
* Summary overrides take precedence over git-derived info.
*/
-function resolveChangesetInfo(
- changesetId: string,
+function resolveBumpFileInfo(
+ bumpFileId: string,
repo: string | undefined,
serverUrl: string,
overrides: SummaryOverrides,
-): ChangesetGitInfo {
+): BumpFileGitInfo {
// If we have a PR override, look it up directly
if (overrides.pr !== undefined) {
const prInfo = lookupPr(overrides.pr, repo);
@@ -140,8 +140,8 @@ function resolveChangesetInfo(
};
}
- // Otherwise, find the commit that added this changeset file
- const gitInfo = findChangesetCommitInfo(changesetId, repo);
+ // Otherwise, find the commit that added this bump file
+ const gitInfo = findBumpFileCommitInfo(bumpFileId, repo);
return {
prNumber: gitInfo?.prNumber,
@@ -172,20 +172,20 @@ function lookupPr(prNumber: number, repo?: string): { url: string; author?: stri
}
/**
- * Find the PR that introduced a changeset file by checking git log
+ * Find the PR that introduced a bump file by checking git log
* for the commit that added the file, then looking up the PR.
*/
-function findChangesetCommitInfo(changesetId: string, repo?: string): ChangesetGitInfo | null {
+function findBumpFileCommitInfo(bumpFileId: string, repo?: string): BumpFileGitInfo | null {
try {
- // Find the commit that added this changeset file
+ // Find the commit that added this bump file
const commitOutput = tryRunArgs([
'git',
'log',
'--diff-filter=A',
'--format=%H',
'--',
- `.bumpy/${changesetId}.md`,
- `.changeset/${changesetId}.md`,
+ `.bumpy/${bumpFileId}.md`,
+ `.changeset/${bumpFileId}.md`,
]);
if (!commitOutput) return null;
@@ -236,7 +236,7 @@ function findChangesetCommitInfo(changesetId: string, repo?: string): ChangesetG
* Matches the format used by @changesets/changelog-github.
*/
function formatPrefix(
- info: ChangesetGitInfo,
+ info: BumpFileGitInfo,
serverUrl: string,
repo: string | undefined,
internalAuthors: Set,
diff --git a/packages/bumpy/src/core/changelog.ts b/packages/bumpy/src/core/changelog.ts
index df1cf20..b14ee77 100644
--- a/packages/bumpy/src/core/changelog.ts
+++ b/packages/bumpy/src/core/changelog.ts
@@ -1,13 +1,13 @@
import { resolve } from 'node:path';
import { log } from '../utils/logger.ts';
-import type { Changeset, PlannedRelease, BumpyConfig } from '../types.ts';
+import type { BumpFile, PlannedRelease, BumpyConfig } from '../types.ts';
// ---- Formatter interface ----
export interface ChangelogContext {
release: PlannedRelease;
- /** Changesets that contributed to this release */
- changesets: Changeset[];
+ /** Bump files that contributed to this release */
+ bumpFiles: BumpFile[];
/** ISO date string (YYYY-MM-DD) */
date: string;
}
@@ -22,19 +22,19 @@ export type ChangelogFormatter = (ctx: ChangelogContext) => string | Promise {
- const { release, changesets, date } = ctx;
+ const { release, bumpFiles, date } = ctx;
const lines: string[] = [];
lines.push(`## ${release.newVersion}`);
lines.push('');
lines.push(`_${date}_`);
lines.push('');
- const relevantChangesets = changesets.filter((cs) => release.changesets.includes(cs.id));
+ const relevantBumpFiles = bumpFiles.filter((bf) => release.bumpFiles.includes(bf.id));
- if (relevantChangesets.length > 0) {
- for (const cs of relevantChangesets) {
- if (cs.summary) {
- const summaryLines = cs.summary.split('\n');
+ if (relevantBumpFiles.length > 0) {
+ for (const bf of relevantBumpFiles) {
+ if (bf.summary) {
+ const summaryLines = bf.summary.split('\n');
lines.push(`- ${summaryLines[0]}`);
for (let i = 1; i < summaryLines.length; i++) {
if (summaryLines[i]!.trim()) {
@@ -45,11 +45,11 @@ export const defaultFormatter: ChangelogFormatter = (ctx) => {
}
}
- if (release.isDependencyBump && relevantChangesets.length === 0) {
+ if (release.isDependencyBump && relevantBumpFiles.length === 0) {
lines.push('- Updated dependencies');
}
- if (release.isCascadeBump && !release.isDependencyBump && relevantChangesets.length === 0) {
+ if (release.isCascadeBump && !release.isDependencyBump && relevantBumpFiles.length === 0) {
lines.push('- Version bump via cascade rule');
}
@@ -131,11 +131,11 @@ export async function loadFormatter(changelog: BumpyConfig['changelog'], rootDir
/** Generate a changelog entry using the configured formatter */
export async function generateChangelogEntry(
release: PlannedRelease,
- changesets: Changeset[],
+ bumpFiles: BumpFile[],
formatter: ChangelogFormatter = defaultFormatter,
date: string = new Date().toISOString().split('T')[0]!,
): Promise {
- return formatter({ release, changesets, date });
+ return formatter({ release, bumpFiles, date });
}
/** Prepend a new entry to an existing CHANGELOG.md content */
diff --git a/packages/bumpy/src/core/github-release.ts b/packages/bumpy/src/core/github-release.ts
index 51174cf..d0a26bb 100644
--- a/packages/bumpy/src/core/github-release.ts
+++ b/packages/bumpy/src/core/github-release.ts
@@ -1,7 +1,7 @@
import { tryRunArgs, runArgsAsync } from '../utils/shell.ts';
import { log } from '../utils/logger.ts';
import { listTags } from './git.ts';
-import type { PlannedRelease, Changeset } from '../types.ts';
+import type { PlannedRelease, BumpFile } from '../types.ts';
/** Get the current HEAD commit SHA */
function getHeadSha(rootDir: string): string | null {
@@ -16,7 +16,7 @@ export interface GitHubReleaseOptions {
/** Create individual GitHub releases for each published package */
export async function createIndividualReleases(
releases: PlannedRelease[],
- changesets: Changeset[],
+ bumpFiles: BumpFile[],
rootDir: string,
opts: GitHubReleaseOptions = {},
): Promise {
@@ -29,7 +29,7 @@ export async function createIndividualReleases(
for (const release of releases) {
const tag = `${release.name}@${release.newVersion}`;
- const body = buildReleaseBody(release, changesets);
+ const body = buildReleaseBody(release, bumpFiles);
const title = `${release.name} v${release.newVersion}`;
if (opts.dryRun) {
@@ -54,7 +54,7 @@ export async function createIndividualReleases(
/** Create a single aggregated GitHub release for all published packages */
export async function createAggregateRelease(
releases: PlannedRelease[],
- changesets: Changeset[],
+ bumpFiles: BumpFile[],
rootDir: string,
opts: GitHubReleaseOptions = {},
): Promise {
@@ -68,7 +68,7 @@ export async function createAggregateRelease(
const date = new Date().toISOString().split('T')[0];
const existing = listTags(`release-${date}*`, { cwd: rootDir });
const { tag, title } = resolveAggregateTagAndTitle(date!, existing, opts.title);
- const body = buildAggregateBody(releases, changesets);
+ const body = buildAggregateBody(releases, bumpFiles);
if (opts.dryRun) {
log.dim(` Would create aggregate GitHub release: ${title}`);
@@ -93,14 +93,14 @@ export async function createAggregateRelease(
}
}
-function buildReleaseBody(release: PlannedRelease, changesets: Changeset[]): string {
+function buildReleaseBody(release: PlannedRelease, bumpFiles: BumpFile[]): string {
const lines: string[] = [];
- const relevant = changesets.filter((cs) => release.changesets.includes(cs.id));
+ const relevant = bumpFiles.filter((bf) => release.bumpFiles.includes(bf.id));
if (relevant.length > 0) {
- for (const cs of relevant) {
- if (cs.summary) {
- lines.push(`- ${cs.summary.split('\n')[0]}`);
+ for (const bf of relevant) {
+ if (bf.summary) {
+ lines.push(`- ${bf.summary.split('\n')[0]}`);
}
}
}
@@ -112,7 +112,7 @@ function buildReleaseBody(release: PlannedRelease, changesets: Changeset[]): str
return lines.join('\n') || 'No changelog entries.';
}
-function buildAggregateBody(releases: PlannedRelease[], changesets: Changeset[]): string {
+function buildAggregateBody(releases: PlannedRelease[], bumpFiles: BumpFile[]): string {
const lines: string[] = [];
// Group by bump type
@@ -128,11 +128,11 @@ function buildAggregateBody(releases: PlannedRelease[], changesets: Changeset[])
for (const release of group) {
lines.push(`### ${release.name} v${release.newVersion}\n`);
- const relevant = changesets.filter((cs) => release.changesets.includes(cs.id));
+ const relevant = bumpFiles.filter((bf) => release.bumpFiles.includes(bf.id));
if (relevant.length > 0) {
- for (const cs of relevant) {
- if (cs.summary) {
- lines.push(`- ${cs.summary.split('\n')[0]}`);
+ for (const bf of relevant) {
+ if (bf.summary) {
+ lines.push(`- ${bf.summary.split('\n')[0]}`);
}
}
} else if (release.isDependencyBump) {
diff --git a/packages/bumpy/src/core/release-plan.ts b/packages/bumpy/src/core/release-plan.ts
index f4fea3d..ec4de9d 100644
--- a/packages/bumpy/src/core/release-plan.ts
+++ b/packages/bumpy/src/core/release-plan.ts
@@ -4,7 +4,7 @@ import { bumpVersion, satisfies } from './semver.ts';
import {
type BumpyConfig,
type BumpType,
- type Changeset,
+ type BumpFile,
type DependencyBumpRule,
type DepType,
type PlannedRelease,
@@ -20,15 +20,15 @@ import {
interface PlannedBump {
type: BumpType;
isolated: boolean;
- /** Explicit 'none' from changeset — suppresses propagation bumps */
+ /** Explicit 'none' from bump file — suppresses propagation bumps */
suppressed: boolean;
isDependencyBump: boolean;
isCascadeBump: boolean;
- changesets: Set;
+ bumpFiles: Set;
}
/**
- * Build a release plan from pending changesets, the dependency graph, and config.
+ * Build a release plan from pending bump files, the dependency graph, and config.
* This is the core algorithm of bumpy.
*
* The propagation loop runs three phases until stable:
@@ -37,24 +37,24 @@ interface PlannedBump {
* Phase C — apply cascades and proactive propagation rules
*/
export function assembleReleasePlan(
- changesets: Changeset[],
+ bumpFiles: BumpFile[],
packages: Map,
depGraph: DependencyGraph,
config: BumpyConfig,
): ReleasePlan {
- if (changesets.length === 0) {
- return { changesets: [], releases: [], warnings: [] };
+ if (bumpFiles.length === 0) {
+ return { bumpFiles: [], releases: [], warnings: [] };
}
const planned = new Map();
const warnings: string[] = [];
- // Step 1: Collect explicit bumps from changesets
+ // Step 1: Collect explicit bumps from bump files
const cascadeOverrides = new Map>(); // pkg → (glob → bumpType)
const suppressedPackages = new Set(); // packages with explicit 'none'
- for (const cs of changesets) {
- for (const release of cs.releases) {
+ for (const bf of bumpFiles) {
+ for (const release of bf.releases) {
if (!packages.has(release.name)) continue;
const { bump, isolated } = parseIsolatedBump(release.type);
@@ -66,9 +66,9 @@ export function assembleReleasePlan(
const existing = planned.get(release.name);
if (existing) {
existing.type = maxBump(existing.type, bump);
- // If ANY changeset is non-isolated, the package is non-isolated
+ // If ANY bump file is non-isolated, the package is non-isolated
if (!isolated) existing.isolated = false;
- existing.changesets.add(cs.id);
+ existing.bumpFiles.add(bf.id);
} else {
planned.set(release.name, {
type: bump,
@@ -76,11 +76,11 @@ export function assembleReleasePlan(
suppressed: false,
isDependencyBump: false,
isCascadeBump: false,
- changesets: new Set([cs.id]),
+ bumpFiles: new Set([bf.id]),
});
}
- // Collect per-changeset cascade overrides
+ // Collect per-bump-file cascade overrides
if (hasCascade(release)) {
if (!cascadeOverrides.has(release.name)) {
cascadeOverrides.set(release.name, new Map());
@@ -94,7 +94,7 @@ export function assembleReleasePlan(
}
}
- // Mark suppressed packages (explicit 'none' in changeset)
+ // Mark suppressed packages (explicit 'none' in bump file)
for (const name of suppressedPackages) {
if (!planned.has(name)) {
// Create a placeholder that will be removed later
@@ -105,7 +105,7 @@ export function assembleReleasePlan(
suppressed: true,
isDependencyBump: false,
isCascadeBump: false,
- changesets: new Set(),
+ bumpFiles: new Set(),
});
}
}
@@ -149,7 +149,7 @@ export function assembleReleasePlan(
const existingDep = planned.get(dep.name);
if (existingDep?.suppressed) {
throw new Error(
- `Cannot suppress bump for '${dep.name}' (via 'none' in changeset) — ` +
+ `Cannot suppress bump for '${dep.name}' (via 'none' in bump file) — ` +
`'${pkgName}' is bumping to ${newVersion} which breaks the declared range '${dep.versionRange}'. ` +
`Either widen the range or remove the 'none' entry.`,
);
@@ -160,7 +160,7 @@ export function assembleReleasePlan(
throw new Error(
`'patch-isolated' bump for '${pkgName}' would break the range '${dep.versionRange}' ` +
`declared by '${dep.name}'. Either widen the range, drop '-isolated', ` +
- `or explicitly bump '${dep.name}' in the changeset.`,
+ `or explicitly bump '${dep.name}' in the bump file.`,
);
}
@@ -180,7 +180,7 @@ export function assembleReleasePlan(
}
}
- if (applyBump(planned, dep.name, depBump, true, false, bump.changesets)) {
+ if (applyBump(planned, dep.name, depBump, true, false, bump.bumpFiles)) {
changed = true;
}
}
@@ -219,7 +219,7 @@ export function assembleReleasePlan(
suppressed: false,
isDependencyBump: false,
isCascadeBump: false,
- changesets: new Set(),
+ bumpFiles: new Set(),
});
changed = true;
}
@@ -264,15 +264,15 @@ export function assembleReleasePlan(
continue;
}
- // C1: Apply changeset-level cascade overrides
- const csOverrides = cascadeOverrides.get(pkgName);
- if (csOverrides) {
- for (const [pattern, cascadeBumpType] of csOverrides) {
+ // C1: Apply bump-file-level cascade overrides
+ const bfOverrides = cascadeOverrides.get(pkgName);
+ if (bfOverrides) {
+ for (const [pattern, cascadeBumpType] of bfOverrides) {
for (const [targetName] of packages) {
if (!matchGlob(targetName, pattern)) continue;
const existingTarget = planned.get(targetName);
if (existingTarget?.suppressed) continue;
- if (applyBump(planned, targetName, cascadeBumpType, false, true, bump.changesets)) {
+ if (applyBump(planned, targetName, cascadeBumpType, false, true, bump.bumpFiles)) {
changed = true;
}
}
@@ -290,7 +290,7 @@ export function assembleReleasePlan(
if (!matchGlob(targetName, pattern)) continue;
const existingTarget = planned.get(targetName);
if (existingTarget?.suppressed) continue;
- if (applyBump(planned, targetName, cascadeBump, false, true, bump.changesets)) {
+ if (applyBump(planned, targetName, cascadeBump, false, true, bump.bumpFiles)) {
changed = true;
}
}
@@ -308,26 +308,26 @@ export function assembleReleasePlan(
if (existingDep?.suppressed) continue;
const depBump = rule.bumpAs === 'match' ? bump.type : rule.bumpAs;
- if (applyBump(planned, dep.name, depBump, true, false, bump.changesets)) {
+ if (applyBump(planned, dep.name, depBump, true, false, bump.bumpFiles)) {
changed = true;
}
}
}
} else {
- // Even in out-of-range mode, still apply changeset cascades and cascadeTo
+ // Even in out-of-range mode, still apply bump file cascades and cascadeTo
for (const [pkgName, bump] of planned) {
if (bump.suppressed) continue;
if (bump.isolated) continue;
- // Changeset-level cascade overrides always apply
- const csOverrides = cascadeOverrides.get(pkgName);
- if (csOverrides) {
- for (const [pattern, cascadeBumpType] of csOverrides) {
+ // Bump-file-level cascade overrides always apply
+ const bfOverrides = cascadeOverrides.get(pkgName);
+ if (bfOverrides) {
+ for (const [pattern, cascadeBumpType] of bfOverrides) {
for (const [targetName] of packages) {
if (!matchGlob(targetName, pattern)) continue;
const existingTarget = planned.get(targetName);
if (existingTarget?.suppressed) continue;
- if (applyBump(planned, targetName, cascadeBumpType, false, true, bump.changesets)) {
+ if (applyBump(planned, targetName, cascadeBumpType, false, true, bump.bumpFiles)) {
changed = true;
}
}
@@ -345,7 +345,7 @@ export function assembleReleasePlan(
if (!matchGlob(targetName, pattern)) continue;
const existingTarget = planned.get(targetName);
if (existingTarget?.suppressed) continue;
- if (applyBump(planned, targetName, cascadeBump, false, true, bump.changesets)) {
+ if (applyBump(planned, targetName, cascadeBump, false, true, bump.bumpFiles)) {
changed = true;
}
}
@@ -372,7 +372,7 @@ export function assembleReleasePlan(
if (!range) continue;
if (!satisfies(newDepVersion, range, depPkg.version)) {
throw new Error(
- `Cannot suppress bump for '${name}' (via 'none' in changeset) — ` +
+ `Cannot suppress bump for '${name}' (via 'none' in bump file) — ` +
`'${depName}' is bumping to ${newDepVersion} which breaks the declared range '${range}'. ` +
`Either widen the range or remove the 'none' entry.`,
);
@@ -394,7 +394,7 @@ export function assembleReleasePlan(
type: bump.type,
oldVersion: pkg.version,
newVersion,
- changesets: [...bump.changesets],
+ bumpFiles: [...bump.bumpFiles],
isDependencyBump: bump.isDependencyBump,
isCascadeBump: bump.isCascadeBump,
});
@@ -415,7 +415,7 @@ export function assembleReleasePlan(
}
}
- return { changesets, releases, warnings };
+ return { bumpFiles, releases, warnings };
}
/** Apply a bump to a package, upgrading if already planned. Returns true if anything changed. */
@@ -425,7 +425,7 @@ function applyBump(
type: BumpType,
isDependencyBump: boolean,
isCascadeBump: boolean,
- sourceChangesets: Set,
+ sourceBumpFiles: Set,
): boolean {
const existing = planned.get(name);
if (existing) {
@@ -435,7 +435,7 @@ function applyBump(
existing.type = newType;
if (isDependencyBump) existing.isDependencyBump = true;
if (isCascadeBump) existing.isCascadeBump = true;
- for (const cs of sourceChangesets) existing.changesets.add(cs);
+ for (const bf of sourceBumpFiles) existing.bumpFiles.add(bf);
return true;
}
planned.set(name, {
@@ -444,7 +444,7 @@ function applyBump(
suppressed: false,
isDependencyBump,
isCascadeBump,
- changesets: new Set(sourceChangesets),
+ bumpFiles: new Set(sourceBumpFiles),
});
return true;
}
diff --git a/packages/bumpy/src/index.ts b/packages/bumpy/src/index.ts
index 2dba2b7..9245d2e 100644
--- a/packages/bumpy/src/index.ts
+++ b/packages/bumpy/src/index.ts
@@ -2,7 +2,7 @@
export { loadConfig, findRoot, getBumpyDir, matchGlob } from './core/config.ts';
export { discoverPackages } from './core/workspace.ts';
export { DependencyGraph } from './core/dep-graph.ts';
-export { readChangesets, parseChangeset, writeChangeset } from './core/changeset.ts';
+export { readBumpFiles, parseBumpFile, writeBumpFile } from './core/bump-file.ts';
export { assembleReleasePlan } from './core/release-plan.ts';
export { applyReleasePlan } from './core/apply-release-plan.ts';
export { generateChangelogEntry, loadFormatter, defaultFormatter, prependToChangelog } from './core/changelog.ts';
diff --git a/packages/bumpy/src/types.ts b/packages/bumpy/src/types.ts
index b9fad89..973b6a0 100644
--- a/packages/bumpy/src/types.ts
+++ b/packages/bumpy/src/types.ts
@@ -145,34 +145,34 @@ export const DEFAULT_CONFIG: BumpyConfig = {
preamble: [
`
`,
'',
- `This PR was created and will be kept in sync by [bumpy](${__BUMPY_WEBSITE_URL__}) based on your .bumpy changeset files. Merge it when you are ready to release the packages listed below:`,
+ `This PR was created and will be kept in sync by [bumpy](${__BUMPY_WEBSITE_URL__}) based on your .bumpy bump files. Merge it when you are ready to release the packages listed below:`,
'
',
].join('\n'),
},
};
-// ---- Changeset ----
+// ---- Bump file ----
-export interface ChangesetReleaseSimple {
+export interface BumpFileReleaseSimple {
name: string;
type: BumpTypeWithIsolated;
}
-export interface ChangesetReleaseCascade {
+export interface BumpFileReleaseCascade {
name: string;
type: BumpTypeWithIsolated;
cascade: Record; // glob pattern → bump type
}
-export type ChangesetRelease = ChangesetReleaseSimple | ChangesetReleaseCascade;
+export type BumpFileRelease = BumpFileReleaseSimple | BumpFileReleaseCascade;
-export function hasCascade(r: ChangesetRelease): r is ChangesetReleaseCascade {
+export function hasCascade(r: BumpFileRelease): r is BumpFileReleaseCascade {
return 'cascade' in r && Object.keys(r.cascade).length > 0;
}
-export interface Changeset {
+export interface BumpFile {
id: string; // filename without .md
- releases: ChangesetRelease[];
+ releases: BumpFileRelease[];
summary: string; // markdown body
}
@@ -210,13 +210,13 @@ export interface PlannedRelease {
type: BumpType;
oldVersion: string;
newVersion: string;
- changesets: string[]; // changeset IDs that contributed
+ bumpFiles: string[]; // bump file IDs that contributed
isDependencyBump: boolean;
isCascadeBump: boolean;
}
export interface ReleasePlan {
- changesets: Changeset[];
+ bumpFiles: BumpFile[];
releases: PlannedRelease[];
warnings: string[];
}
diff --git a/packages/bumpy/src/utils/names.ts b/packages/bumpy/src/utils/names.ts
index 33c1d3b..d378834 100644
--- a/packages/bumpy/src/utils/names.ts
+++ b/packages/bumpy/src/utils/names.ts
@@ -1,4 +1,4 @@
-/** Generate a random adjective-noun name for changeset files */
+/** Generate a random adjective-noun name for bump files */
export function randomName(): string {
const pick = (arr: T[]) => arr[Math.floor(Math.random() * arr.length)]!;
return `${pick(ADJECTIVES)}-${pick(ADJECTIVES)}-${pick(NOUNS)}`;
diff --git a/packages/bumpy/test/core/apply-release-plan.test.ts b/packages/bumpy/test/core/apply-release-plan.test.ts
index fb44b77..cacfa9d 100644
--- a/packages/bumpy/test/core/apply-release-plan.test.ts
+++ b/packages/bumpy/test/core/apply-release-plan.test.ts
@@ -4,7 +4,7 @@ import { readFile, writeFile } from 'node:fs/promises';
import { mkdtemp, rm } from 'node:fs/promises';
import { tmpdir } from 'node:os';
import { writeJson, readJson, readText, writeText, ensureDir, exists } from '../../src/utils/fs.ts';
-import { makeRelease, makeChangeset, makeReleasePlan, makeConfig } from '../helpers.ts';
+import { makeRelease, makeBumpFile, makeReleasePlan, makeConfig } from '../helpers.ts';
import { applyReleasePlan } from '../../src/core/apply-release-plan.ts';
import type { WorkspacePackage } from '../../src/types.ts';
@@ -43,18 +43,18 @@ describe('applyReleasePlan', () => {
optionalDependencies: {},
});
- const changeset = makeChangeset('cs1', [{ name: 'pkg-a', type: 'minor' }], 'New feature');
+ const bumpFile = makeBumpFile('cs1', [{ name: 'pkg-a', type: 'minor' }], 'New feature');
const release = makeRelease('pkg-a', '1.1.0', {
type: 'minor',
oldVersion: '1.0.0',
- changesets: ['cs1'],
+ bumpFiles: ['cs1'],
});
// Create the .bumpy dir with changeset file
await ensureDir(resolve(tmpDir, '.bumpy'));
await writeText(resolve(tmpDir, '.bumpy/cs1.md'), '---\n"pkg-a": minor\n---\n\nNew feature\n');
- await applyReleasePlan(makeReleasePlan([release], [changeset]), packages, tmpDir, makeConfig());
+ await applyReleasePlan(makeReleasePlan([release], [bumpFile]), packages, tmpDir, makeConfig());
const pkgJson = await readJson>(resolve(pkgDir, 'package.json'));
expect(pkgJson.version).toBe('1.1.0');
@@ -77,16 +77,16 @@ describe('applyReleasePlan', () => {
optionalDependencies: {},
});
- const changeset = makeChangeset('cs1', [{ name: 'pkg-a', type: 'patch' }], 'Bug fix');
+ const bumpFile = makeBumpFile('cs1', [{ name: 'pkg-a', type: 'patch' }], 'Bug fix');
const release = makeRelease('pkg-a', '1.0.1', {
oldVersion: '1.0.0',
- changesets: ['cs1'],
+ bumpFiles: ['cs1'],
});
await ensureDir(resolve(tmpDir, '.bumpy'));
await writeText(resolve(tmpDir, '.bumpy/cs1.md'), '---\n"pkg-a": patch\n---\n\nBug fix\n');
- await applyReleasePlan(makeReleasePlan([release], [changeset]), packages, tmpDir, makeConfig());
+ await applyReleasePlan(makeReleasePlan([release], [bumpFile]), packages, tmpDir, makeConfig());
const changelogPath = resolve(pkgDir, 'CHANGELOG.md');
expect(await exists(changelogPath)).toBe(true);
@@ -113,17 +113,17 @@ describe('applyReleasePlan', () => {
optionalDependencies: {},
});
- const changeset = makeChangeset('cs1', [{ name: 'pkg-a', type: 'minor' }], 'Feature');
+ const bumpFile = makeBumpFile('cs1', [{ name: 'pkg-a', type: 'minor' }], 'Feature');
const release = makeRelease('pkg-a', '1.1.0', {
type: 'minor',
oldVersion: '1.0.0',
- changesets: ['cs1'],
+ bumpFiles: ['cs1'],
});
await ensureDir(resolve(tmpDir, '.bumpy'));
await writeText(resolve(tmpDir, '.bumpy/cs1.md'), '---\n"pkg-a": minor\n---\n\nFeature\n');
- await applyReleasePlan(makeReleasePlan([release], [changeset]), packages, tmpDir, makeConfig());
+ await applyReleasePlan(makeReleasePlan([release], [bumpFile]), packages, tmpDir, makeConfig());
const content = await readText(resolve(pkgDir, 'CHANGELOG.md'));
// New entry should be before old entry
@@ -165,11 +165,11 @@ describe('applyReleasePlan', () => {
optionalDependencies: {},
});
- const changeset = makeChangeset('cs1', [{ name: 'core', type: 'major' }], 'Breaking');
+ const bumpFile = makeBumpFile('cs1', [{ name: 'core', type: 'major' }], 'Breaking');
const coreRelease = makeRelease('core', '2.0.0', {
type: 'major',
oldVersion: '1.0.0',
- changesets: ['cs1'],
+ bumpFiles: ['cs1'],
});
const appRelease = makeRelease('app', '1.0.1', {
oldVersion: '1.0.0',
@@ -179,7 +179,7 @@ describe('applyReleasePlan', () => {
await ensureDir(resolve(tmpDir, '.bumpy'));
await writeText(resolve(tmpDir, '.bumpy/cs1.md'), '---\n"core": major\n---\n\nBreaking\n');
- await applyReleasePlan(makeReleasePlan([coreRelease, appRelease], [changeset]), packages, tmpDir, makeConfig());
+ await applyReleasePlan(makeReleasePlan([coreRelease, appRelease], [bumpFile]), packages, tmpDir, makeConfig());
const appPkg = await readJson>(resolve(appDir, 'package.json'));
const deps = appPkg.dependencies as Record;
@@ -262,17 +262,17 @@ describe('applyReleasePlan', () => {
optionalDependencies: {},
});
- const changeset = makeChangeset('cs1', [{ name: 'pkg-a', type: 'minor' }], 'New feature');
+ const bumpFile = makeBumpFile('cs1', [{ name: 'pkg-a', type: 'minor' }], 'New feature');
const release = makeRelease('pkg-a', '1.1.0', {
type: 'minor',
oldVersion: '1.0.0',
- changesets: ['cs1'],
+ bumpFiles: ['cs1'],
});
await ensureDir(resolve(tmpDir, '.bumpy'));
await writeText(resolve(tmpDir, '.bumpy/cs1.md'), '---\n"pkg-a": minor\n---\n\nNew feature\n');
- await applyReleasePlan(makeReleasePlan([release], [changeset]), packages, tmpDir, makeConfig());
+ await applyReleasePlan(makeReleasePlan([release], [bumpFile]), packages, tmpDir, makeConfig());
const result = await readFile(resolve(pkgDir, 'package.json'), 'utf-8');
// Version should be updated
@@ -336,14 +336,14 @@ describe('applyReleasePlan', () => {
optionalDependencies: {},
});
- const changeset = makeChangeset('cs1', [{ name: 'core', type: 'major' }], 'Breaking');
- const coreRelease = makeRelease('core', '2.0.0', { type: 'major', oldVersion: '1.0.0', changesets: ['cs1'] });
+ const bumpFile = makeBumpFile('cs1', [{ name: 'core', type: 'major' }], 'Breaking');
+ const coreRelease = makeRelease('core', '2.0.0', { type: 'major', oldVersion: '1.0.0', bumpFiles: ['cs1'] });
const appRelease = makeRelease('app', '1.0.1', { oldVersion: '1.0.0', isDependencyBump: true });
await ensureDir(resolve(tmpDir, '.bumpy'));
await writeText(resolve(tmpDir, '.bumpy/cs1.md'), '---\n"core": major\n---\n\nBreaking\n');
- await applyReleasePlan(makeReleasePlan([coreRelease, appRelease], [changeset]), packages, tmpDir, makeConfig());
+ await applyReleasePlan(makeReleasePlan([coreRelease, appRelease], [bumpFile]), packages, tmpDir, makeConfig());
const result = await readFile(resolve(appDir, 'package.json'), 'utf-8');
// Version should be updated
@@ -359,7 +359,7 @@ describe('applyReleasePlan', () => {
expect(result).toContain('"lodash": "^4.17.0"');
});
- test('deletes consumed changeset files', async () => {
+ test('deletes consumed bump files', async () => {
const pkgDir = await setupPackage('pkg-a', '1.0.0');
const packages = new Map();
@@ -376,10 +376,10 @@ describe('applyReleasePlan', () => {
optionalDependencies: {},
});
- const changeset = makeChangeset('cs-to-delete', [{ name: 'pkg-a', type: 'patch' }], 'Fix');
+ const bumpFile = makeBumpFile('cs-to-delete', [{ name: 'pkg-a', type: 'patch' }], 'Fix');
const release = makeRelease('pkg-a', '1.0.1', {
oldVersion: '1.0.0',
- changesets: ['cs-to-delete'],
+ bumpFiles: ['cs-to-delete'],
});
await ensureDir(resolve(tmpDir, '.bumpy'));
@@ -387,7 +387,7 @@ describe('applyReleasePlan', () => {
await writeText(csPath, '---\n"pkg-a": patch\n---\n\nFix\n');
expect(await exists(csPath)).toBe(true);
- await applyReleasePlan(makeReleasePlan([release], [changeset]), packages, tmpDir, makeConfig());
+ await applyReleasePlan(makeReleasePlan([release], [bumpFile]), packages, tmpDir, makeConfig());
expect(await exists(csPath)).toBe(false);
});
diff --git a/packages/bumpy/test/core/bump-file.test.ts b/packages/bumpy/test/core/bump-file.test.ts
new file mode 100644
index 0000000..9f47e8a
--- /dev/null
+++ b/packages/bumpy/test/core/bump-file.test.ts
@@ -0,0 +1,111 @@
+import { test, expect, describe } from 'bun:test';
+import { parseBumpFile } from '../../src/core/bump-file.ts';
+
+describe('parseBumpFile', () => {
+ test('parses simple format', () => {
+ const content = `---
+"pkg-a": minor
+"pkg-b": patch
+---
+
+Added a new feature to pkg-a
+`;
+ const bf = parseBumpFile(content, 'test-bf');
+ expect(bf).not.toBeNull();
+ expect(bf!.id).toBe('test-bf');
+ expect(bf!.releases).toHaveLength(2);
+ expect(bf!.releases[0]!.name).toBe('pkg-a');
+ expect(bf!.releases[0]!.type).toBe('minor');
+ expect(bf!.releases[1]!.name).toBe('pkg-b');
+ expect(bf!.releases[1]!.type).toBe('patch');
+ expect(bf!.summary).toBe('Added a new feature to pkg-a');
+ });
+
+ test('parses patch-isolated bump type', () => {
+ const content = `---
+"pkg-a": patch-isolated
+---
+
+Internal change
+`;
+ const bf = parseBumpFile(content, 'test-bf');
+ expect(bf!.releases[0]!.type).toBe('patch-isolated');
+ });
+
+ test('parses none bump type', () => {
+ const content = `---
+"pkg-a": minor
+"pkg-b": none
+---
+
+Feature in pkg-a, suppress bump on pkg-b
+`;
+ const bf = parseBumpFile(content, 'test-bf');
+ expect(bf!.releases).toHaveLength(2);
+ expect(bf!.releases[0]!.type).toBe('minor');
+ expect(bf!.releases[1]!.type).toBe('none');
+ });
+
+ test('parses nested format with cascade', () => {
+ const content = `---
+"@myorg/core":
+ bump: minor
+ cascade:
+ "plugins/*": patch
+ "@myorg/cli": minor
+---
+
+Added encryption provider
+`;
+ const bf = parseBumpFile(content, 'test-bf');
+ expect(bf).not.toBeNull();
+ expect(bf!.releases).toHaveLength(1);
+ const release = bf!.releases[0]! as any;
+ expect(release.name).toBe('@myorg/core');
+ expect(release.type).toBe('minor');
+ expect(release.cascade).toEqual({
+ 'plugins/*': 'patch',
+ '@myorg/cli': 'minor',
+ });
+ });
+
+ test('parses mixed simple and nested', () => {
+ const content = `---
+"@myorg/core":
+ bump: minor
+ cascade:
+ "plugins/*": patch
+"@myorg/utils": patch
+---
+
+Mixed changes
+`;
+ const bf = parseBumpFile(content, 'test-bf');
+ expect(bf!.releases).toHaveLength(2);
+ expect(bf!.releases[0]!.name).toBe('@myorg/core');
+ expect(bf!.releases[1]!.name).toBe('@myorg/utils');
+ expect(bf!.releases[1]!.type).toBe('patch');
+ });
+
+ test('returns null for invalid content', () => {
+ expect(parseBumpFile('no frontmatter here', 'bad')).toBeNull();
+ expect(parseBumpFile('---\n---\n', 'empty')).toBeNull();
+ });
+
+ test('handles multi-line summary', () => {
+ const content = `---
+"pkg-a": minor
+---
+
+First line
+
+Second paragraph with more details.
+
+- bullet point
+`;
+ const bf = parseBumpFile(content, 'test-bf');
+ expect(bf!.summary).toContain('First line');
+ expect(bf!.summary).toContain('Second paragraph');
+ expect(bf!.summary).toContain('- bullet point');
+ });
+});
diff --git a/packages/bumpy/test/core/changelog-github.test.ts b/packages/bumpy/test/core/changelog-github.test.ts
index 5a2dc84..fa23072 100644
--- a/packages/bumpy/test/core/changelog-github.test.ts
+++ b/packages/bumpy/test/core/changelog-github.test.ts
@@ -1,5 +1,5 @@
import { test, expect, describe, beforeEach, afterEach } from 'bun:test';
-import { makeRelease, makeChangeset } from '../helpers.ts';
+import { makeRelease, makeBumpFile } from '../helpers.ts';
import { installShellMock, uninstallShellMock, addMockRule } from '../helpers-shell-mock.ts';
import { createGithubFormatter } from '../../src/core/changelog-github.ts';
@@ -19,18 +19,18 @@ describe('createGithubFormatter', () => {
const formatter = createGithubFormatter({ repo: 'dmno-dev/bumpy' });
const release = makeRelease('pkg-a', '1.1.0', {
type: 'minor',
- changesets: ['cs1'],
+ bumpFiles: ['cs1'],
});
- const changesets = [makeChangeset('cs1', [{ name: 'pkg-a', type: 'minor' }], 'Added feature X')];
+ const bumpFiles = [makeBumpFile('cs1', [{ name: 'pkg-a', type: 'minor' }], 'Added feature X')];
- const result = await formatter({ release, changesets, date: '2026-04-14' });
+ const result = await formatter({ release, bumpFiles, date: '2026-04-14' });
expect(result).toContain('## 1.1.0');
expect(result).toContain('_2026-04-14_');
expect(result).toContain('Added feature X');
});
- test('includes PR link when changeset has PR metadata', async () => {
+ test('includes PR link when bump file has PR metadata', async () => {
addMockRule({ match: /^git log/, response: '' });
addMockRule({
match: /gh pr view 42/,
@@ -42,23 +42,23 @@ describe('createGithubFormatter', () => {
});
const formatter = createGithubFormatter({ repo: 'dmno-dev/bumpy' });
- const release = makeRelease('pkg-a', '1.0.1', { changesets: ['cs1'] });
- const changesets = [makeChangeset('cs1', [{ name: 'pkg-a', type: 'patch' }], 'pr: #42\nFixed the bug')];
+ const release = makeRelease('pkg-a', '1.0.1', { bumpFiles: ['cs1'] });
+ const bumpFiles = [makeBumpFile('cs1', [{ name: 'pkg-a', type: 'patch' }], 'pr: #42\nFixed the bug')];
- const result = await formatter({ release, changesets, date: '2026-04-14' });
+ const result = await formatter({ release, bumpFiles, date: '2026-04-14' });
expect(result).toContain('[#42]');
expect(result).toContain('https://github.com/dmno-dev/bumpy/pull/42');
});
- test('includes commit link when changeset has commit metadata', async () => {
+ test('includes commit link when bump file has commit metadata', async () => {
addMockRule({ match: /^git log/, response: '' });
const formatter = createGithubFormatter({ repo: 'dmno-dev/bumpy' });
- const release = makeRelease('pkg-a', '1.0.1', { changesets: ['cs1'] });
- const changesets = [makeChangeset('cs1', [{ name: 'pkg-a', type: 'patch' }], 'commit: abc1234567890\nFixed it')];
+ const release = makeRelease('pkg-a', '1.0.1', { bumpFiles: ['cs1'] });
+ const bumpFiles = [makeBumpFile('cs1', [{ name: 'pkg-a', type: 'patch' }], 'commit: abc1234567890\nFixed it')];
- const result = await formatter({ release, changesets, date: '2026-04-14' });
+ const result = await formatter({ release, bumpFiles, date: '2026-04-14' });
expect(result).toContain('[`abc1234`]');
expect(result).toContain('/commit/abc1234567890');
@@ -71,10 +71,10 @@ describe('createGithubFormatter', () => {
repo: 'dmno-dev/bumpy',
internalAuthors: ['theoephraim'],
});
- const release = makeRelease('pkg-a', '1.0.1', { changesets: ['cs1'] });
- const changesets = [makeChangeset('cs1', [{ name: 'pkg-a', type: 'patch' }], 'author: @external-dev\nFixed it')];
+ const release = makeRelease('pkg-a', '1.0.1', { bumpFiles: ['cs1'] });
+ const bumpFiles = [makeBumpFile('cs1', [{ name: 'pkg-a', type: 'patch' }], 'author: @external-dev\nFixed it')];
- const result = await formatter({ release, changesets, date: '2026-04-14' });
+ const result = await formatter({ release, bumpFiles, date: '2026-04-14' });
expect(result).toContain('Thanks [@external-dev]');
});
@@ -86,10 +86,10 @@ describe('createGithubFormatter', () => {
repo: 'dmno-dev/bumpy',
internalAuthors: ['theoephraim'],
});
- const release = makeRelease('pkg-a', '1.0.1', { changesets: ['cs1'] });
- const changesets = [makeChangeset('cs1', [{ name: 'pkg-a', type: 'patch' }], 'author: @theoephraim\nFixed it')];
+ const release = makeRelease('pkg-a', '1.0.1', { bumpFiles: ['cs1'] });
+ const bumpFiles = [makeBumpFile('cs1', [{ name: 'pkg-a', type: 'patch' }], 'author: @theoephraim\nFixed it')];
- const result = await formatter({ release, changesets, date: '2026-04-14' });
+ const result = await formatter({ release, bumpFiles, date: '2026-04-14' });
expect(result).not.toContain('Thanks');
});
@@ -98,10 +98,10 @@ describe('createGithubFormatter', () => {
addMockRule({ match: /^git log/, response: '' });
const formatter = createGithubFormatter({ repo: 'dmno-dev/bumpy' });
- const release = makeRelease('pkg-a', '1.0.1', { changesets: ['cs1'] });
- const changesets = [makeChangeset('cs1', [{ name: 'pkg-a', type: 'patch' }], 'Fixed #123 and #456')];
+ const release = makeRelease('pkg-a', '1.0.1', { bumpFiles: ['cs1'] });
+ const bumpFiles = [makeBumpFile('cs1', [{ name: 'pkg-a', type: 'patch' }], 'Fixed #123 and #456')];
- const result = await formatter({ release, changesets, date: '2026-04-14' });
+ const result = await formatter({ release, bumpFiles, date: '2026-04-14' });
expect(result).toContain('[#123](https://github.com/dmno-dev/bumpy/issues/123)');
expect(result).toContain('[#456](https://github.com/dmno-dev/bumpy/issues/456)');
@@ -111,42 +111,42 @@ describe('createGithubFormatter', () => {
addMockRule({ match: /^git log/, response: '' });
const formatter = createGithubFormatter({ repo: 'dmno-dev/bumpy' });
- const release = makeRelease('pkg-a', '1.0.1', { changesets: ['cs1'] });
- const changesets = [
- makeChangeset('cs1', [{ name: 'pkg-a', type: 'patch' }], 'Fixed [#123](https://example.com/123)'),
+ const release = makeRelease('pkg-a', '1.0.1', { bumpFiles: ['cs1'] });
+ const bumpFiles = [
+ makeBumpFile('cs1', [{ name: 'pkg-a', type: 'patch' }], 'Fixed [#123](https://example.com/123)'),
];
- const result = await formatter({ release, changesets, date: '2026-04-14' });
+ const result = await formatter({ release, bumpFiles, date: '2026-04-14' });
expect(result).toContain('[#123](https://example.com/123)');
expect(result).not.toContain('issues/123');
});
- test('handles dependency bump with no changesets', async () => {
+ test('handles dependency bump with no bump files', async () => {
const formatter = createGithubFormatter({ repo: 'dmno-dev/bumpy' });
const release = makeRelease('pkg-a', '1.0.1', {
isDependencyBump: true,
- changesets: [],
+ bumpFiles: [],
});
- const result = await formatter({ release, changesets: [], date: '2026-04-14' });
+ const result = await formatter({ release, bumpFiles: [], date: '2026-04-14' });
expect(result).toContain('- Updated dependencies');
});
- test('handles cascade bump with no changesets', async () => {
+ test('handles cascade bump with no bump files', async () => {
const formatter = createGithubFormatter({ repo: 'dmno-dev/bumpy' });
const release = makeRelease('pkg-a', '1.0.1', {
isCascadeBump: true,
- changesets: [],
+ bumpFiles: [],
});
- const result = await formatter({ release, changesets: [], date: '2026-04-14' });
+ const result = await formatter({ release, bumpFiles: [], date: '2026-04-14' });
expect(result).toContain('- Version bump via cascade rule');
});
- test('resolves changeset info from git log', async () => {
+ test('resolves bump file info from git log', async () => {
addMockRule({
match: /git log.*\.bumpy\/cs1\.md/,
response: 'deadbeef1234567890abcdef',
@@ -161,10 +161,10 @@ describe('createGithubFormatter', () => {
});
const formatter = createGithubFormatter({ repo: 'dmno-dev/bumpy' });
- const release = makeRelease('pkg-a', '1.0.1', { changesets: ['cs1'] });
- const changesets = [makeChangeset('cs1', [{ name: 'pkg-a', type: 'patch' }], 'Some fix')];
+ const release = makeRelease('pkg-a', '1.0.1', { bumpFiles: ['cs1'] });
+ const bumpFiles = [makeBumpFile('cs1', [{ name: 'pkg-a', type: 'patch' }], 'Some fix')];
- const result = await formatter({ release, changesets, date: '2026-04-14' });
+ const result = await formatter({ release, bumpFiles, date: '2026-04-14' });
expect(result).toContain('[#99]');
expect(result).toContain('[`deadbee`]');
@@ -176,10 +176,10 @@ describe('createGithubFormatter', () => {
addMockRule({ match: /^gh pr list/, error: 'auth required' });
const formatter = createGithubFormatter({ repo: 'dmno-dev/bumpy' });
- const release = makeRelease('pkg-a', '1.0.1', { changesets: ['cs1'] });
- const changesets = [makeChangeset('cs1', [{ name: 'pkg-a', type: 'patch' }], 'Fix')];
+ const release = makeRelease('pkg-a', '1.0.1', { bumpFiles: ['cs1'] });
+ const bumpFiles = [makeBumpFile('cs1', [{ name: 'pkg-a', type: 'patch' }], 'Fix')];
- const result = await formatter({ release, changesets, date: '2026-04-14' });
+ const result = await formatter({ release, bumpFiles, date: '2026-04-14' });
expect(result).toContain('Fix');
});
});
diff --git a/packages/bumpy/test/core/changelog.test.ts b/packages/bumpy/test/core/changelog.test.ts
index d665d2f..990830b 100644
--- a/packages/bumpy/test/core/changelog.test.ts
+++ b/packages/bumpy/test/core/changelog.test.ts
@@ -1,20 +1,20 @@
import { test, expect, describe } from 'bun:test';
-import { makeRelease, makeChangeset } from '../helpers.ts';
+import { makeRelease, makeBumpFile } from '../helpers.ts';
import { defaultFormatter, generateChangelogEntry, prependToChangelog } from '../../src/core/changelog.ts';
describe('defaultFormatter', () => {
- test('formats basic release with changesets', async () => {
+ test('formats basic release with bump files', async () => {
const release = makeRelease('pkg-a', '1.1.0', {
type: 'minor',
oldVersion: '1.0.0',
- changesets: ['cs1', 'cs2'],
+ bumpFiles: ['cs1', 'cs2'],
});
- const changesets = [
- makeChangeset('cs1', [{ name: 'pkg-a', type: 'minor' }], 'Added new feature'),
- makeChangeset('cs2', [{ name: 'pkg-a', type: 'patch' }], 'Fixed a bug'),
+ const bumpFiles = [
+ makeBumpFile('cs1', [{ name: 'pkg-a', type: 'minor' }], 'Added new feature'),
+ makeBumpFile('cs2', [{ name: 'pkg-a', type: 'patch' }], 'Fixed a bug'),
];
- const result = await defaultFormatter({ release, changesets, date: '2026-04-14' });
+ const result = await defaultFormatter({ release, bumpFiles, date: '2026-04-14' });
expect(result).toContain('## 1.1.0');
expect(result).toContain('_2026-04-14_');
@@ -22,24 +22,24 @@ describe('defaultFormatter', () => {
expect(result).toContain('- Fixed a bug');
});
- test('formats dependency bump with no changesets', async () => {
+ test('formats dependency bump with no bump files', async () => {
const release = makeRelease('pkg-a', '1.0.1', {
isDependencyBump: true,
- changesets: [],
+ bumpFiles: [],
});
- const result = await defaultFormatter({ release, changesets: [], date: '2026-04-14' });
+ const result = await defaultFormatter({ release, bumpFiles: [], date: '2026-04-14' });
expect(result).toContain('- Updated dependencies');
});
- test('formats cascade bump with no changesets', async () => {
+ test('formats cascade bump with no bump files', async () => {
const release = makeRelease('pkg-a', '1.0.1', {
isCascadeBump: true,
- changesets: [],
+ bumpFiles: [],
});
- const result = await defaultFormatter({ release, changesets: [], date: '2026-04-14' });
+ const result = await defaultFormatter({ release, bumpFiles: [], date: '2026-04-14' });
expect(result).toContain('- Version bump via cascade rule');
});
@@ -48,36 +48,36 @@ describe('defaultFormatter', () => {
const release = makeRelease('pkg-a', '1.0.1', {
isDependencyBump: true,
isCascadeBump: true,
- changesets: [],
+ bumpFiles: [],
});
- const result = await defaultFormatter({ release, changesets: [], date: '2026-04-14' });
+ const result = await defaultFormatter({ release, bumpFiles: [], date: '2026-04-14' });
expect(result).toContain('- Updated dependencies');
expect(result).not.toContain('cascade');
});
- test('handles multi-line changeset summaries', async () => {
+ test('handles multi-line bump file summaries', async () => {
const release = makeRelease('pkg-a', '1.1.0', {
type: 'minor',
- changesets: ['cs1'],
+ bumpFiles: ['cs1'],
});
- const changesets = [makeChangeset('cs1', [{ name: 'pkg-a', type: 'minor' }], 'First line\n\nSecond paragraph')];
+ const bumpFiles = [makeBumpFile('cs1', [{ name: 'pkg-a', type: 'minor' }], 'First line\n\nSecond paragraph')];
- const result = await defaultFormatter({ release, changesets, date: '2026-04-14' });
+ const result = await defaultFormatter({ release, bumpFiles, date: '2026-04-14' });
expect(result).toContain('- First line');
expect(result).toContain(' Second paragraph');
});
- test('only includes changesets referenced by the release', async () => {
- const release = makeRelease('pkg-a', '1.0.1', { changesets: ['cs1'] });
- const changesets = [
- makeChangeset('cs1', [{ name: 'pkg-a', type: 'patch' }], 'Relevant fix'),
- makeChangeset('cs2', [{ name: 'pkg-b', type: 'patch' }], 'Unrelated fix'),
+ test('only includes bump files referenced by the release', async () => {
+ const release = makeRelease('pkg-a', '1.0.1', { bumpFiles: ['cs1'] });
+ const bumpFiles = [
+ makeBumpFile('cs1', [{ name: 'pkg-a', type: 'patch' }], 'Relevant fix'),
+ makeBumpFile('cs2', [{ name: 'pkg-b', type: 'patch' }], 'Unrelated fix'),
];
- const result = await defaultFormatter({ release, changesets, date: '2026-04-14' });
+ const result = await defaultFormatter({ release, bumpFiles, date: '2026-04-14' });
expect(result).toContain('Relevant fix');
expect(result).not.toContain('Unrelated fix');
@@ -86,10 +86,10 @@ describe('defaultFormatter', () => {
describe('generateChangelogEntry', () => {
test('uses default formatter when none specified', async () => {
- const release = makeRelease('pkg-a', '1.0.1', { changesets: ['cs1'] });
- const changesets = [makeChangeset('cs1', [{ name: 'pkg-a', type: 'patch' }], 'Fix')];
+ const release = makeRelease('pkg-a', '1.0.1', { bumpFiles: ['cs1'] });
+ const bumpFiles = [makeBumpFile('cs1', [{ name: 'pkg-a', type: 'patch' }], 'Fix')];
- const result = await generateChangelogEntry(release, changesets);
+ const result = await generateChangelogEntry(release, bumpFiles);
expect(result).toContain('## 1.0.1');
expect(result).toContain('- Fix');
diff --git a/packages/bumpy/test/core/changeset.test.ts b/packages/bumpy/test/core/changeset.test.ts
deleted file mode 100644
index 4c05f67..0000000
--- a/packages/bumpy/test/core/changeset.test.ts
+++ /dev/null
@@ -1,111 +0,0 @@
-import { test, expect, describe } from 'bun:test';
-import { parseChangeset } from '../../src/core/changeset.ts';
-
-describe('parseChangeset', () => {
- test('parses simple format', () => {
- const content = `---
-"pkg-a": minor
-"pkg-b": patch
----
-
-Added a new feature to pkg-a
-`;
- const cs = parseChangeset(content, 'test-cs');
- expect(cs).not.toBeNull();
- expect(cs!.id).toBe('test-cs');
- expect(cs!.releases).toHaveLength(2);
- expect(cs!.releases[0]!.name).toBe('pkg-a');
- expect(cs!.releases[0]!.type).toBe('minor');
- expect(cs!.releases[1]!.name).toBe('pkg-b');
- expect(cs!.releases[1]!.type).toBe('patch');
- expect(cs!.summary).toBe('Added a new feature to pkg-a');
- });
-
- test('parses patch-isolated bump type', () => {
- const content = `---
-"pkg-a": patch-isolated
----
-
-Internal change
-`;
- const cs = parseChangeset(content, 'test-cs');
- expect(cs!.releases[0]!.type).toBe('patch-isolated');
- });
-
- test('parses none bump type', () => {
- const content = `---
-"pkg-a": minor
-"pkg-b": none
----
-
-Feature in pkg-a, suppress bump on pkg-b
-`;
- const cs = parseChangeset(content, 'test-cs');
- expect(cs!.releases).toHaveLength(2);
- expect(cs!.releases[0]!.type).toBe('minor');
- expect(cs!.releases[1]!.type).toBe('none');
- });
-
- test('parses nested format with cascade', () => {
- const content = `---
-"@myorg/core":
- bump: minor
- cascade:
- "plugins/*": patch
- "@myorg/cli": minor
----
-
-Added encryption provider
-`;
- const cs = parseChangeset(content, 'test-cs');
- expect(cs).not.toBeNull();
- expect(cs!.releases).toHaveLength(1);
- const release = cs!.releases[0]! as any;
- expect(release.name).toBe('@myorg/core');
- expect(release.type).toBe('minor');
- expect(release.cascade).toEqual({
- 'plugins/*': 'patch',
- '@myorg/cli': 'minor',
- });
- });
-
- test('parses mixed simple and nested', () => {
- const content = `---
-"@myorg/core":
- bump: minor
- cascade:
- "plugins/*": patch
-"@myorg/utils": patch
----
-
-Mixed changes
-`;
- const cs = parseChangeset(content, 'test-cs');
- expect(cs!.releases).toHaveLength(2);
- expect(cs!.releases[0]!.name).toBe('@myorg/core');
- expect(cs!.releases[1]!.name).toBe('@myorg/utils');
- expect(cs!.releases[1]!.type).toBe('patch');
- });
-
- test('returns null for invalid content', () => {
- expect(parseChangeset('no frontmatter here', 'bad')).toBeNull();
- expect(parseChangeset('---\n---\n', 'empty')).toBeNull();
- });
-
- test('handles multi-line summary', () => {
- const content = `---
-"pkg-a": minor
----
-
-First line
-
-Second paragraph with more details.
-
-- bullet point
-`;
- const cs = parseChangeset(content, 'test-cs');
- expect(cs!.summary).toContain('First line');
- expect(cs!.summary).toContain('Second paragraph');
- expect(cs!.summary).toContain('- bullet point');
- });
-});
diff --git a/packages/bumpy/test/core/github-release.test.ts b/packages/bumpy/test/core/github-release.test.ts
index 67c18d2..96a49b3 100644
--- a/packages/bumpy/test/core/github-release.test.ts
+++ b/packages/bumpy/test/core/github-release.test.ts
@@ -171,13 +171,13 @@ describe('createIndividualReleases', () => {
expect(ghCalls[1]!.command).toContain('pkg-b@2.0.0');
});
- test('includes changeset summaries in release body', async () => {
- const changesets = [
+ test('includes bump file summaries in release body', async () => {
+ const bumpFiles = [
{ id: 'cs1', releases: [{ name: 'pkg-a', type: 'patch' as const }], summary: 'Fixed the login bug' },
];
- const releases = [makeRelease('pkg-a', '1.0.1', { changesets: ['cs1'] })];
+ const releases = [makeRelease('pkg-a', '1.0.1', { bumpFiles: ['cs1'] })];
- await createIndividualReleases(releases, changesets, tmpDir);
+ await createIndividualReleases(releases, bumpFiles, tmpDir);
const ghCalls = getCallsMatching('gh release create');
expect(ghCalls).toHaveLength(1);
diff --git a/packages/bumpy/test/core/publish-pipeline.test.ts b/packages/bumpy/test/core/publish-pipeline.test.ts
index d879de3..d93fc18 100644
--- a/packages/bumpy/test/core/publish-pipeline.test.ts
+++ b/packages/bumpy/test/core/publish-pipeline.test.ts
@@ -51,7 +51,7 @@ describe('publishPackages', () => {
const depGraph = new DependencyGraph(packages);
const plan: ReleasePlan = {
- changesets: [],
+ bumpFiles: [],
warnings: [],
releases: [
{
@@ -59,7 +59,7 @@ describe('publishPackages', () => {
type: 'minor',
oldVersion: '1.0.0',
newVersion: '1.1.0',
- changesets: [],
+ bumpFiles: [],
isDependencyBump: false,
isCascadeBump: false,
},
@@ -94,7 +94,7 @@ describe('publishPackages', () => {
const depGraph = new DependencyGraph(packages);
const plan: ReleasePlan = {
- changesets: [],
+ bumpFiles: [],
warnings: [],
releases: [
{
@@ -102,7 +102,7 @@ describe('publishPackages', () => {
type: 'minor',
oldVersion: '2.0.0',
newVersion: '2.1.0',
- changesets: [],
+ bumpFiles: [],
isDependencyBump: false,
isCascadeBump: false,
},
@@ -133,7 +133,7 @@ describe('publishPackages', () => {
const depGraph = new DependencyGraph(packages);
const plan: ReleasePlan = {
- changesets: [],
+ bumpFiles: [],
warnings: [],
releases: [
{
@@ -141,7 +141,7 @@ describe('publishPackages', () => {
type: 'patch',
oldVersion: '1.0.0',
newVersion: '1.0.1',
- changesets: [],
+ bumpFiles: [],
isDependencyBump: false,
isCascadeBump: false,
},
@@ -181,7 +181,7 @@ describe('publishPackages', () => {
const depGraph = new DependencyGraph(packages);
const plan: ReleasePlan = {
- changesets: [],
+ bumpFiles: [],
warnings: [],
releases: [
{
@@ -189,7 +189,7 @@ describe('publishPackages', () => {
type: 'minor',
oldVersion: '1.0.0',
newVersion: '1.1.0',
- changesets: [],
+ bumpFiles: [],
isDependencyBump: false,
isCascadeBump: false,
},
@@ -198,7 +198,7 @@ describe('publishPackages', () => {
type: 'patch',
oldVersion: '1.0.0',
newVersion: '1.0.1',
- changesets: [],
+ bumpFiles: [],
isDependencyBump: true,
isCascadeBump: false,
},
@@ -228,7 +228,7 @@ describe('publishPackages', () => {
const depGraph = new DependencyGraph(packages);
const plan: ReleasePlan = {
- changesets: [],
+ bumpFiles: [],
warnings: [],
releases: [
{
@@ -236,7 +236,7 @@ describe('publishPackages', () => {
type: 'patch',
oldVersion: '1.0.0',
newVersion: '1.0.1',
- changesets: [],
+ bumpFiles: [],
isDependencyBump: false,
isCascadeBump: false,
},
diff --git a/packages/bumpy/test/core/release-plan.test.ts b/packages/bumpy/test/core/release-plan.test.ts
index 1a5f00b..63ff79e 100644
--- a/packages/bumpy/test/core/release-plan.test.ts
+++ b/packages/bumpy/test/core/release-plan.test.ts
@@ -2,18 +2,18 @@ import { test, expect, describe } from 'bun:test';
import { assembleReleasePlan } from '../../src/core/release-plan.ts';
import { DependencyGraph } from '../../src/core/dep-graph.ts';
import { makePkg, makeConfig } from '../helpers.ts';
-import type { Changeset } from '../../src/types.ts';
+import type { BumpFile } from '../../src/types.ts';
describe('assembleReleasePlan', () => {
test('basic single package bump', () => {
const packages = new Map([['pkg-a', makePkg('pkg-a', '1.0.0')]]);
- const changesets: Changeset[] = [
+ const bumpFiles: BumpFile[] = [
{ id: 'cs1', releases: [{ name: 'pkg-a', type: 'minor' }], summary: 'Added feature' },
];
const graph = new DependencyGraph(packages);
- const plan = assembleReleasePlan(changesets, packages, graph, makeConfig());
+ const plan = assembleReleasePlan(bumpFiles, packages, graph, makeConfig());
expect(plan.releases).toHaveLength(1);
expect(plan.releases[0]!.name).toBe('pkg-a');
@@ -22,40 +22,40 @@ describe('assembleReleasePlan', () => {
expect(plan.releases[0]!.newVersion).toBe('1.1.0');
});
- test('multiple changesets for same package take highest bump', () => {
+ test('multiple bump files for same package take highest bump', () => {
const packages = new Map([['pkg-a', makePkg('pkg-a', '1.0.0')]]);
- const changesets: Changeset[] = [
+ const bumpFiles: BumpFile[] = [
{ id: 'cs1', releases: [{ name: 'pkg-a', type: 'patch' }], summary: 'Fix' },
{ id: 'cs2', releases: [{ name: 'pkg-a', type: 'minor' }], summary: 'Feature' },
];
const graph = new DependencyGraph(packages);
- const plan = assembleReleasePlan(changesets, packages, graph, makeConfig());
+ const plan = assembleReleasePlan(bumpFiles, packages, graph, makeConfig());
expect(plan.releases).toHaveLength(1);
expect(plan.releases[0]!.type).toBe('minor');
expect(plan.releases[0]!.newVersion).toBe('1.1.0');
});
- test('empty changesets returns empty plan', () => {
+ test('empty bump files returns empty plan', () => {
const packages = new Map([['pkg-a', makePkg('pkg-a', '1.0.0')]]);
const graph = new DependencyGraph(packages);
const plan = assembleReleasePlan([], packages, graph, makeConfig());
expect(plan.releases).toHaveLength(0);
- expect(plan.changesets).toHaveLength(0);
+ expect(plan.bumpFiles).toHaveLength(0);
expect(plan.warnings).toHaveLength(0);
});
- test('multi-package changeset bumps all listed packages', () => {
+ test('multi-package bump file bumps all listed packages', () => {
const packages = new Map([
['pkg-a', makePkg('pkg-a', '1.0.0')],
['pkg-b', makePkg('pkg-b', '2.0.0')],
]);
- const changesets: Changeset[] = [
+ const bumpFiles: BumpFile[] = [
{
id: 'cs1',
releases: [
@@ -67,7 +67,7 @@ describe('assembleReleasePlan', () => {
];
const graph = new DependencyGraph(packages);
- const plan = assembleReleasePlan(changesets, packages, graph, makeConfig());
+ const plan = assembleReleasePlan(bumpFiles, packages, graph, makeConfig());
expect(plan.releases).toHaveLength(2);
expect(plan.releases.find((r) => r.name === 'pkg-a')!.newVersion).toBe('1.1.0');
@@ -83,10 +83,10 @@ describe('assembleReleasePlan', () => {
['plugin', makePkg('plugin', '1.0.0', { peerDependencies: { core: '^1.0.0' } })],
]);
- const changesets: Changeset[] = [{ id: 'cs1', releases: [{ name: 'core', type: 'major' }], summary: 'Breaking' }];
+ const bumpFiles: BumpFile[] = [{ id: 'cs1', releases: [{ name: 'core', type: 'major' }], summary: 'Breaking' }];
const graph = new DependencyGraph(packages);
- const plan = assembleReleasePlan(changesets, packages, graph, makeConfig());
+ const plan = assembleReleasePlan(bumpFiles, packages, graph, makeConfig());
expect(plan.releases).toHaveLength(2);
const pluginRelease = plan.releases.find((r) => r.name === 'plugin')!;
@@ -100,10 +100,10 @@ describe('assembleReleasePlan', () => {
['app', makePkg('app', '1.0.0', { dependencies: { core: '^1.0.0' } })],
]);
- const changesets: Changeset[] = [{ id: 'cs1', releases: [{ name: 'core', type: 'major' }], summary: 'Breaking' }];
+ const bumpFiles: BumpFile[] = [{ id: 'cs1', releases: [{ name: 'core', type: 'major' }], summary: 'Breaking' }];
const graph = new DependencyGraph(packages);
- const plan = assembleReleasePlan(changesets, packages, graph, makeConfig());
+ const plan = assembleReleasePlan(bumpFiles, packages, graph, makeConfig());
expect(plan.releases).toHaveLength(2);
const appRelease = plan.releases.find((r) => r.name === 'app')!;
@@ -117,12 +117,12 @@ describe('assembleReleasePlan', () => {
['app', makePkg('app', '1.0.0', { devDependencies: { 'test-utils': '^1.0.0' } })],
]);
- const changesets: Changeset[] = [
+ const bumpFiles: BumpFile[] = [
{ id: 'cs1', releases: [{ name: 'test-utils', type: 'major' }], summary: 'Breaking' },
];
const graph = new DependencyGraph(packages);
- const plan = assembleReleasePlan(changesets, packages, graph, makeConfig());
+ const plan = assembleReleasePlan(bumpFiles, packages, graph, makeConfig());
// Even with major bump going out-of-range, devDeps are skipped
expect(plan.releases).toHaveLength(1);
@@ -136,10 +136,10 @@ describe('assembleReleasePlan', () => {
]);
// Minor bump: 1.2.0 → 1.3.0, which satisfies ^1.2.0
- const changesets: Changeset[] = [{ id: 'cs1', releases: [{ name: 'core', type: 'minor' }], summary: 'Feature' }];
+ const bumpFiles: BumpFile[] = [{ id: 'cs1', releases: [{ name: 'core', type: 'minor' }], summary: 'Feature' }];
const graph = new DependencyGraph(packages);
- const plan = assembleReleasePlan(changesets, packages, graph, makeConfig());
+ const plan = assembleReleasePlan(bumpFiles, packages, graph, makeConfig());
expect(plan.releases).toHaveLength(1); // app is NOT bumped because 1.3.0 satisfies ^1.2.0
});
@@ -151,10 +151,10 @@ describe('assembleReleasePlan', () => {
]);
// Major bump: 1.2.0 → 2.0.0, which does NOT satisfy ^1.2.0
- const changesets: Changeset[] = [{ id: 'cs1', releases: [{ name: 'core', type: 'major' }], summary: 'Breaking' }];
+ const bumpFiles: BumpFile[] = [{ id: 'cs1', releases: [{ name: 'core', type: 'major' }], summary: 'Breaking' }];
const graph = new DependencyGraph(packages);
- const plan = assembleReleasePlan(changesets, packages, graph, makeConfig());
+ const plan = assembleReleasePlan(bumpFiles, packages, graph, makeConfig());
expect(plan.releases).toHaveLength(2); // app IS bumped
expect(plan.releases.find((r) => r.name === 'app')!.type).toBe('patch');
@@ -167,10 +167,10 @@ describe('assembleReleasePlan', () => {
]);
// Minor bump: 0.2.0 → 0.3.0, which does NOT satisfy ^0.2.0 (0.x caret range!)
- const changesets: Changeset[] = [{ id: 'cs1', releases: [{ name: 'core', type: 'minor' }], summary: 'Feature' }];
+ const bumpFiles: BumpFile[] = [{ id: 'cs1', releases: [{ name: 'core', type: 'minor' }], summary: 'Feature' }];
const graph = new DependencyGraph(packages);
- const plan = assembleReleasePlan(changesets, packages, graph, makeConfig());
+ const plan = assembleReleasePlan(bumpFiles, packages, graph, makeConfig());
expect(plan.releases).toHaveLength(2);
const pluginRelease = plan.releases.find((r) => r.name === 'plugin')!;
@@ -190,12 +190,12 @@ describe('assembleReleasePlan', () => {
]);
// patch-isolated on core: 1.0.0 → 1.0.1, satisfies ~1.0.0 → no issue
- const changesets: Changeset[] = [
+ const bumpFiles: BumpFile[] = [
{ id: 'cs1', releases: [{ name: 'core', type: 'patch-isolated' }], summary: 'Internal' },
];
const graph = new DependencyGraph(packages);
- const plan = assembleReleasePlan(changesets, packages, graph, makeConfig());
+ const plan = assembleReleasePlan(bumpFiles, packages, graph, makeConfig());
expect(plan.releases).toHaveLength(1);
expect(plan.releases[0]!.name).toBe('core');
@@ -208,10 +208,10 @@ describe('assembleReleasePlan', () => {
['app', makePkg('app', '1.0.0', { dependencies: { core: '^1.0.0' } })],
]);
- const changesets: Changeset[] = [{ id: 'cs1', releases: [{ name: 'core', type: 'minor' }], summary: 'Feature' }];
+ const bumpFiles: BumpFile[] = [{ id: 'cs1', releases: [{ name: 'core', type: 'minor' }], summary: 'Feature' }];
const graph = new DependencyGraph(packages);
- const plan = assembleReleasePlan(changesets, packages, graph, makeConfig());
+ const plan = assembleReleasePlan(bumpFiles, packages, graph, makeConfig());
expect(plan.releases).toHaveLength(1);
expect(plan.releases[0]!.name).toBe('core');
@@ -226,10 +226,10 @@ describe('assembleReleasePlan', () => {
// minor bump on core: 1.0.0 → 1.1.0, breaks ~1.0.0
// middle gets patch: 1.0.0 → 1.0.1, satisfies ~1.0.0 on app → stops
- const changesets: Changeset[] = [{ id: 'cs1', releases: [{ name: 'core', type: 'minor' }], summary: 'Feature' }];
+ const bumpFiles: BumpFile[] = [{ id: 'cs1', releases: [{ name: 'core', type: 'minor' }], summary: 'Feature' }];
const graph = new DependencyGraph(packages);
- const plan = assembleReleasePlan(changesets, packages, graph, makeConfig());
+ const plan = assembleReleasePlan(bumpFiles, packages, graph, makeConfig());
expect(plan.releases.find((r) => r.name === 'core')).toBeDefined();
expect(plan.releases.find((r) => r.name === 'middle')).toBeDefined();
@@ -247,14 +247,14 @@ describe('assembleReleasePlan', () => {
['pkg-c', makePkg('pkg-c', '1.0.0')],
]);
- const changesets: Changeset[] = [
+ const bumpFiles: BumpFile[] = [
{ id: 'cs1', releases: [{ name: 'pkg-a', type: 'minor' }], summary: 'Feature' },
{ id: 'cs2', releases: [{ name: 'pkg-b', type: 'patch' }], summary: 'Fix' },
];
const graph = new DependencyGraph(packages);
const config = makeConfig({ fixed: [['pkg-a', 'pkg-b', 'pkg-c']] });
- const plan = assembleReleasePlan(changesets, packages, graph, config);
+ const plan = assembleReleasePlan(bumpFiles, packages, graph, config);
expect(plan.releases).toHaveLength(3);
for (const r of plan.releases) {
@@ -272,11 +272,11 @@ describe('assembleReleasePlan', () => {
['plugin', makePkg('plugin', '1.0.0', { dependencies: { core: '~1.0.0' } })],
]);
- const changesets: Changeset[] = [{ id: 'cs1', releases: [{ name: 'core', type: 'minor' }], summary: 'Feature' }];
+ const bumpFiles: BumpFile[] = [{ id: 'cs1', releases: [{ name: 'core', type: 'minor' }], summary: 'Feature' }];
const graph = new DependencyGraph(packages);
const config = makeConfig({ fixed: [['core', 'types']] });
- const plan = assembleReleasePlan(changesets, packages, graph, config);
+ const plan = assembleReleasePlan(bumpFiles, packages, graph, config);
// core gets minor, types gets minor (fixed), plugin gets patch (out-of-range dep)
expect(plan.releases).toHaveLength(3);
@@ -292,14 +292,14 @@ describe('assembleReleasePlan', () => {
['plugin-b', makePkg('plugin-b', '3.0.0', { dependencies: { core: '~1.0.0' } })],
]);
- const changesets: Changeset[] = [
+ const bumpFiles: BumpFile[] = [
{ id: 'cs1', releases: [{ name: 'core', type: 'minor' }], summary: 'Feature' },
{ id: 'cs2', releases: [{ name: 'plugin-a', type: 'minor' }], summary: 'Plugin feature' },
];
const graph = new DependencyGraph(packages);
const config = makeConfig({ linked: [['plugin-a', 'plugin-b']] });
- const plan = assembleReleasePlan(changesets, packages, graph, config);
+ const plan = assembleReleasePlan(bumpFiles, packages, graph, config);
// plugin-a has minor from changeset, plugin-b gets patch from out-of-range propagation
// linked group raises plugin-b to match plugin-a's minor
@@ -330,10 +330,10 @@ describe('assembleReleasePlan', () => {
['unrelated', makePkg('unrelated', '1.0.0')],
]);
- const changesets: Changeset[] = [{ id: 'cs1', releases: [{ name: 'core', type: 'minor' }], summary: 'Feature' }];
+ const bumpFiles: BumpFile[] = [{ id: 'cs1', releases: [{ name: 'core', type: 'minor' }], summary: 'Feature' }];
const graph = new DependencyGraph(packages);
- const plan = assembleReleasePlan(changesets, packages, graph, makeConfig());
+ const plan = assembleReleasePlan(bumpFiles, packages, graph, makeConfig());
expect(plan.releases).toHaveLength(3);
expect(plan.releases.find((r) => r.name === 'unrelated')).toBeUndefined();
@@ -346,15 +346,10 @@ describe('assembleReleasePlan', () => {
['app', makePkg('app', '2.0.0', { dependencies: { core: '^1.0.0' } })],
]);
- const changesets: Changeset[] = [{ id: 'cs1', releases: [{ name: 'core', type: 'patch' }], summary: 'Fix' }];
+ const bumpFiles: BumpFile[] = [{ id: 'cs1', releases: [{ name: 'core', type: 'patch' }], summary: 'Fix' }];
const graph = new DependencyGraph(packages);
- const plan = assembleReleasePlan(
- changesets,
- packages,
- graph,
- makeConfig({ updateInternalDependencies: 'patch' }),
- );
+ const plan = assembleReleasePlan(bumpFiles, packages, graph, makeConfig({ updateInternalDependencies: 'patch' }));
expect(plan.releases).toHaveLength(2);
const appRelease = plan.releases.find((r) => r.name === 'app')!;
@@ -368,17 +363,12 @@ describe('assembleReleasePlan', () => {
['app', makePkg('app', '2.0.0', { dependencies: { core: '^1.0.0' } })],
]);
- const changesets: Changeset[] = [
+ const bumpFiles: BumpFile[] = [
{ id: 'cs1', releases: [{ name: 'core', type: 'patch-isolated' }], summary: 'Internal' },
];
const graph = new DependencyGraph(packages);
- const plan = assembleReleasePlan(
- changesets,
- packages,
- graph,
- makeConfig({ updateInternalDependencies: 'patch' }),
- );
+ const plan = assembleReleasePlan(bumpFiles, packages, graph, makeConfig({ updateInternalDependencies: 'patch' }));
expect(plan.releases).toHaveLength(1);
expect(plan.releases[0]!.name).toBe('core');
@@ -390,24 +380,24 @@ describe('assembleReleasePlan', () => {
['plugin', makePkg('plugin', '1.0.0', { peerDependencies: { core: '^1.0.0' } })],
]);
- const changesets: Changeset[] = [{ id: 'cs1', releases: [{ name: 'core', type: 'minor' }], summary: 'Feature' }];
+ const bumpFiles: BumpFile[] = [{ id: 'cs1', releases: [{ name: 'core', type: 'minor' }], summary: 'Feature' }];
const graph = new DependencyGraph(packages);
- const plan = assembleReleasePlan(changesets, packages, graph, makeConfig());
+ const plan = assembleReleasePlan(bumpFiles, packages, graph, makeConfig());
// ^1.0.0 satisfies 1.1.0, so no out-of-range propagation
expect(plan.releases).toHaveLength(1);
expect(plan.releases[0]!.name).toBe('core');
});
- test('changeset-level cascade overrides', () => {
+ test('bump-file-level cascade overrides', () => {
const packages = new Map([
['core', makePkg('core', '1.0.0')],
['plugin-a', makePkg('plugin-a', '1.0.0')],
['plugin-b', makePkg('plugin-b', '1.0.0')],
]);
- const changesets: Changeset[] = [
+ const bumpFiles: BumpFile[] = [
{
id: 'cs1',
releases: [
@@ -422,7 +412,7 @@ describe('assembleReleasePlan', () => {
];
const graph = new DependencyGraph(packages);
- const plan = assembleReleasePlan(changesets, packages, graph, makeConfig());
+ const plan = assembleReleasePlan(bumpFiles, packages, graph, makeConfig());
expect(plan.releases).toHaveLength(3);
const pluginA = plan.releases.find((r) => r.name === 'plugin-a')!;
@@ -439,17 +429,12 @@ describe('assembleReleasePlan', () => {
['app', makePkg('app', '1.0.0', { devDependencies: { 'test-utils': '^1.0.0' } })],
]);
- const changesets: Changeset[] = [
+ const bumpFiles: BumpFile[] = [
{ id: 'cs1', releases: [{ name: 'test-utils', type: 'major' }], summary: 'Breaking' },
];
const graph = new DependencyGraph(packages);
- const plan = assembleReleasePlan(
- changesets,
- packages,
- graph,
- makeConfig({ updateInternalDependencies: 'patch' }),
- );
+ const plan = assembleReleasePlan(bumpFiles, packages, graph, makeConfig({ updateInternalDependencies: 'patch' }));
// devDeps rule is false by default → never propagates
expect(plan.releases).toHaveLength(1);
@@ -466,36 +451,31 @@ describe('assembleReleasePlan', () => {
['app', makePkg('app', '2.0.0', { dependencies: { core: '^1.0.0' } })],
]);
- const changesets: Changeset[] = [
+ const bumpFiles: BumpFile[] = [
{ id: 'cs1', releases: [{ name: 'core', type: 'patch-isolated' }], summary: 'Internal' },
];
const graph = new DependencyGraph(packages);
- const plan = assembleReleasePlan(changesets, packages, graph, makeConfig());
+ const plan = assembleReleasePlan(bumpFiles, packages, graph, makeConfig());
expect(plan.releases).toHaveLength(1);
expect(plan.releases[0]!.name).toBe('core');
expect(plan.releases[0]!.newVersion).toBe('1.0.1');
});
- test('non-isolated changeset overrides isolated for same package', () => {
+ test('non-isolated bump file overrides isolated for same package', () => {
const packages = new Map([
['core', makePkg('core', '1.0.0')],
['app', makePkg('app', '2.0.0', { dependencies: { core: '^1.0.0' } })],
]);
- const changesets: Changeset[] = [
+ const bumpFiles: BumpFile[] = [
{ id: 'cs1', releases: [{ name: 'core', type: 'patch-isolated' }], summary: 'Internal' },
{ id: 'cs2', releases: [{ name: 'core', type: 'patch' }], summary: 'Fix' },
];
const graph = new DependencyGraph(packages);
- const plan = assembleReleasePlan(
- changesets,
- packages,
- graph,
- makeConfig({ updateInternalDependencies: 'patch' }),
- );
+ const plan = assembleReleasePlan(bumpFiles, packages, graph, makeConfig({ updateInternalDependencies: 'patch' }));
expect(plan.releases).toHaveLength(2); // core + app (no longer isolated)
});
@@ -506,12 +486,12 @@ describe('assembleReleasePlan', () => {
['app', makePkg('app', '1.0.0', { dependencies: { core: '1.0.0' } })], // exact range
]);
- const changesets: Changeset[] = [
+ const bumpFiles: BumpFile[] = [
{ id: 'cs1', releases: [{ name: 'core', type: 'patch-isolated' }], summary: 'Internal' },
];
const graph = new DependencyGraph(packages);
- expect(() => assembleReleasePlan(changesets, packages, graph, makeConfig())).toThrow(
+ expect(() => assembleReleasePlan(bumpFiles, packages, graph, makeConfig())).toThrow(
/patch-isolated.*break.*range/,
);
});
@@ -526,7 +506,7 @@ describe('assembleReleasePlan', () => {
['plugin', makePkg('plugin', '1.0.0', { dependencies: { core: '^1.0.0' } })],
]);
- const changesets: Changeset[] = [
+ const bumpFiles: BumpFile[] = [
{
id: 'cs1',
releases: [
@@ -538,12 +518,7 @@ describe('assembleReleasePlan', () => {
];
const graph = new DependencyGraph(packages);
- const plan = assembleReleasePlan(
- changesets,
- packages,
- graph,
- makeConfig({ updateInternalDependencies: 'patch' }),
- );
+ const plan = assembleReleasePlan(bumpFiles, packages, graph, makeConfig({ updateInternalDependencies: 'patch' }));
// Plugin should NOT be in releases because it's suppressed
expect(plan.releases).toHaveLength(1);
@@ -556,7 +531,7 @@ describe('assembleReleasePlan', () => {
['plugin', makePkg('plugin', '1.0.0', { dependencies: { core: '^1.0.0' } })],
]);
- const changesets: Changeset[] = [
+ const bumpFiles: BumpFile[] = [
{
id: 'cs1',
releases: [
@@ -568,7 +543,7 @@ describe('assembleReleasePlan', () => {
];
const graph = new DependencyGraph(packages);
- expect(() => assembleReleasePlan(changesets, packages, graph, makeConfig())).toThrow(
+ expect(() => assembleReleasePlan(bumpFiles, packages, graph, makeConfig())).toThrow(
/Cannot suppress.*plugin.*none/,
);
});
@@ -594,15 +569,10 @@ describe('assembleReleasePlan', () => {
['normal', makePkg('normal', '1.0.0', { dependencies: { core: '^1.0.0' } })],
]);
- const changesets: Changeset[] = [{ id: 'cs1', releases: [{ name: 'core', type: 'patch' }], summary: 'Fix' }];
+ const bumpFiles: BumpFile[] = [{ id: 'cs1', releases: [{ name: 'core', type: 'patch' }], summary: 'Fix' }];
const graph = new DependencyGraph(packages);
- const plan = assembleReleasePlan(
- changesets,
- packages,
- graph,
- makeConfig({ updateInternalDependencies: 'patch' }),
- );
+ const plan = assembleReleasePlan(bumpFiles, packages, graph, makeConfig({ updateInternalDependencies: 'patch' }));
// Both should be bumped because updateInternalDependencies is 'patch'
// and both have dependency bump rules that trigger on patch
@@ -628,15 +598,10 @@ describe('assembleReleasePlan', () => {
['normal', makePkg('normal', '1.0.0', { dependencies: { core: '^1.0.0' } })],
]);
- const changesets: Changeset[] = [{ id: 'cs1', releases: [{ name: 'core', type: 'patch' }], summary: 'Fix' }];
+ const bumpFiles: BumpFile[] = [{ id: 'cs1', releases: [{ name: 'core', type: 'patch' }], summary: 'Fix' }];
const graph = new DependencyGraph(packages);
- const plan = assembleReleasePlan(
- changesets,
- packages,
- graph,
- makeConfig({ updateInternalDependencies: 'patch' }),
- );
+ const plan = assembleReleasePlan(bumpFiles, packages, graph, makeConfig({ updateInternalDependencies: 'patch' }));
// special should NOT be bumped (rule is false), normal should be
expect(plan.releases).toHaveLength(2);
@@ -655,9 +620,9 @@ describe('assembleReleasePlan', () => {
]);
// Minor bump: 1.2.0 → 1.3.0, does NOT satisfy ~1.2.0 (>=1.2.0 <1.3.0)
- const changesets: Changeset[] = [{ id: 'cs1', releases: [{ name: 'core', type: 'minor' }], summary: 'Feature' }];
+ const bumpFiles: BumpFile[] = [{ id: 'cs1', releases: [{ name: 'core', type: 'minor' }], summary: 'Feature' }];
const graph = new DependencyGraph(packages);
- const plan = assembleReleasePlan(changesets, packages, graph, makeConfig());
+ const plan = assembleReleasePlan(bumpFiles, packages, graph, makeConfig());
expect(plan.releases).toHaveLength(2);
expect(plan.releases.find((r) => r.name === 'app')!.type).toBe('patch');
@@ -670,9 +635,9 @@ describe('assembleReleasePlan', () => {
]);
// Patch bump: 1.2.0 → 1.2.1, satisfies ~1.2.0
- const changesets: Changeset[] = [{ id: 'cs1', releases: [{ name: 'core', type: 'patch' }], summary: 'Fix' }];
+ const bumpFiles: BumpFile[] = [{ id: 'cs1', releases: [{ name: 'core', type: 'patch' }], summary: 'Fix' }];
const graph = new DependencyGraph(packages);
- const plan = assembleReleasePlan(changesets, packages, graph, makeConfig());
+ const plan = assembleReleasePlan(bumpFiles, packages, graph, makeConfig());
expect(plan.releases).toHaveLength(1);
});
@@ -684,9 +649,9 @@ describe('assembleReleasePlan', () => {
]);
// Even a major bump should not propagate
- const changesets: Changeset[] = [{ id: 'cs1', releases: [{ name: 'core', type: 'major' }], summary: 'Breaking' }];
+ const bumpFiles: BumpFile[] = [{ id: 'cs1', releases: [{ name: 'core', type: 'major' }], summary: 'Breaking' }];
const graph = new DependencyGraph(packages);
- const plan = assembleReleasePlan(changesets, packages, graph, makeConfig());
+ const plan = assembleReleasePlan(bumpFiles, packages, graph, makeConfig());
expect(plan.releases).toHaveLength(1);
expect(plan.releases[0]!.name).toBe('core');
@@ -699,9 +664,9 @@ describe('assembleReleasePlan', () => {
]);
// Minor bump: 0.2.0 → 0.3.0, workspace:^ resolves to ^0.2.0, breaks range
- const changesets: Changeset[] = [{ id: 'cs1', releases: [{ name: 'core', type: 'minor' }], summary: 'Feature' }];
+ const bumpFiles: BumpFile[] = [{ id: 'cs1', releases: [{ name: 'core', type: 'minor' }], summary: 'Feature' }];
const graph = new DependencyGraph(packages);
- const plan = assembleReleasePlan(changesets, packages, graph, makeConfig());
+ const plan = assembleReleasePlan(bumpFiles, packages, graph, makeConfig());
expect(plan.releases).toHaveLength(2);
const pluginRelease = plan.releases.find((r) => r.name === 'plugin')!;
@@ -717,9 +682,9 @@ describe('assembleReleasePlan', () => {
]);
// Patch bump: 0.2.0 → 0.2.1, workspace:^ resolves to ^0.2.0, stays in range
- const changesets: Changeset[] = [{ id: 'cs1', releases: [{ name: 'core', type: 'patch' }], summary: 'Fix' }];
+ const bumpFiles: BumpFile[] = [{ id: 'cs1', releases: [{ name: 'core', type: 'patch' }], summary: 'Fix' }];
const graph = new DependencyGraph(packages);
- const plan = assembleReleasePlan(changesets, packages, graph, makeConfig());
+ const plan = assembleReleasePlan(bumpFiles, packages, graph, makeConfig());
expect(plan.releases).toHaveLength(1);
});
@@ -744,9 +709,9 @@ describe('assembleReleasePlan', () => {
]);
// Patch bump on core — below minor trigger threshold
- const changesets: Changeset[] = [{ id: 'cs1', releases: [{ name: 'core', type: 'patch' }], summary: 'Fix' }];
+ const bumpFiles: BumpFile[] = [{ id: 'cs1', releases: [{ name: 'core', type: 'patch' }], summary: 'Fix' }];
const graph = new DependencyGraph(packages);
- const plan = assembleReleasePlan(changesets, packages, graph, makeConfig());
+ const plan = assembleReleasePlan(bumpFiles, packages, graph, makeConfig());
expect(plan.releases).toHaveLength(1);
expect(plan.releases[0]!.name).toBe('core');
@@ -758,14 +723,9 @@ describe('assembleReleasePlan', () => {
['app', makePkg('app', '2.0.0', { dependencies: { core: '^1.0.0' } })],
]);
- const changesets: Changeset[] = [{ id: 'cs1', releases: [{ name: 'core', type: 'patch' }], summary: 'Fix' }];
+ const bumpFiles: BumpFile[] = [{ id: 'cs1', releases: [{ name: 'core', type: 'patch' }], summary: 'Fix' }];
const graph = new DependencyGraph(packages);
- const plan = assembleReleasePlan(
- changesets,
- packages,
- graph,
- makeConfig({ updateInternalDependencies: 'minor' }),
- );
+ const plan = assembleReleasePlan(bumpFiles, packages, graph, makeConfig({ updateInternalDependencies: 'minor' }));
// Patch bump on core — below minor threshold, app not bumped
expect(plan.releases).toHaveLength(1);
@@ -777,14 +737,9 @@ describe('assembleReleasePlan', () => {
['app', makePkg('app', '2.0.0', { dependencies: { core: '^1.0.0' } })],
]);
- const changesets: Changeset[] = [{ id: 'cs1', releases: [{ name: 'core', type: 'minor' }], summary: 'Feature' }];
+ const bumpFiles: BumpFile[] = [{ id: 'cs1', releases: [{ name: 'core', type: 'minor' }], summary: 'Feature' }];
const graph = new DependencyGraph(packages);
- const plan = assembleReleasePlan(
- changesets,
- packages,
- graph,
- makeConfig({ updateInternalDependencies: 'minor' }),
- );
+ const plan = assembleReleasePlan(bumpFiles, packages, graph, makeConfig({ updateInternalDependencies: 'minor' }));
expect(plan.releases).toHaveLength(2);
expect(plan.releases.find((r) => r.name === 'app')!.isDependencyBump).toBe(true);
@@ -797,14 +752,9 @@ describe('assembleReleasePlan', () => {
]);
// Major bump — peerDeps default rule is { trigger: 'major', bumpAs: 'match' }
- const changesets: Changeset[] = [{ id: 'cs1', releases: [{ name: 'core', type: 'major' }], summary: 'Breaking' }];
+ const bumpFiles: BumpFile[] = [{ id: 'cs1', releases: [{ name: 'core', type: 'major' }], summary: 'Breaking' }];
const graph = new DependencyGraph(packages);
- const plan = assembleReleasePlan(
- changesets,
- packages,
- graph,
- makeConfig({ updateInternalDependencies: 'patch' }),
- );
+ const plan = assembleReleasePlan(bumpFiles, packages, graph, makeConfig({ updateInternalDependencies: 'patch' }));
const pluginRelease = plan.releases.find((r) => r.name === 'plugin')!;
// bumpAs: 'match' means plugin gets major (matching core's bump level)
@@ -824,10 +774,10 @@ describe('assembleReleasePlan', () => {
['plugin', makePkg('plugin', '1.0.0', { dependencies: { types: '~1.0.0' } })],
]);
- const changesets: Changeset[] = [{ id: 'cs1', releases: [{ name: 'core', type: 'minor' }], summary: 'Feature' }];
+ const bumpFiles: BumpFile[] = [{ id: 'cs1', releases: [{ name: 'core', type: 'minor' }], summary: 'Feature' }];
const graph = new DependencyGraph(packages);
const config = makeConfig({ fixed: [['core', 'types']] });
- const plan = assembleReleasePlan(changesets, packages, graph, config);
+ const plan = assembleReleasePlan(bumpFiles, packages, graph, config);
// core: minor (explicit), types: minor (fixed group), plugin: patch (types out of range)
expect(plan.releases).toHaveLength(3);
@@ -845,9 +795,9 @@ describe('assembleReleasePlan', () => {
['d', makePkg('d', '1.0.0', { dependencies: { c: '~1.0.0' } })],
]);
- const changesets: Changeset[] = [{ id: 'cs1', releases: [{ name: 'a', type: 'minor' }], summary: 'Feature' }];
+ const bumpFiles: BumpFile[] = [{ id: 'cs1', releases: [{ name: 'a', type: 'minor' }], summary: 'Feature' }];
const graph = new DependencyGraph(packages);
- const plan = assembleReleasePlan(changesets, packages, graph, makeConfig());
+ const plan = assembleReleasePlan(bumpFiles, packages, graph, makeConfig());
// a: minor (1.1.0, breaks ~1.0.0)
// b: patch (1.0.1, satisfies ~1.0.0 on c) → chain stops
@@ -867,7 +817,7 @@ describe('assembleReleasePlan', () => {
['unrelated', makePkg('unrelated', '1.0.0')],
]);
- const changesets: Changeset[] = [
+ const bumpFiles: BumpFile[] = [
{
id: 'cs1',
releases: [
@@ -879,7 +829,7 @@ describe('assembleReleasePlan', () => {
];
const graph = new DependencyGraph(packages);
- const plan = assembleReleasePlan(changesets, packages, graph, makeConfig());
+ const plan = assembleReleasePlan(bumpFiles, packages, graph, makeConfig());
expect(plan.releases).toHaveLength(1);
expect(plan.releases[0]!.name).toBe('core');
@@ -895,9 +845,9 @@ describe('assembleReleasePlan', () => {
['plugin', makePkg('plugin', '1.0.0', { peerDependencies: { core: 'workspace:*' } })],
]);
- const changesets: Changeset[] = [{ id: 'cs1', releases: [{ name: 'core', type: 'minor' }], summary: 'Feature' }];
+ const bumpFiles: BumpFile[] = [{ id: 'cs1', releases: [{ name: 'core', type: 'minor' }], summary: 'Feature' }];
const graph = new DependencyGraph(packages);
- const plan = assembleReleasePlan(changesets, packages, graph, makeConfig());
+ const plan = assembleReleasePlan(bumpFiles, packages, graph, makeConfig());
expect(plan.warnings.some((w) => w.includes('workspace:*') && w.includes('plugin'))).toBe(true);
});
diff --git a/packages/bumpy/test/helpers.ts b/packages/bumpy/test/helpers.ts
index 33cbe4a..59484ef 100644
--- a/packages/bumpy/test/helpers.ts
+++ b/packages/bumpy/test/helpers.ts
@@ -6,7 +6,7 @@ import { mkdtemp, rm } from 'node:fs/promises';
import { tmpdir } from 'node:os';
import { resolve } from 'node:path';
import { execFileSync } from 'node:child_process';
-import type { WorkspacePackage, PlannedRelease, BumpType, BumpyConfig, Changeset, ReleasePlan } from '../src/types.ts';
+import type { WorkspacePackage, PlannedRelease, BumpType, BumpyConfig, BumpFile, ReleasePlan } from '../src/types.ts';
import { DEFAULT_CONFIG } from '../src/types.ts';
// ---- Factory functions ----
@@ -46,31 +46,31 @@ export function makeConfig(overrides: Partial = {}): BumpyConfig {
export function makeRelease(
name: string,
newVersion: string,
- opts: Partial> = {},
+ opts: Partial> = {},
): PlannedRelease {
return {
name,
type: opts.type ?? 'patch',
oldVersion: opts.oldVersion ?? '0.0.0',
newVersion,
- changesets: opts.changesets ?? [],
+ bumpFiles: opts.bumpFiles ?? [],
isDependencyBump: opts.isDependencyBump ?? false,
isCascadeBump: opts.isCascadeBump ?? false,
};
}
-/** Create a Changeset for testing */
-export function makeChangeset(
+/** Create a BumpFile for testing */
+export function makeBumpFile(
id: string,
releases: { name: string; type: BumpType }[],
summary = 'Test change',
-): Changeset {
+): BumpFile {
return { id, releases, summary };
}
/** Create a ReleasePlan for testing */
-export function makeReleasePlan(releases: PlannedRelease[], changesets: Changeset[] = []): ReleasePlan {
- return { releases, changesets, warnings: [] };
+export function makeReleasePlan(releases: PlannedRelease[], bumpFiles: BumpFile[] = []): ReleasePlan {
+ return { releases, bumpFiles, warnings: [] };
}
// ---- Temp git repo helpers ----