@varlock/bumpy 1.0.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/README.md +256 -0
  2. package/config-schema.json +327 -0
  3. package/dist/{add-CgCjs4d-.mjs → add-yP81c9_q.mjs} +23 -13
  4. package/dist/{ai-sMYUf3lP.mjs → ai-STKnq09z.mjs} +1 -1
  5. package/dist/{apply-release-plan-CczGWJTk.mjs → apply-release-plan-CPzu6JcF.mjs} +12 -7
  6. package/dist/{bump-file-CCLXMLA8.mjs → bump-file-Br2bTaWp.mjs} +36 -10
  7. package/dist/{changelog-github-Cd8uJHZI.mjs → changelog-github-DkACMj0j.mjs} +1 -1
  8. package/dist/check-D_0exKi6.mjs +87 -0
  9. package/dist/{ci-Bhx--Tj6.mjs → ci-CvaikKX1.mjs} +48 -33
  10. package/dist/{ci-setup-qz4Y3v7T.mjs → ci-setup-CARJFhcE.mjs} +3 -3
  11. package/dist/cli.mjs +31 -31
  12. package/dist/commit-message-BwsowSds.mjs +23 -0
  13. package/dist/{config-XZWUL3ma.mjs → config-D7Umr-fT.mjs} +6 -5
  14. package/dist/{fs-DYR2XuFE.mjs → fs-DnDogVn-.mjs} +16 -1
  15. package/dist/{generate-gYKTpvex.mjs → generate-BOLrTYWR.mjs} +74 -65
  16. package/dist/{git-CGHVXXKw.mjs → git-YDedMddc.mjs} +54 -2
  17. package/dist/index.d.mts +13 -2
  18. package/dist/index.mjs +8 -8
  19. package/dist/init-DJhMaceS.mjs +196 -0
  20. package/dist/{js-yaml-DpZfOoD4.mjs → package-manager-ByJ0wKYh.mjs} +79 -1
  21. package/dist/picomatch-DMmqYjgq.mjs +1870 -0
  22. package/dist/{publish-Cun-zQ1b.mjs → publish-CPZwqyWh.mjs} +10 -10
  23. package/dist/{publish-pipeline-BwBuKCIk.mjs → publish-pipeline-BFt96o_h.mjs} +5 -5
  24. package/dist/{release-plan-Bi5QNSEo.mjs → release-plan-CNOuSI-d.mjs} +2 -2
  25. package/dist/{shell-Dj7JRD_q.mjs → shell-CY7OD48z.mjs} +20 -2
  26. package/dist/{status-CfE63ti5.mjs → status-skGX8uU7.mjs} +6 -6
  27. package/dist/{version-19vVt9dv.mjs → version-CnXcbqi1.mjs} +13 -16
  28. package/dist/{workspace-C5ULTyUN.mjs → workspace-BHsAPUmC.mjs} +3 -3
  29. package/package.json +5 -1
  30. package/skills/add-change/SKILL.md +11 -3
  31. package/dist/check-BOoxpWqk.mjs +0 -51
  32. package/dist/init-lA9E5pEc.mjs +0 -22
  33. package/dist/migrate-DmOYgmfD.mjs +0 -121
  34. package/dist/package-manager-VCe10bjc.mjs +0 -80
  35. /package/dist/{clack-CDRCHrC-.mjs → clack-C6bVkGxf.mjs} +0 -0
  36. /package/dist/{dep-graph-E-9-eQ2J.mjs → dep-graph-DiLeAhl9.mjs} +0 -0
  37. /package/dist/{names-9VubBmL0.mjs → names-C-TuOPbd.mjs} +0 -0
  38. /package/dist/{semver-DfQyVLM_.mjs → semver-BJzWIuRz.mjs} +0 -0
