You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: unify bundledDependencies story (propagation + change detection)
Explain that bundledDependencies is one declaration driving two
behaviors β cascade on the dep's own release (internal workspace deps
only) and change-detection flagging when its range is edited (any dep).
Add an explicit "internal workspace deps: bundled vs not" note, since
that's the knob for which devDependencies affect published output.
Rename the heading and fix the inbound anchor links.
Copy file name to clipboardExpand all lines: docs/configuration.md
+17-6Lines changed: 17 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ A package is "changed" (and so needs a bump file) when a changed file inside it
34
34
35
35
So when `package.json` is the **only** changed file in a package, bumpy diffs it against the base branch and only flags the package if a field **outside**`ignoredPackageJsonFields` changed. The default ignore list is `["devDependencies"]`, meaning dev-only dependency updates don't require a bump file. Every other field β `dependencies`, `exports`, `bin`, `files`, `description`, `scripts`, etc. β still counts.
36
36
37
-
One exception keeps this safe: a changed `devDependencies` entry that matches the package's [`bundledDependencies`](#example-a-bundled-dependency-consumer-side)**does** flag the package, since a bundled dep ships in the published output.
37
+
One exception keeps this safe: a changed `devDependencies` entry that matches the package's [`bundledDependencies`](#bundled-dependencies-consumer-side)**does** flag the package, since a bundled dep ships in the published output.
38
38
39
39
To relax additional fields (e.g. treat `scripts` changes as non-releasing too), extend the list:
40
40
@@ -242,11 +242,9 @@ Or with custom trigger/bumpAs:
242
242
}
243
243
```
244
244
245
-
### Example: a bundled dependency (consumer-side)
245
+
### Bundled dependencies (consumer-side)
246
246
247
-
When a package bundles a dependency into its published output (inlined by esbuild/tsup/rollup), a change to that dependency changes what consumers receive β so the bundler must be republished. This is common with deps declared under `devDependencies`, since they aren't resolved at runtime.
248
-
249
-
The simplest way to express this is `bundledDependencies`. Any bump to a listed dep republishes this package with a **patch** bump:
247
+
When a package bundles a dependency into its published output (inlined by esbuild/tsup/rollup), a change to that dependency changes what consumers receive β so the bundler must be republished. This is common with deps declared under `devDependencies`, since they aren't resolved at runtime. List them in `bundledDependencies`:
250
248
251
249
```json
252
250
{
@@ -257,7 +255,20 @@ The simplest way to express this is `bundledDependencies`. Any bump to a listed
257
255
}
258
256
```
259
257
260
-
This is shorthand for a `cascadeFrom` rule of `{ "trigger": "patch", "bumpAs": "patch" }`. If you re-export the bundled dependency's API and want **proportional** bumps (a minor in the dep β a minor here), use `cascadeFrom` directly instead β an explicit `cascadeFrom` rule for the same source takes precedence:
258
+
`bundledDependencies` declares intent β "this dependency ships inside my output" β and that drives **two** behaviors:
259
+
260
+
1.**Propagation** β when the bundled dependency gets its **own release**, this package is cascaded a **patch** bump (shorthand for a `cascadeFrom` rule of `{ "trigger": "patch", "bumpAs": "patch" }`). This only applies to **internal workspace** deps, since bumpy only releases packages in your workspace.
261
+
2.**Change detection** β when the bundled dependency's version is edited in **this** package's `package.json` (e.g. a Dependabot PR, or a manual bump), this package is flagged as changed and needs a bump file β even though `devDependencies` edits are normally ignored (see [Change detection](#change-detection-and-packagejson-fields)). This applies to **any** bundled dep, internal or external.
262
+
263
+
So for an **internal** bundled workspace dep, both paths fire; for an **external** bundled dep (e.g. a published npm package you inline), only change detection applies β listing it is still useful, and is a harmless no-op for propagation.
264
+
265
+
#### Internal workspace deps: bundled vs. not
266
+
267
+
This is exactly the knob for "which devDependencies affect my published output." An internal workspace package listed under `devDependencies` is, by default, treated as dev-only β its releases don't cascade ([`dependencyBumpRules.devDependencies` is `false`](#dependency-bump-rules)) and bumping its range doesn't flag you. Add it to `bundledDependencies` to flip both: now its releases republish you, and editing its range flags you. Leave it out and it stays dev-only. No global setting is involved β it's per-dependency, per-consumer.
268
+
269
+
#### Proportional bumps
270
+
271
+
If you re-export the bundled dependency's API and want **proportional** bumps (a minor in the dep β a minor here), use `cascadeFrom` directly instead β an explicit `cascadeFrom` rule for the same source takes precedence over the `bundledDependencies` patch default:
Copy file name to clipboardExpand all lines: docs/version-propagation.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ The bump type applied to the dependent depends on the dependency type:
25
25
26
26
For peer deps, "matches the triggering bump" means if `core` gets a minor bump that breaks the range, `plugin` also gets a minor bump. This keeps version bumps proportional β especially important for `0.x` packages where `^` ranges cause minor bumps to go out of range frequently.
27
27
28
-
> β `devDependencies` are skipped because they normally don't ship to consumers. The exception is a dependency **bundled** into your published output (inlined by esbuild/tsup/rollup) β often declared under `devDependencies` since it isn't runtime-resolved. List those under `bundledDependencies` (or use `cascadeFrom`) so any bump to them republishes the bundling package. See [Configuration](./configuration.md#example-a-bundled-dependency-consumer-side).
28
+
> β `devDependencies` are skipped because they normally don't ship to consumers. The exception is a dependency **bundled** into your published output (inlined by esbuild/tsup/rollup) β often declared under `devDependencies` since it isn't runtime-resolved. List those under `bundledDependencies` (or use `cascadeFrom`) so any bump to them republishes the bundling package. See [Configuration](./configuration.md#bundled-dependencies-consumer-side).
29
29
30
30
This phase is a **safety net** β it cannot be skipped. It ensures that published packages always have valid dependency ranges.
0 commit comments