Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .bumpy/propagation-refactor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@varlock/bumpy': minor
---

Restructured version propagation into Phase A/B/C architecture. Phase A (out-of-range fixes) always runs — peer deps now match the triggering bump level instead of always forcing major. Added workspace:^ protocol resolution for range checking. Removed minor-isolated and specificDependencyRules. Added none bump type and patch-isolated validation. Added warnings for ^0.x peer dep propagation and workspace:\* on peer deps.
97 changes: 1 addition & 96 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,105 +7,10 @@ alwaysApply: false
Default to using Bun instead of Node.js.

- Use `bun <file>` instead of `node <file>` or `ts-node <file>`
- Use `bun test` instead of `jest` or `vitest`
- Use `bun build <file.html|file.ts|file.css>` instead of `webpack` or `esbuild`
- Use `bun install` instead of `npm install` or `yarn install` or `pnpm install`
- Use `bun run <script>` instead of `npm run <script>` or `yarn run <script>` or `pnpm run <script>`
- Use `bunx <package> <command>` instead of `npx <package> <command>`
- Bun automatically loads .env, so don't use dotenv.

## APIs

- `Bun.serve()` supports WebSockets, HTTPS, and routes. Don't use `express`.
- `bun:sqlite` for SQLite. Don't use `better-sqlite3`.
- `Bun.redis` for Redis. Don't use `ioredis`.
- `Bun.sql` for Postgres. Don't use `pg` or `postgres.js`.
- `WebSocket` is built-in. Don't use `ws`.
- Prefer `Bun.file` over `node:fs`'s readFile/writeFile
- Bun.$`ls` instead of execa.

## Testing

Use `bun test` to run tests.

```ts#index.test.ts
import { test, expect } from "bun:test";

test("hello world", () => {
expect(1).toBe(1);
});
```

## Frontend

Use HTML imports with `Bun.serve()`. Don't use `vite`. HTML imports fully support React, CSS, Tailwind.

Server:

```ts#index.ts
import index from "./index.html"

Bun.serve({
routes: {
"/": index,
"/api/users/:id": {
GET: (req) => {
return new Response(JSON.stringify({ id: req.params.id }));
},
},
},
// optional websocket support
websocket: {
open: (ws) => {
ws.send("Hello, world!");
},
message: (ws, message) => {
ws.send(message);
},
close: (ws) => {
// handle close
}
},
development: {
hmr: true,
console: true,
}
})
```

HTML files can import .tsx, .jsx or .js files directly and Bun's bundler will transpile & bundle automatically. `<link>` tags can point to stylesheets and Bun's CSS bundler will bundle.

```html#index.html
<html>
<body>
<h1>Hello, world!</h1>
<script type="module" src="./frontend.tsx"></script>
</body>
</html>
```

With the following `frontend.tsx`:

```tsx#frontend.tsx
import React from "react";
import { createRoot } from "react-dom/client";

// import .css files directly and it works
import './index.css';

const root = createRoot(document.body);

export default function Frontend() {
return <h1>Hello, world!</h1>;
}

root.render(<Frontend />);
```

Then, run index.ts

```sh
bun --hot ./index.ts
```

For more information, read the Bun API docs in `node_modules/bun-types/docs/**.mdx`.
Do NOT use `bun test` to run tests. Instead call `bun run test` - which will call the correct test command.
28 changes: 25 additions & 3 deletions DIFFERENCES_FROM_CHANGESETS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,36 @@ Bumpy is built as a modern successor to [@changesets/changesets](https://github.

### Sane dependency bump propagation

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 single biggest community complaint. Bumpy makes propagation **fully configurable** at 5 levels with sensible defaults (peer deps only trigger on major, dev deps never propagate).
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 single biggest community complaint.

Bumpy splits propagation into three phases inside an iterative loop:

- **Phase A (always runs):** fixes broken version ranges — peer dep bumps match the triggering bump level, regular deps get patch, dev deps are skipped. Cannot be disabled.
- **Phase B:** enforces fixed/linked group constraints.
- **Phase C (opt-in):** proactive propagation via configurable `dependencyBumpRules` and `cascadeTo` rules. Off by default (`updateInternalDependencies: "out-of-range"`).

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
- 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.

- [changesets#1011](https://github.com/changesets/changesets/issues/1011) — peerDependencies cause unnecessary major bumps (70+ thumbs-up)
- [changesets#822](https://github.com/changesets/changesets/issues/822) — unexpected major version bumps from peer deps
- [changesets#1126](https://github.com/changesets/changesets/issues/1126) — peer dep bumping is too aggressive
- [changesets#1228](https://github.com/changesets/changesets/issues/1228) — allow configuring peer dep bump behavior
- [changesets#1228](https://github.com/changesets/changesets/issues/1228) — allow configuring peer dep bump behavior / 0.x versions
- [changesets#827](https://github.com/changesets/changesets/issues/827) — peer dep bump propagation should be configurable
- [changesets#960](https://github.com/changesets/changesets/issues/960) — unexpected version bumps in monorepos
- [changesets#944](https://github.com/changesets/changesets/issues/944) — devDependencies should be configurable (17 thumbs-up)
- [changesets#568](https://github.com/changesets/changesets/issues/568) — allow dependents to not be automatically bumped
- [changesets#1128](https://github.com/changesets/changesets/issues/1128) — `updateInternalDependencies` only on certain packages
- [changesets#808](https://github.com/changesets/changesets/issues/808) — ignore some packages on `updateInternalDependencies`
- [changesets#1819](https://github.com/changesets/changesets/issues/1819) — support major version propagation to dependents (`bumpAs: "match"`)
- [changesets#1735](https://github.com/changesets/changesets/issues/1735) — unidirectional dependency relationships (solved by `cascadeTo`)

### Custom publish commands

Expand All @@ -34,6 +55,7 @@ Changesets uses `npm publish` even in Yarn/pnpm workspaces, so `workspace:^` and

- [changesets#432](https://github.com/changesets/changesets/issues/432) — workspace: ranges not resolved (33 comments)
- [changesets#1290](https://github.com/changesets/changesets/issues/1290) — workspace:^ not handled correctly
- [changesets#1421](https://github.com/changesets/changesets/issues/1421) — workspace:^ bumped on patch despite `updateInternalDependencies: "minor"`
- [changesets#1229](https://github.com/changesets/changesets/issues/1229) — workspace: protocol causes publish failures
- [changesets#1468](https://github.com/changesets/changesets/issues/1468) — workspace:^ published as-is (16 thumbs-up)
- [changesets#1454](https://github.com/changesets/changesets/issues/1454) — publishing with Yarn is broken (38 thumbs-up)
Expand Down Expand Up @@ -119,7 +141,7 @@ Custom changelog formatters with full context (release info, changesets, dates).

### CI without a separate action

`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.
`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

Expand Down
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@ Changesets is mature and widely adopted, but has stagnated. The community has hu

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.

Bumpy makes this **fully configurable** at multiple levels, with sensible defaults:
Bumpy splits propagation into three clear phases with sensible defaults:

- **Global rules by dependency type** — e.g., peer dep bumps only propagate on major (not minor)
- **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"]`
- **Per-specific-dependency rules** — "when core bumps, bump me at X"
- **Source-side cascade rules** — "when I bump, cascade to `plugins/*`" (with glob support)
- **Per-changeset cascade overrides** — explicit downstream control in each bump file
- **Isolated bumps** — `minor-isolated` / `patch-isolated` skip propagation entirely

### Custom publish commands

Expand Down
3 changes: 3 additions & 0 deletions bunfig.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

[test]
root = "packages/bumpy"
Loading