package/README.md ADDED
@@ -0,0 +1,256 @@
1
+ <p align="center">
2
+ <a href="https://bumpy.varlock.dev" target="_blank" rel="noopener noreferrer">
3
+ <img src="https://raw.githubusercontent.com/dmno-dev/bumpy/refs/heads/main/images/github-readme-banner.png" alt="Bumpy banner">
4
+ </a>
5
+ </p>
6
+ <br/>
7
+ <p align="center">
8
+ <a href="https://npmjs.com/package/@varlock/bumpy"><img src="https://img.shields.io/npm/v/@varlock/bumpy.svg" alt="npm package"></a>
9
+ <a href="https://github.com/dmno-dev/bumpy/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/@varlock/bumpy.svg" alt="license"></a>
10
+ <a href="https://github.com/dmno-dev/bumpy/actions/workflows/ci.yaml"><img src="https://img.shields.io/github/actions/workflow/status/dmno-dev/bumpy/ci.yaml?style=flat&logo=github&label=CI" alt="build status"></a>
11
+ <a href="https://chat.dmno.dev"><img src="https://img.shields.io/badge/chat-discord-5865F2?style=flat&logo=discord" alt="discord chat"></a>
12
+ </p>
13
+ <br/>
14
+
15
+ # @varlock/bumpy 🐸
16
+
17
+ A modern package versioning and changelog generation tool — built for monorepos (works great in single packages too).
18
+
19
+ ## How It Works
20
+
21
+ Bumpy uses **bump files** (you may know them as "changesets" if coming from [that tool 🦋](https://github.com/changesets/changesets)) — small markdown files that declare an intent to release packages with a bump level (patch/minor/major), and a description that ends up in changelogs. Developers create these files as part of their PRs, and these files are then used to consolidate changes, generate changelogs, and trigger publishing. Specifically:
22
+
23
+ - Devs/agents create bump files as part of their PRs (using `bumpy add` or manually)
24
+ - A pre-push git hook can enforce bump files exist for changed packages
25
+ - In CI, a workflow checks PRs for bump files, leaves a comment on the PR detailing changed packages
26
+ - As PRs merge to the base branch, a "release PR" is kept up to date
27
+ - Shows what packages will be released and their changelogs
28
+ — Including packages bumped automatically due to dependency relationships
29
+ - When release PR is merged, publishing is triggered
30
+ - Oending bump files are deleted and packages are published with updated versions and changelogs
31
+
32
+ All of this is automated via two simple GitHub Actions workflows (see [CI setup](#ci--github-actions) below). You can also run everything locally with `bumpy status`, `bumpy version`, and `bumpy publish`.
33
+
34
+ ### Example bump file
35
+
36
+ `.bumpy/add-user-language.md`:
37
+
38
+ ```markdown
39
+ ---
40
+ '@myorg/core': minor
41
+ '@myorg/utils': patch
42
+ ---
43
+
44
+ Added user language preference to the core config.
45
+ Fixed locale fallback logic in utils.
46
+ ```
47
+
48
+ ## Features
49
+
50
+ - **All package managers** — npm, pnpm, yarn, and bun workspaces
51
+ - **Smart dependency propagation** — configurable rules for how version bumps cascade through your dependency graph (see [version propagation docs](https://github.com/dmno-dev/bumpy/blob/main/docs/version-propagation.md))
52
+ - **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.
53
+ - **Flexible package management** — include/exclude any package individually via per-package config, glob patterns, or `privatePackages` setting
54
+ - **Non-interactive CLI** — `bumpy add` works fully non-interactively for CI/CD and AI-assisted development
55
+ - **Aggregated GitHub releases** — optionally create a single consolidated release instead of one per package
56
+ - **Auto-generate from commits** — `bumpy generate` creates bump files from branch commits — works with any commit style, with enhanced detection for conventional commits
57
+ - **Pluggable changelog formatters** — built-in `"default"` and `"github"` formatters, or write your own
58
+ - **Zero runtime dependencies** — dependencies are minimal and bundled at release time
59
+
60
+ ## Getting Started
61
+
62
+ ```bash
63
+ # Install
64
+ bun add -d @varlock/bumpy # or npm/pnpm/yarn
65
+
66
+ # Initialize (creates .bumpy/ directory and config, migrates from changesets if applicable)
67
+ bunx bumpy init
68
+
69
+ # Create a bump file
70
+ bunx bumpy add
71
+
72
+ # Preview the release plan
73
+ bunx bumpy status
74
+ ```
75
+
76
+ Then set up CI to automate versioning and publishing (see below).
77
+
78
+ ## CI / GitHub Actions
79
+
80
+ No separate action to rely on — just call `bumpy ci` directly in your workflows. Two commands handle the entire release lifecycle:
81
+
82
+ - **`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.
83
+ - **`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.
84
+
85
+ _examples use bun, but works with Node.js_
86
+
87
+ ### PR check workflow
88
+
89
+ ```yaml
90
+ # .github/workflows/bumpy-check.yml
91
+ name: Bumpy Check
92
+ on: pull_request
93
+
94
+ jobs:
95
+ check:
96
+ runs-on: ubuntu-latest
97
+ permissions:
98
+ pull-requests: write
99
+ steps:
100
+ - uses: actions/checkout@v6
101
+ - uses: oven-sh/setup-bun@v2
102
+ - run: bun install
103
+ - run: bunx @varlock/bumpy ci check
104
+ env:
105
+ GH_TOKEN: ${{ github.token }}
106
+ BUMPY_GH_TOKEN: ${{ secrets.BUMPY_GH_TOKEN }} # additional PAT (optional)
107
+ ```
108
+
109
+ ### Release workflow
110
+
111
+ ```yaml
112
+ # .github/workflows/bumpy-release.yml — trusted publishing (OIDC, no secret needed)
113
+ name: Bumpy Release
114
+ on:
115
+ push:
116
+ branches: [main]
117
+
118
+ jobs:
119
+ release:
120
+ runs-on: ubuntu-latest
121
+ permissions:
122
+ contents: write
123
+ pull-requests: write
124
+ id-token: write # required for npm trusted publishing (OIDC)
125
+ steps:
126
+ - uses: actions/checkout@v6
127
+ with:
128
+ fetch-depth: 0
129
+ - uses: oven-sh/setup-bun@v2
130
+ - uses: actions/setup-node@v6
131
+ with:
132
+ node-version: lts/*
133
+ - run: bun install
134
+ - run: bunx @varlock/bumpy ci release
135
+ env:
136
+ GH_TOKEN: ${{ github.token }}
137
+ BUMPY_GH_TOKEN: ${{ secrets.BUMPY_GH_TOKEN }} # additonal PAT, needed to trigger CI checks on release PR
138
+ ```
139
+
140
+ > **Trusted publishing setup:** Configure each package on [npmjs.com](https://docs.npmjs.com/trusted-publishers/) → Package Settings → Trusted Publishers → GitHub Actions. Specify your org/user, repo, and the workflow filename (`bumpy-release.yml`). No `NPM_TOKEN` secret needed. Requires npm >= 11.5.1 — bumpy will warn if your version is too old.
141
+
142
+ <details>
143
+ <summary>Alternative: token-based auth (NPM_TOKEN secret)</summary>
144
+
145
+ ```yaml
146
+ # .github/workflows/bumpy-release.yml — token-based auth
147
+ name: Bumpy Release
148
+ on:
149
+ push:
150
+ branches: [main]
151
+
152
+ jobs:
153
+ release:
154
+ runs-on: ubuntu-latest
155
+ permissions:
156
+ contents: write
157
+ pull-requests: write
158
+ steps:
159
+ - uses: actions/checkout@v6
160
+ with:
161
+ fetch-depth: 0
162
+ - uses: oven-sh/setup-bun@v2
163
+ - run: bun install
164
+ - run: bunx @varlock/bumpy ci release
165
+ env:
166
+ GH_TOKEN: ${{ github.token }}
167
+ BUMPY_GH_TOKEN: ${{ secrets.BUMPY_GH_TOKEN }}
168
+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
169
+ ```
170
+
171
+ </details>
172
+
173
+ You can also use `bumpy ci release --auto-publish` to version + publish directly on merge without the intermediate PR.
174
+
175
+ ### Token setup
176
+
177
+ The default `github.token` works for basic functionality, but GitHub's anti-recursion guard means PRs created by the default token won't trigger other workflows — so your regular CI (tests, linting, etc.) won't run automatically on the Version Packages PR. To fix this, provide a `BUMPY_GH_TOKEN` secret using either a **fine-grained PAT** or a **GitHub App token**. See the [full token setup guide](https://github.com/dmno-dev/bumpy/blob/main/docs/github-actions.md#token-setup) for details.
178
+
179
+ Run `bumpy ci setup` for interactive guidance, or set it up manually:
180
+
181
+ 1. Create a [fine-grained personal access token](https://github.com/settings/personal-access-tokens) with:
182
+ - **Repository access:** your repo only
183
+ - **Permissions:** Contents (read & write), Pull requests (read & write)
184
+ 2. Add it as a repository secret named `BUMPY_GH_TOKEN`
185
+ 3. Add it to your release workflow:
186
+ ```yaml
187
+ - run: bunx @varlock/bumpy ci release
188
+ env:
189
+ GH_TOKEN: ${{ github.token }}
190
+ BUMPY_GH_TOKEN: ${{ secrets.BUMPY_GH_TOKEN }}
191
+ ```
192
+
193
+ ### Local versioning and publishing
194
+
195
+ If you prefer to version and publish locally instead of via CI:
196
+
197
+ ```bash
198
+ bumpy version # consume bump files, update versions and changelogs
199
+ bumpy publish # pack and publish, create git tags, push tags, and create GitHub releases
200
+ ```
201
+
202
+ ## AI Integration
203
+
204
+ Bumpy ships with an AI skill that teaches LLMs how to create bump files.
205
+
206
+ ```bash
207
+ bumpy ai setup --target claude # installs Claude Code plugin
208
+ bumpy ai setup --target opencode # creates OpenCode command file
209
+ bumpy ai setup --target cursor # creates Cursor rule file
210
+ bumpy ai setup --target codex # creates Codex instruction file
211
+ ```
212
+
213
+ The skill teaches the AI to examine git changes, identify affected packages, choose bump levels, and create bump files with `bumpy add`. It also instructs the AI to keep existing bump files up to date as work continues on a branch — updating packages, bump levels, and summaries to reflect the final state of changes.
214
+
215
+ ## Documentation
216
+
217
+ - [Bump file format](https://github.com/dmno-dev/bumpy/blob/main/docs/bump-files.md) — syntax, bump levels, cascade control
218
+ - [Configuration reference](https://github.com/dmno-dev/bumpy/blob/main/docs/configuration.md) — all `.bumpy/_config.json` and per-package options
219
+ - [CLI reference](https://github.com/dmno-dev/bumpy/blob/main/docs/cli.md) — every command with flags and examples
220
+ - [GitHub Actions setup](https://github.com/dmno-dev/bumpy/blob/main/docs/github-actions.md) — CI workflows, token setup, trusted publishing
221
+ - [Version propagation](https://github.com/dmno-dev/bumpy/blob/main/docs/version-propagation.md) — how dependency bumps cascade through your graph
222
+
223
+ ## Why files instead of conventional commits?
224
+
225
+ Tools like semantic-release infer version bumps from commit messages (`feat:` → minor, `fix:` → patch). This works for simple projects but breaks down in monorepos — a single PR often touches multiple packages with different bump levels, squash merges lose per-commit metadata, and commit messages are a poor place to write user-facing changelog entries. Bump files are explicit, reviewable in the PR diff, and can describe changes in language meant for consumers rather than developers. If you prefer commit-based workflows, `bumpy generate` can bridge the gap by auto-creating bump files from your branch commits — it works with any commit style, not just conventional commits.
226
+
227
+ ## Why not just use changesets?
228
+
229
+ Bumpy is built as a successor to [@changesets/changesets](https://github.com/changesets/changesets). Changesets is mature and widely adopted, but has stagnated — hundreds of open issues around core design problems that are unlikely to be fixed without a rewrite. See [differences from changesets](https://github.com/dmno-dev/bumpy/blob/main/docs/differences-from-changesets.md) for a detailed comparison with links to specific issues. The biggest pain points bumpy addresses:
230
+
231
+ - **Sane dependency propagation** — changesets hardcodes aggressive behavior where a minor bump triggers a major bump on all peer dependents. Bumpy uses a [three-phase algorithm](https://github.com/dmno-dev/bumpy/blob/main/docs/version-propagation.md) with sensible defaults and full configurability.
232
+ - **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.
233
+ - **Custom publish commands** — changesets is hardcoded to `npm publish`. Bumpy supports per-package custom publish for VSCode extensions, Docker images, JSR, etc.
234
+ - **Flexible package management** — changesets treats all private packages the same. Bumpy lets you include/exclude any package individually.
235
+ - **CI without a separate action** — just `bunx @varlock/bumpy ci check` in any workflow, no bot or action to install.
236
+ - **Automatic migration** — `bumpy init` detects `.changeset/`, renames it to `.bumpy/`, migrates config, keeps pending files, and offers to uninstall `@changesets/cli`.
237
+
238
+ ## Development
239
+
240
+ ```bash
241
+ bun install # install deps
242
+ bun test # run tests
243
+ bun run build # build CLI
244
+ bunx bumpy --help # invoke built cli
245
+ ```
246
+
247
+ ## Roadmap
248
+
249
+ - Prerelease mode (for now, use [pkg.pr.new](https://github.com/stackblitz-labs/pkg.pr.new) for branch preview packages)
250
+ - Standalone binary for use outside of JS projects
251
+ - Better support for versioning non-JS packages and usage without package.json files
252
+ - Plugin system for different publish targets, and support multiple targets per package
253
+ - Tracking workspace-level / non-publishable changes
254
+ - More frogs 🐸
255
+
256
+ <!-- note this readme is also used for the bumpy package! -->
@@ -0,0 +1,327 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://raw.githubusercontent.com/dmno-dev/bumpy/main/packages/bumpy/config-schema.json",
4
+ "title": "Bumpy Configuration",
5
+ "description": "Configuration for @varlock/bumpy — monorepo versioning and changelog tool",
6
+ "type": "object",
7
+ "properties": {
8
+ "$schema": {
9
+ "type": "string",
10
+ "description": "Path or URL to the JSON schema"
11
+ },
12
+ "baseBranch": {
13
+ "type": "string",
14
+ "description": "Branch used for release comparisons",
15
+ "default": "main"
16
+ },
17
+ "access": {
18
+ "type": "string",
19
+ "enum": ["public", "restricted"],
20
+ "description": "Default npm publish access level",
21
+ "default": "public"
22
+ },
23
+ "versionCommitMessage": {
24
+ "type": "string",
25
+ "description": "Customize the commit message used when versioning. A plain string is used as-is. A path starting with \"./\" or \"../\" is loaded as a module that exports a function receiving the release plan and returning a message string."
26
+ },
27
+ "changelog": {
28
+ "description": "Changelog formatter — \"default\", \"github\", or path to a custom formatter. Can also be a tuple of [formatter, options]. Set to false to disable changelog generation.",
29
+ "default": "default",
30
+ "oneOf": [
31
+ { "type": "boolean", "const": false },
32
+ { "type": "string" },
33
+ {
34
+ "type": "array",
35
+ "items": [{ "type": "string" }, { "type": "object" }],
36
+ "minItems": 2,
37
+ "maxItems": 2
38
+ }
39
+ ]
40
+ },
41
+ "changedFilePatterns": {
42
+ "type": "array",
43
+ "description": "Glob patterns to filter which changed files count toward marking a package as changed. Can be overridden per-package.",
44
+ "items": { "type": "string" },
45
+ "default": ["**"]
46
+ },
47
+ "fixed": {
48
+ "type": "array",
49
+ "description": "Package groups that always bump together to the same version. Each element is an array of package name globs.",
50
+ "items": {
51
+ "type": "array",
52
+ "items": { "type": "string" }
53
+ },
54
+ "default": []
55
+ },
56
+ "linked": {
57
+ "type": "array",
58
+ "description": "Package groups that share the highest bump level. Each element is an array of package name globs.",
59
+ "items": {
60
+ "type": "array",
61
+ "items": { "type": "string" }
62
+ },
63
+ "default": []
64
+ },
65
+ "ignore": {
66
+ "type": "array",
67
+ "description": "Package name globs to exclude from versioning",
68
+ "items": { "type": "string" },
69
+ "default": []
70
+ },
71
+ "include": {
72
+ "type": "array",
73
+ "description": "Package name globs to explicitly include (overrides ignore and privatePackages)",
74
+ "items": { "type": "string" },
75
+ "default": []
76
+ },
77
+ "updateInternalDependencies": {
78
+ "type": "string",
79
+ "enum": ["patch", "minor", "out-of-range"],
80
+ "description": "When to update internal dependency version ranges",
81
+ "default": "out-of-range"
82
+ },
83
+ "dependencyBumpRules": {
84
+ "type": "object",
85
+ "description": "Controls how bumps propagate through dependency types",
86
+ "properties": {
87
+ "dependencies": { "$ref": "#/$defs/dependencyBumpRule" },
88
+ "devDependencies": { "$ref": "#/$defs/dependencyBumpRule" },
89
+ "peerDependencies": { "$ref": "#/$defs/dependencyBumpRule" },
90
+ "optionalDependencies": { "$ref": "#/$defs/dependencyBumpRule" }
91
+ },
92
+ "additionalProperties": false
93
+ },
94
+ "privatePackages": {
95
+ "type": "object",
96
+ "description": "Whether to version and/or create git tags for private packages",
97
+ "properties": {
98
+ "version": {
99
+ "type": "boolean",
100
+ "description": "Whether to version private packages",
101
+ "default": false
102
+ },
103
+ "tag": {
104
+ "type": "boolean",
105
+ "description": "Whether to create git tags for private packages",
106
+ "default": false
107
+ }
108
+ },
109
+ "additionalProperties": false
110
+ },
111
+ "allowCustomCommands": {
112
+ "description": "Allow per-package custom commands (buildCommand, publishCommand, checkPublished) defined in package.json \"bumpy\" fields. true = allow all, string[] = allow matching package name globs, false = only root-config commands allowed.",
113
+ "default": false,
114
+ "oneOf": [
115
+ { "type": "boolean" },
116
+ {
117
+ "type": "array",
118
+ "items": { "type": "string" }
119
+ }
120
+ ]
121
+ },
122
+ "packages": {
123
+ "type": "object",
124
+ "description": "Per-package config overrides, keyed by package name or glob pattern",
125
+ "additionalProperties": { "$ref": "#/$defs/packageConfig" }
126
+ },
127
+ "publish": {
128
+ "type": "object",
129
+ "description": "Publishing pipeline configuration",
130
+ "properties": {
131
+ "packManager": {
132
+ "type": "string",
133
+ "enum": ["auto", "npm", "pnpm", "bun", "yarn"],
134
+ "description": "Package manager to use for packing. \"auto\" detects from lockfile.",
135
+ "default": "auto"
136
+ },
137
+ "publishManager": {
138
+ "type": "string",
139
+ "enum": ["npm", "pnpm", "bun", "yarn"],
140
+ "description": "Command to use for publishing. npm supports OIDC/provenance.",
141
+ "default": "npm"
142
+ },
143
+ "publishArgs": {
144
+ "type": "array",
145
+ "items": { "type": "string" },
146
+ "description": "Extra args appended to the publish command (e.g., \"--provenance\")",
147
+ "default": []
148
+ },
149
+ "protocolResolution": {
150
+ "type": "string",
151
+ "enum": ["pack", "in-place", "none"],
152
+ "description": "How to handle workspace:/catalog: protocol resolution. \"pack\" = use PM's pack to build a clean tarball, \"in-place\" = rewrite package.json before publish, \"none\" = don't resolve.",
153
+ "default": "pack"
154
+ }
155
+ },
156
+ "additionalProperties": false
157
+ },
158
+ "aggregateRelease": {
159
+ "description": "GitHub release creation (requires gh CLI). false = individual release per package, true = single aggregated release, or an object with enabled and optional title (supports {{date}}).",
160
+ "default": false,
161
+ "oneOf": [
162
+ { "type": "boolean" },
163
+ {
164
+ "type": "object",
165
+ "properties": {
166
+ "enabled": {
167
+ "type": "boolean",
168
+ "description": "Whether to create an aggregated release"
169
+ },
170
+ "title": {
171
+ "type": "string",
172
+ "description": "Custom title for the aggregated release (supports {{date}})"
173
+ }
174
+ },
175
+ "required": ["enabled"],
176
+ "additionalProperties": false
177
+ }
178
+ ]
179
+ },
180
+ "gitUser": {
181
+ "type": "object",
182
+ "description": "Git identity used for CI commits",
183
+ "properties": {
184
+ "name": {
185
+ "type": "string",
186
+ "description": "Git user name",
187
+ "default": "bumpy-bot"
188
+ },
189
+ "email": {
190
+ "type": "string",
191
+ "description": "Git user email",
192
+ "default": "276066384+bumpy-bot@users.noreply.github.com"
193
+ }
194
+ },
195
+ "additionalProperties": false
196
+ },
197
+ "versionPr": {
198
+ "type": "object",
199
+ "description": "Customize the version PR created by bumpy ci release",
200
+ "properties": {
201
+ "title": {
202
+ "type": "string",
203
+ "description": "PR title",
204
+ "default": "🐸 Versioned release"
205
+ },
206
+ "branch": {
207
+ "type": "string",
208
+ "description": "Branch name for the version PR",
209
+ "default": "bumpy/version-packages"
210
+ },
211
+ "preamble": {
212
+ "type": "string",
213
+ "description": "HTML/markdown content prepended to the PR body"
214
+ }
215
+ },
216
+ "additionalProperties": false
217
+ }
218
+ },
219
+ "additionalProperties": false,
220
+ "$defs": {
221
+ "bumpType": {
222
+ "type": "string",
223
+ "enum": ["major", "minor", "patch"]
224
+ },
225
+ "dependencyBumpRule": {
226
+ "oneOf": [
227
+ {
228
+ "type": "object",
229
+ "properties": {
230
+ "trigger": {
231
+ "$ref": "#/$defs/bumpType",
232
+ "description": "Minimum bump level that triggers propagation"
233
+ },
234
+ "bumpAs": {
235
+ "description": "What level to bump the dependent (\"match\" mirrors the triggering level)",
236
+ "oneOf": [{ "$ref": "#/$defs/bumpType" }, { "type": "string", "const": "match" }]
237
+ }
238
+ },
239
+ "required": ["trigger", "bumpAs"],
240
+ "additionalProperties": false
241
+ },
242
+ {
243
+ "type": "boolean",
244
+ "const": false,
245
+ "description": "Set to false to disable propagation for this dependency type"
246
+ }
247
+ ]
248
+ },
249
+ "packageConfig": {
250
+ "type": "object",
251
+ "description": "Per-package configuration",
252
+ "properties": {
253
+ "managed": {
254
+ "type": "boolean",
255
+ "description": "Explicitly opt this package in or out of version management"
256
+ },
257
+ "access": {
258
+ "type": "string",
259
+ "enum": ["public", "restricted"],
260
+ "description": "Override the global access level"
261
+ },
262
+ "publishCommand": {
263
+ "description": "Custom command(s) to publish this package (replaces npm publish)",
264
+ "oneOf": [
265
+ { "type": "string" },
266
+ {
267
+ "type": "array",
268
+ "items": { "type": "string" }
269
+ }
270
+ ]
271
+ },
272
+ "buildCommand": {
273
+ "type": "string",
274
+ "description": "Command to run before publishing"
275
+ },
276
+ "registry": {
277
+ "type": "string",
278
+ "description": "Custom npm registry URL"
279
+ },
280
+ "skipNpmPublish": {
281
+ "type": "boolean",
282
+ "description": "Don't publish to npm (still creates git tags)"
283
+ },
284
+ "checkPublished": {
285
+ "type": "string",
286
+ "description": "Custom command that outputs the currently published version"
287
+ },
288
+ "changedFilePatterns": {
289
+ "type": "array",
290
+ "description": "Glob patterns to filter which changed files count toward marking this package as changed (overrides root setting)",
291
+ "items": { "type": "string" }
292
+ },
293
+ "dependencyBumpRules": {
294
+ "type": "object",
295
+ "description": "Per-package override for dependency propagation rules",
296
+ "properties": {
297
+ "dependencies": { "$ref": "#/$defs/dependencyBumpRule" },
298
+ "devDependencies": { "$ref": "#/$defs/dependencyBumpRule" },
299
+ "peerDependencies": { "$ref": "#/$defs/dependencyBumpRule" },
300
+ "optionalDependencies": { "$ref": "#/$defs/dependencyBumpRule" }
301
+ },
302
+ "additionalProperties": false
303
+ },
304
+ "cascadeTo": {
305
+ "type": "object",
306
+ "description": "Explicit cascade targets — glob pattern mapped to { trigger, bumpAs }",
307
+ "additionalProperties": {
308
+ "type": "object",
309
+ "properties": {
310
+ "trigger": {
311
+ "$ref": "#/$defs/bumpType",
312
+ "description": "Minimum bump level that triggers the cascade"
313
+ },
314
+ "bumpAs": {
315
+ "description": "What level to bump the target",
316
+ "oneOf": [{ "$ref": "#/$defs/bumpType" }, { "type": "string", "const": "match" }]
317
+ }
318
+ },
319
+ "required": ["trigger", "bumpAs"],
320
+ "additionalProperties": false
321
+ }
322
+ }
323
+ },
324
+ "additionalProperties": false
325
+ }
326
+ }
327
+ }
@@ -1,15 +1,17 @@
1
1
  import { n as log, o as __toESM, r as require_picocolors } from "./logger-C2dEe5Su.mjs";
2
- import { n as exists, t as ensureDir } from "./fs-DYR2XuFE.mjs";
3
- import { a as loadConfig, r as getBumpyDir, s as matchGlob } from "./config-XZWUL3ma.mjs";
4
- import { t as discoverPackages } from "./workspace-C5ULTyUN.mjs";
5
- import { t as DependencyGraph } from "./dep-graph-E-9-eQ2J.mjs";
6
- import { i as writeBumpFile } from "./bump-file-CCLXMLA8.mjs";
7
- import { n as getChangedFiles } from "./git-CGHVXXKw.mjs";
8
- import { c as ot, d as yt, i as _t, l as pt, o as gt, r as Ot, s as mt, t as unwrap, u as wt } from "./clack-CDRCHrC-.mjs";
9
- import { n as slugify, t as randomName } from "./names-9VubBmL0.mjs";
2
+ import { n as exists, t as ensureDir } from "./fs-DnDogVn-.mjs";
3
+ import { a as loadConfig, o as loadPackageConfig, r as getBumpyDir, s as matchGlob } from "./config-D7Umr-fT.mjs";
4
+ import { t as discoverPackages } from "./workspace-BHsAPUmC.mjs";
5
+ import { t as DependencyGraph } from "./dep-graph-DiLeAhl9.mjs";
6
+ import { i as writeBumpFile } from "./bump-file-Br2bTaWp.mjs";
7
+ import { r as getChangedFiles } from "./git-YDedMddc.mjs";
8
+ import { c as ot, d as yt, i as _t, l as pt, o as gt, r as Ot, s as mt, t as unwrap, u as wt } from "./clack-C6bVkGxf.mjs";
9
+ import { n as slugify, t as randomName } from "./names-C-TuOPbd.mjs";
10
+ import { t as require_picomatch } from "./picomatch-DMmqYjgq.mjs";
10
11
  import { relative, resolve } from "node:path";
11
12
  import * as readline from "node:readline";
12
13
  //#region src/prompts/bump-select.ts
14
+ var import_picomatch = /* @__PURE__ */ __toESM(require_picomatch(), 1);
13
15
  var import_picocolors = /* @__PURE__ */ __toESM(require_picocolors(), 1);
14
16
  const LEVELS = [
15
17
  "none",
@@ -184,9 +186,9 @@ async function addCommand(rootDir, opts) {
184
186
  if (opts.empty) {
185
187
  const filename = opts.name ? slugify(opts.name) : randomName();
186
188
  const filePath = resolve(bumpyDir, `${filename}.md`);
187
- const { writeText } = await import("./fs-DYR2XuFE.mjs").then((n) => n.r);
189
+ const { writeText } = await import("./fs-DnDogVn-.mjs").then((n) => n.r);
188
190
  await writeText(filePath, "---\n---\n");
189
- log.success(`Created empty bump file: .bumpy/${filename}.md`);
191
+ log.success(`🐸 Created empty bump file: .bumpy/${filename}.md`);
190
192
  return;
191
193
  }
192
194
  let releases;
@@ -206,10 +208,18 @@ async function addCommand(rootDir, opts) {
206
208
  }
207
209
  const baseBranch = config.baseBranch;
208
210
  const changedFiles = getChangedFiles(rootDir, baseBranch);
211
+ const matchers = /* @__PURE__ */ new Map();
212
+ for (const [name, pkg] of pkgs) {
213
+ const patterns = (await loadPackageConfig(pkg.dir, config, name)).changedFilePatterns ?? config.changedFilePatterns;
214
+ matchers.set(name, (0, import_picomatch.default)(patterns));
215
+ }
209
216
  const changedPackageNames = /* @__PURE__ */ new Set();
210
217
  for (const file of changedFiles) for (const [name, pkg] of pkgs) {
211
218
  const pkgRelDir = relative(rootDir, pkg.dir);
212
- if (file.startsWith(pkgRelDir + "/")) changedPackageNames.add(name);
219
+ if (file.startsWith(pkgRelDir + "/")) {
220
+ const relToPackage = file.slice(pkgRelDir.length + 1);
221
+ if (matchers.get(name)(relToPackage)) changedPackageNames.add(name);
222
+ }
213
223
  }
214
224
  const bumpSelectResult = await bumpSelectPrompt([...pkgs.values()].map((pkg) => ({
215
225
  name: pkg.name,
@@ -287,11 +297,11 @@ async function addCommand(rootDir, opts) {
287
297
  if (await exists(resolve(bumpyDir, `${filename}.md`))) filename = `${filename}-${Date.now()}`;
288
298
  await writeBumpFile(rootDir, filename, releases, summary);
289
299
  if (opts.packages) {
290
- log.success(`Created bump file: .bumpy/${filename}.md`);
300
+ log.success(`🐸 Created bump file: .bumpy/${filename}.md`);
291
301
  for (const r of releases) log.dim(` ${r.name}: ${r.type}${formatCascade(r)}`);
292
302
  } else {
293
303
  wt(releases.map((r) => `${import_picocolors.default.cyan(r.name)} ${import_picocolors.default.dim("→")} ${import_picocolors.default.bold(r.type)}${formatCascade(r)}`).join("\n"), "Bump file");
294
- gt(import_picocolors.default.green(`Created .bumpy/${filename}.md`));
304
+ gt(import_picocolors.default.green(`🐸 Created .bumpy/${filename}.md`));
295
305
  }
296
306
  }
297
307
  function formatCascade(r) {
@@ -1,5 +1,5 @@
1
1
  import { n as log } from "./logger-C2dEe5Su.mjs";
2
- import { d as writeText, n as exists, t as ensureDir } from "./fs-DYR2XuFE.mjs";
2
+ import { f as writeText, n as exists, t as ensureDir } from "./fs-DnDogVn-.mjs";
3
3
  import { dirname, resolve } from "node:path";
4
4
  import { readFile } from "node:fs/promises";
5
5
  import { execSync } from "node:child_process";