dep-up-surgeon 2.0.0 → 2.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 (57) hide show
  1. package/README.md +140 -5
  2. package/dist/cli/changelogEnricher.d.ts +28 -0
  3. package/dist/cli/changelogEnricher.d.ts.map +1 -0
  4. package/dist/cli/changelogEnricher.js +49 -0
  5. package/dist/cli/changelogEnricher.js.map +1 -0
  6. package/dist/cli/git.d.ts +25 -0
  7. package/dist/cli/git.d.ts.map +1 -1
  8. package/dist/cli/git.js +121 -11
  9. package/dist/cli/git.js.map +1 -1
  10. package/dist/cli/gitFlow.d.ts +23 -0
  11. package/dist/cli/gitFlow.d.ts.map +1 -1
  12. package/dist/cli/gitFlow.js +77 -7
  13. package/dist/cli/gitFlow.js.map +1 -1
  14. package/dist/cli/openPr.d.ts +90 -0
  15. package/dist/cli/openPr.d.ts.map +1 -0
  16. package/dist/cli/openPr.js +276 -0
  17. package/dist/cli/openPr.js.map +1 -0
  18. package/dist/cli/overrideFlow.d.ts +69 -0
  19. package/dist/cli/overrideFlow.d.ts.map +1 -0
  20. package/dist/cli/overrideFlow.js +190 -0
  21. package/dist/cli/overrideFlow.js.map +1 -0
  22. package/dist/cli/report.d.ts +7 -1
  23. package/dist/cli/report.d.ts.map +1 -1
  24. package/dist/cli/report.js +3 -0
  25. package/dist/cli/report.js.map +1 -1
  26. package/dist/cli/summary.d.ts.map +1 -1
  27. package/dist/cli/summary.js +220 -0
  28. package/dist/cli/summary.js.map +1 -1
  29. package/dist/cli.js +369 -33
  30. package/dist/cli.js.map +1 -1
  31. package/dist/config/policy.d.ts +83 -0
  32. package/dist/config/policy.d.ts.map +1 -0
  33. package/dist/config/policy.js +377 -0
  34. package/dist/config/policy.js.map +1 -0
  35. package/dist/core/audit.d.ts +49 -0
  36. package/dist/core/audit.d.ts.map +1 -0
  37. package/dist/core/audit.js +332 -0
  38. package/dist/core/audit.js.map +1 -0
  39. package/dist/core/upgrader.d.ts +13 -0
  40. package/dist/core/upgrader.d.ts.map +1 -1
  41. package/dist/core/upgrader.js +89 -0
  42. package/dist/core/upgrader.js.map +1 -1
  43. package/dist/types.d.ts +142 -1
  44. package/dist/types.d.ts.map +1 -1
  45. package/dist/utils/blastRadius.d.ts +46 -0
  46. package/dist/utils/blastRadius.d.ts.map +1 -0
  47. package/dist/utils/blastRadius.js +194 -0
  48. package/dist/utils/blastRadius.js.map +1 -0
  49. package/dist/utils/changelog.d.ts +129 -0
  50. package/dist/utils/changelog.d.ts.map +1 -0
  51. package/dist/utils/changelog.js +430 -0
  52. package/dist/utils/changelog.js.map +1 -0
  53. package/dist/utils/overrides.d.ts +102 -0
  54. package/dist/utils/overrides.d.ts.map +1 -0
  55. package/dist/utils/overrides.js +325 -0
  56. package/dist/utils/overrides.js.map +1 -0
  57. package/package.json +6 -5
package/README.md CHANGED
@@ -93,6 +93,17 @@ dep-up-surgeon [options]
93
93
  | `--git-branch <name>` | Create + checkout this branch before any commits. If the branch already exists, switches to it. Pairs nicely with `--ci` for PR-bot workflows (e.g. `--git-branch "deps/auto-$(date +%Y-%m-%d)"`). |
94
94
  | `--git-sign` | Pass `--gpg-sign` to every commit. Requires a signing key configured in git (`user.signingkey` + `gpg.format`). Failed signatures are recorded as failed commits in the JSON report rather than aborting the run. |
95
95
  | `--git-allow-dirty` | Allow `--git-commit` to run on a dirty working tree. We still only `git add` files we touched, so your WIP isn't swept up — but if you also `git add` your own files manually, they'll land in dep-up-surgeon's commits. |
96
+ | `--changelog` / `--no-changelog` | Fetch the bumped package's release notes (GitHub Releases first, then its published `CHANGELOG.md`) and include them in commit bodies + `--summary`. **Default ON** when `--git-commit` or `--summary` is active. Network failures are non-fatal — missing changelogs are silently skipped. See **Changelog excerpts** below. |
97
+ | `--security-only` | Run `npm audit` (or `pnpm`/`yarn` equivalent) first, then upgrade **only** the packages with open advisories. Every successful bump carries the advisory severity + ID into its commit subject (`[security:high]`) and into the summary's **Security fixes** table. Pairs well with `--git-commit-mode per-success` to produce one PR per CVE. See **Security-first mode** below. |
98
+ | `--min-severity <level>` | Minimum advisory severity to consider under `--security-only`: `low` (default), `moderate`, `high`, or `critical`. Lower-severity advisories are filtered out before the upgrade plan is built. |
99
+ | `--blast-radius` / `--no-blast-radius` | Scan project source files to list which files actually `import`/`require` each upgraded package, and surface the list in `--json` + `--summary`. **Default ON** when `--summary` is active. See **Blast radius** below. |
100
+ | `--apply-overrides` | After the main upgrade loop, fix **transitive** CVEs that no direct bump could reach by writing a package-manager override (`overrides` for npm, `pnpm.overrides` for pnpm, `resolutions` for yarn) pinning each vulnerable transitive to its audit-recommended safe version. Runs install + validator after each pin and rolls back automatically when the validator fails. Requires `--security-only`. See **Transitive overrides** below. |
101
+ | `--override-force` | Used with `--apply-overrides`. Overwrite an **existing** override entry whose value conflicts with the audit-recommended version. By default we refuse to clobber user-managed pins and record `conflict` in the report. |
102
+ | `--open-pr` | After `--git-commit --git-branch` pushes the branch, open a GitHub PR with the `--summary` markdown as the body (falls back to a deterministic minimal body). Uses the `gh` CLI (must be installed + authenticated); never fatal — a missing binary, auth failure, or push rejection is recorded as `pullRequest.error` in the JSON report without aborting the run. See **Auto-opening a PR** below. |
103
+ | `--open-pr-title <title>` | Override the PR title. Default: derived from the upgrade counts, e.g. `deps: [breaking+security] bump 3 packages`. |
104
+ | `--open-pr-draft` | Open the PR as a draft. Recommended with `--force` or on Fridays so merge-queue bots don't auto-land it. |
105
+ | `--open-pr-base <branch>` | Target base branch. Default: the repo default branch as reported by `gh repo view`. |
106
+ | `--open-pr-reviewers <users>` / `--open-pr-assignees <users>` | Comma-separated usernames passed straight to `gh pr create --reviewer` / `--assignee`. |
96
107
 
97
108
  Exit code `1` when any upgrade could not be kept (unless `--force`). The CLI also exits `1` when the **pre-flight** validator (run on the unchanged tree) fails — see **Pre-flight check** below. Fatal errors also exit `1`.
98
109
 
@@ -209,6 +220,127 @@ npx dep-up-surgeon --workspaces --ci \
209
220
  }
210
221
  ```
211
222
 
223
+ ### Changelog excerpts
224
+
225
+ Every successful upgrade can be annotated with the package's release notes so reviewers don't have to open five GitHub tabs per PR. Enabled by default when `--git-commit` or `--summary` is set; disable with `--no-changelog`.
226
+
227
+ - **Source.** First preference is the **GitHub Releases API** (`GET /repos/:owner/:repo/releases/tags/:tag`), resolved from the package's `repository` field in its `package.json`. Fallback is the `CHANGELOG.md` extracted from the published tarball via `pacote.extract` — the matching version section is parsed out with a Markdown-aware heading scanner (handles `## 1.2.3`, `## [1.2.3] - 2024-...`, `## v1.2.3`, etc.).
228
+ - **Where it shows up.** In `--git-commit-mode per-success`, the excerpt is embedded directly in the commit body. In `per-target` / `all` modes it collapses to a compact `See: <release-url>` footer so the commit doesn't balloon. `--summary md` / `--summary html` renders each excerpt in a collapsible `<details>` block — clean in PR bodies, compact in GitHub's Job Summary.
229
+ - **Caching & resilience.** A run-local cache deduplicates fetches across workspaces. Network errors, missing tags, private repos, and malformed `CHANGELOG.md` files are all silently skipped — a missing excerpt never fails a commit.
230
+ - **GitHub auth.** Anonymous GitHub API requests are rate-limited to 60/hour. Set `GITHUB_TOKEN` (or `GH_TOKEN`) in the environment to lift that to 5,000/hour — `dep-up-surgeon` uses it automatically for changelog fetches and nothing else.
231
+
232
+ ### Security-first mode
233
+
234
+ `--security-only` flips the tool from "bump everything safely" to "bump only packages with known CVEs". Competes directly with Dependabot's security-alert surface, but runs locally and respects your validator / policy / link groups.
235
+
236
+ 1. Runs `npm audit --json` (or `pnpm audit --json` / `yarn audit` depending on the detected manager) **before** the upgrade plan is built.
237
+ 2. Filters the audit to advisories at or above `--min-severity <low|moderate|high|critical>`.
238
+ 3. Builds a `restrictToNames` set from the vulnerable package names and passes it to the engine — every other dependency gets added to the ignore list automatically (visible as `reason: "ignored"` in the report).
239
+ 4. Attaches the severity + advisory ID + title to every upgraded record's `security` field, which the CLI then propagates into:
240
+ - **Commit subjects**: `deps: [security:high] bump axios from 1.6.0 to 1.7.2`
241
+ - **Commit bodies**: full advisory ID, URL, and title
242
+ - **`--summary`**: a prominent **Security fixes** table above the normal upgraded table
243
+ - **`--json`**: `upgraded[].security = { severity, ids, url, title, vulnerableRange, recommendedVersion }`
244
+
245
+ ```bash
246
+ # Only critical + high; one commit per CVE on a dedicated branch.
247
+ npx dep-up-surgeon --workspaces --security-only --min-severity high \
248
+ --git-commit --git-commit-mode per-success \
249
+ --git-branch "deps/security-$(date +%Y-%m-%d)"
250
+ ```
251
+
252
+ ### Policy engine (policy-as-code)
253
+
254
+ Drop a `.dep-up-surgeon.policy.yaml` (or `.json`) in the repo root to encode upgrade rules that survive across runs and humans. Loaded automatically on startup; violations are reported per-package and the engine skips the offending bumps instead of failing.
255
+
256
+ ```yaml
257
+ # .dep-up-surgeon.policy.yaml
258
+ freeze:
259
+ - pattern: react # never touch it
260
+ reason: "React 18 pinned until Q3 refactor"
261
+ - pattern: "@types/*" # wildcard — freezes every @types/* scope
262
+ maxVersion:
263
+ - pattern: next
264
+ range: "<=14" # refuse anything outside this semver range
265
+ allowMajorAfter:
266
+ - pattern: eslint
267
+ date: "2026-06-01" # patch/minor OK now, majors blocked until the date
268
+ requireReviewers: 2 # metadata: surfaced in --summary / --json for your bot to consume
269
+ autoMerge: false # metadata: ditto
270
+ ```
271
+
272
+ **How rules interact**
273
+
274
+ - **`freeze`** always wins. Exact names go straight into the ignore list; wildcards are matched against the scanned deps inside the engine so rules like `@types/*` don't have to be unrolled by hand. Freezes produce a `reason: "policy"` skip record with the originating pattern.
275
+ - **`maxVersion`** caps the candidate list. If no candidate satisfies the range, the package is skipped with `reason: "policy"` — it won't degrade to a no-op install.
276
+ - **`allowMajorAfter`** blocks **cross-major** bumps until the specified date (checked against `Date.now()`), demoting the candidate to the newest in-major version. Patch/minor still flow through normally.
277
+ - **`requireReviewers`** and **`autoMerge`** are **metadata only** — attached to the `policy` block of `--json` + `--summary` for downstream automation (GitHub Actions PR-opener, the SaaS bot, etc.) to consume.
278
+
279
+ Every applied rule appears in the **Policy** section of `--summary` and under `policy.applied` / `policy.frozen` / `policy.warnings` in `--json`, so audits show exactly which rule blocked which package.
280
+
281
+ ### Blast radius
282
+
283
+ Before handing the PR to a reviewer, `dep-up-surgeon` can list **which of your own source files actually import each upgraded package**. Surfaced automatically under `--summary`; attach it to `--json` too with `--blast-radius`.
284
+
285
+ - **Scans**: `.ts`, `.tsx`, `.js`, `.jsx`, `.mjs`, `.cjs`, `.mts`, `.cts`, `.vue`, `.svelte`, `.astro`.
286
+ - **Skips**: `node_modules`, `dist`, `build`, `coverage`, `.git`, `.next`, `.turbo`, `.vercel`, `.cache`, `.parcel-cache`, `out`, `.output`.
287
+ - **Detects**: ES imports (`import x from '<pkg>'`), re-exports (`export … from '<pkg>'`), CommonJS `require('<pkg>')`, dynamic `import('<pkg>')`, and subpath imports (`from '<pkg>/sub'` still counts as a hit on `<pkg>`). Word-boundary safe — looking for `react` does not falsely match `react-dom`; looking for `@types/node` does not match `@types/node-ipc`.
288
+ - **Output**: per-package `{ total, truncated, files[] }` entries in `upgraded[].blastRadius`, plus a collapsible per-package list in the Markdown / HTML summary. Caps at 20 file paths per package by default; `total` keeps counting past the cap so the summary can honestly say "used in 134 files".
289
+ - **Cost**: a single pass over the tree, at most 1 MB read per file, parallel I/O (default concurrency 8). Failures are non-fatal — a broken symlink never aborts the run. Turn it off in huge monorepos with `--no-blast-radius`.
290
+
291
+ ### Breaking-change detection
292
+
293
+ Whenever a changelog excerpt is fetched, `dep-up-surgeon` scans it for breaking-change markers and flags the upgrade so reviewers catch them before clicking merge. Works alongside `--changelog` (enabled by default with `--git-commit` / `--summary`) with no extra flags.
294
+
295
+ - **What we match**: `BREAKING CHANGE:` / `BREAKING CHANGES:` footers (Conventional Commits), the `💥` and `⚠️ BREAKING` emoji conventions used by Changesets / tsup / Vitest, explicit Node-version drops (`drop support for Node 16`, `requires Node >= 20`), API-removal bullets (`- Removed the …`), and `no longer supported` / `renamed … to …` phrasing. Deprecation notices alone do **not** trip the scan.
296
+ - **Where it shows up**:
297
+ - **Commit subjects** gain a `[breaking]` tag (emitted BEFORE `[security:<sev>]` when both apply): `deps: [breaking][security:high] bump axios from 1.6.0 to 2.0.0`.
298
+ - **Commit bodies** get a `Breaking changes detected:` section listing the exact matched lines, capped at 5 per package.
299
+ - **`--summary md|html`** renders a prominent `⚠️ Breaking changes detected` section ABOVE the upgraded table, plus a `⚠️ breaking` badge in the Notes column.
300
+ - **`--json`** → `upgraded[].changelog.breaking = { hasBreaking, matchedLines[], reasons[] }` (only present when the scan matched).
301
+ - **Never fatal, never noisy**: absence of a changelog means no scan, which means no flag. The scan caps matches at 10 per package and dedupes identical lines so verbose changelogs don't drown out the signal.
302
+
303
+ ### Transitive overrides (`--apply-overrides`)
304
+
305
+ `--security-only` by itself can only fix vulnerabilities reachable from a direct dependency. For CVEs that live in transitives (very common — `lodash@4.17.20` buried six levels deep under a toolchain package), pair `--security-only` with `--apply-overrides` and the tool will write a package-manager override to pin the vulnerable transitive to its safe version.
306
+
307
+ - **Which field**: `overrides` for npm (>=8.3), `pnpm.overrides` for pnpm, `resolutions` for yarn (classic + berry).
308
+ - **How it picks the pin**: uses the audit's own `fixAvailable.version` when present; otherwise `minVersion` of the first safe range the manager reported.
309
+ - **Rollback on failure**: after each override, the tool runs a full install and then the validator. If either fails, the override is removed, install re-runs to restore the starting state, and the next advisory is still attempted. A failed override never strands the workspace — `report.overrides.attempts[].rolledBack === true` appears in the JSON and the summary.
310
+ - **Conflict protection**: when the user already has a manual override with a value that **conflicts** with the audit recommendation, we refuse to clobber by default (`reason: "conflicts with target ..."`). Pass `--override-force` to overwrite explicitly.
311
+ - **Where it shows up**:
312
+ - **`--summary`**: dedicated `Overrides applied` table with `Package / Pinned to / Severity / Advisory`.
313
+ - **`--json`**: `overrides.field` + `overrides.attempts[]` with the full decision trail (`ok`, `skipped`, `reason`, `previous`, `applied`, `installLog`, `rolledBack`).
314
+
315
+ ```bash
316
+ # Weekly security sweep: direct bumps first, then transitive overrides, then a draft PR.
317
+ npx dep-up-surgeon --workspaces \
318
+ --security-only --min-severity high \
319
+ --apply-overrides \
320
+ --git-commit --git-commit-mode per-success --git-branch "deps/security-$(date +%Y-%m-%d)" \
321
+ --summary md \
322
+ --open-pr --open-pr-draft
323
+ ```
324
+
325
+ ### Auto-opening a PR (`--open-pr`)
326
+
327
+ When you've already paid the cost of running `--git-commit --git-branch`, `--open-pr` closes the loop by pushing the branch and opening a GitHub pull request via the [GitHub CLI (`gh`)](https://cli.github.com/). Uses your existing `gh auth`; the tool handles nothing sensitive.
328
+
329
+ - **Body**: the Markdown `--summary` file when one was written, otherwise a deterministic minimal body listing upgraded packages. `gh pr create --body-file -` is used so the body is piped via stdin (no argv quoting hell for multi-KB Markdown).
330
+ - **Title**: derived from the upgrade counts — e.g. `deps: [breaking+security] bump 3 packages` — or any string you pass via `--open-pr-title`.
331
+ - **Base branch**: resolved from `gh repo view` when not explicitly given; respects your default branch setting.
332
+ - **Reuses existing PRs**: if a PR already exists for the same head branch, we return `{ reused: true }` instead of erroring.
333
+ - **Never fatal**: a missing `gh` binary, an unauthenticated session, a rejected push, or a 4xx from the API is recorded as `pullRequest.error` in the JSON report and printed to stderr — the upgrade commits are still on disk, and a subsequent manual `gh pr create` or `git push` will work normally.
334
+ - **Draft mode**: pass `--open-pr-draft` to open as a draft (recommended with `--force` or when the breaking-change badge fires).
335
+
336
+ ```bash
337
+ # Full "open a proper PR" flow with reviewers + draft mode.
338
+ npx dep-up-surgeon --workspaces --summary md \
339
+ --git-commit --git-commit-mode per-success --git-branch deps/weekly \
340
+ --open-pr --open-pr-draft \
341
+ --open-pr-reviewers alice,bob --open-pr-base main
342
+ ```
343
+
212
344
  ### Workspaces & package managers
213
345
 
214
346
  `dep-up-surgeon` is **workspace-aware**:
@@ -387,8 +519,11 @@ The compiled entry is `dist/cli.js` (see `"bin"` in `package.json`).
387
519
 
388
520
  ## Future work (tracked in code)
389
521
 
390
- - Auto-open a PR after `--git-commit --git-branch` (today the user / CI step runs `gh pr create` themselves)
391
- - Per-commit changelog excerpt in the commit body (pull `CHANGELOG.md` / GitHub Releases for the bumped version)
392
- - Deeper automatic resolution using peer-range intersection across a batch
393
- - Renovate-style scheduling helpers (cron / day-of-week filters, grouping rules)
394
- - True parallel installs in monorepos that don't share a root lockfile (e.g. nohoist setups), going beyond today's parallel scan + serial install model
522
+ - GitLab / Bitbucket auto-PR providers (today `--open-pr` is GitHub-only via `gh`)
523
+ - Nested / parent-scoped override rules beyond the flat `name version` form (`overrides: { "foo": { ">=2 <3": "3.0.0" } }` in npm, deep pnpm selectors)
524
+ - Deeper automatic resolution using peer-range intersection across a batch
525
+ - Renovate-style scheduling helpers (cron / day-of-week filters, grouping rules)
526
+ - True parallel installs in monorepos that don't share a root lockfile (e.g. nohoist setups), going beyond today's parallel scan + serial install model
527
+ - AI-assisted failure explanation: feed `install.lastLines` + `validation.lastLines` to an LLM and attach a one-sentence "why this broke" note to failed records
528
+ - Integration catalog: webhooks into Slack / Discord / Linear / Jira so the bot can ping a channel when a security bump lands, not just a GitHub PR
529
+
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Batch changelog enrichment for the structured report. Called once after the upgrade flow
3
+ * completes to fill in `UpgradeRecord.changelog` for every successful upgrade, so the summary
4
+ * writer (`--summary md|html`) and CI consumers can show release notes per package.
5
+ *
6
+ * Design notes:
7
+ * - Network-bound; we cap parallelism with `runWithConcurrency` so a monorepo that upgrades
8
+ * 50 packages doesn't fire 50 simultaneous GitHub API calls.
9
+ * - Every failure is swallowed. Enrichment is a courtesy feature — a 503 from the registry
10
+ * or a missing `CHANGELOG.md` must NEVER mutate the exit code.
11
+ * - The cache is shared with the git-commit path when both are active, so a package committed
12
+ * with its changelog during the run is not fetched a second time for the summary.
13
+ */
14
+ import type { UpgradeRecord } from '../types.js';
15
+ import { type ChangelogCache, type ChangelogFetchers } from '../utils/changelog.js';
16
+ export interface EnrichChangelogOptions {
17
+ cache: ChangelogCache;
18
+ /** Max concurrent fetches. Kept small to respect GitHub's unauth rate limit (~60/h/IP). */
19
+ concurrency?: number;
20
+ fetchers?: ChangelogFetchers;
21
+ githubToken?: string;
22
+ }
23
+ /**
24
+ * Mutate `records` in place: attach `.changelog` to every successful upgrade we can find a
25
+ * release note for. Records without a real semver `to` (e.g. `workspace:*`) are skipped.
26
+ */
27
+ export declare function enrichWithChangelogs(records: UpgradeRecord[], opts: EnrichChangelogOptions): Promise<void>;
28
+ //# sourceMappingURL=changelogEnricher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"changelogEnricher.d.ts","sourceRoot":"","sources":["../../src/cli/changelogEnricher.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACvB,MAAM,uBAAuB,CAAC;AAE/B,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,cAAc,CAAC;IACtB,2FAA2F;IAC3F,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,aAAa,EAAE,EACxB,IAAI,EAAE,sBAAsB,GAC3B,OAAO,CAAC,IAAI,CAAC,CA+Cf"}
@@ -0,0 +1,49 @@
1
+ import { runWithConcurrency } from '../utils/concurrency.js';
2
+ import { fetchChangelog, scanForBreakingChanges, } from '../utils/changelog.js';
3
+ /**
4
+ * Mutate `records` in place: attach `.changelog` to every successful upgrade we can find a
5
+ * release note for. Records without a real semver `to` (e.g. `workspace:*`) are skipped.
6
+ */
7
+ export async function enrichWithChangelogs(records, opts) {
8
+ const eligible = records.filter((r) => {
9
+ if (!r.success || r.skipped) {
10
+ return false;
11
+ }
12
+ if (r.changelog) {
13
+ // Already enriched (e.g. by the git-commit path) — skip the duplicate fetch.
14
+ return false;
15
+ }
16
+ const clean = (r.to ?? '').trim().replace(/^[\^~=]/, '');
17
+ return /^\d+\.\d+\.\d+/.test(clean);
18
+ });
19
+ if (eligible.length === 0) {
20
+ return;
21
+ }
22
+ const concurrency = Math.min(Math.max(1, Math.floor(opts.concurrency ?? 4)), 8);
23
+ await runWithConcurrency(eligible, concurrency, async (r) => {
24
+ const clean = (r.to ?? '').trim().replace(/^[\^~=]/, '');
25
+ try {
26
+ const excerpt = await fetchChangelog({
27
+ packageName: r.name,
28
+ toVersion: clean,
29
+ fromVersion: r.from,
30
+ cache: opts.cache,
31
+ fetchers: opts.fetchers,
32
+ githubToken: opts.githubToken,
33
+ });
34
+ if (excerpt) {
35
+ const breaking = scanForBreakingChanges(excerpt.body);
36
+ r.changelog = {
37
+ source: excerpt.source,
38
+ url: excerpt.url,
39
+ body: excerpt.body,
40
+ ...(breaking.hasBreaking ? { breaking } : {}),
41
+ };
42
+ }
43
+ }
44
+ catch {
45
+ // swallow: enrichment is best-effort
46
+ }
47
+ });
48
+ }
49
+ //# sourceMappingURL=changelogEnricher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"changelogEnricher.js","sourceRoot":"","sources":["../../src/cli/changelogEnricher.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EACL,cAAc,EACd,sBAAsB,GAGvB,MAAM,uBAAuB,CAAC;AAU/B;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,OAAwB,EACxB,IAA4B;IAE5B,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE;QACpC,IAAI,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC;YAC5B,OAAO,KAAK,CAAC;QACf,CAAC;QACD,IAAI,CAAC,CAAC,SAAS,EAAE,CAAC;YAChB,6EAA6E;YAC7E,OAAO,KAAK,CAAC;QACf,C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AC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;iBAC9C,CAAC;YACJ,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,qCAAqC;QACvC,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
package/dist/cli/git.d.ts CHANGED
@@ -63,6 +63,31 @@ export interface UpgradeChange {
63
63
  workspace?: string;
64
64
  /** Linked-group id when this change was part of a batch. */
65
65
  groupId?: string;
66
+ /**
67
+ * Optional changelog excerpt body (from GitHub Releases or the package tarball CHANGELOG.md).
68
+ * When present, formatters append it to the commit body under a clearly demarcated section so
69
+ * reviewers can see *why* the version moved without opening a browser tab.
70
+ */
71
+ changelog?: {
72
+ source: 'github-release' | 'changelog.md';
73
+ url?: string;
74
+ body: string;
75
+ breaking?: {
76
+ hasBreaking: boolean;
77
+ matchedLines: string[];
78
+ reasons: string[];
79
+ };
80
+ };
81
+ /**
82
+ * Security metadata from `--security-only` audit. Surfaced in commit subjects and bodies so
83
+ * the merge queue / code-review tools can pivot on severity + advisory id.
84
+ */
85
+ security?: {
86
+ severity: 'low' | 'moderate' | 'high' | 'critical';
87
+ ids: string[];
88
+ url?: string;
89
+ title?: string;
90
+ };
66
91
  }
67
92
  export declare function formatPerSuccessMessage(prefix: string, changes: UpgradeChange[]): string;
68
93
  export declare function formatPerTargetMessage(prefix: string, workspace: string, changes: UpgradeChange[]): string;
@@ -1 +1 @@
1
- {"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../src/cli/git.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,MAAM,aAAa,GAAG,aAAa,GAAG,YAAY,GAAG,KAAK,CAAC;AAEjE,MAAM,WAAW,UAAU;IACzB,iFAAiF;IACjF,GAAG,EAAE,MAAM,CAAC;IACZ,oDAAoD;IACpD,IAAI,CAAC,EAAE,OAAO,C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AI,EAAE,MAAM,CAAC;QACb,QAAQ,CAAC,EAAE;YACT,WAAW,EAAE,OAAO,CAAC;YACrB,YAAY,EAAE,MAAM,EAAE,CAAC;YACvB,OAAO,EAAE,MAAM,EAAE,CAAC;SACnB,CAAC;KACH,CAAC;IACF;;;OAGG;IACH,QAAQ,CAAC,EAAE;QACT,QAAQ,EAAE,KAAK,GAAG,UAAU,GAAG,MAAM,GAAG,UAAU,CAAC;QACnD,GAAG,EAAE,MAAM,EAAE,CAAC;QACd,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;CACH;AAmGD,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,GAAG,MAAM,CAiBxF;AAoBD,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,aAAa,EAAE,GACvB,MAAM,CAeR;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,GAAG,MAAM,CAmCtF"}
package/dist/cli/git.js CHANGED
@@ -174,38 +174,148 @@ export function lockfileBasenameFor(manager) {
174
174
  function tidyVersion(v) {
175
175
  return v.trim();
176
176
  }
177
+ /**
178
+ * Render a changelog-excerpt block for the commit body. Returns an empty string when the change
179
+ * has no attached excerpt. Each block is prefixed with a fenced separator so `git log -p` stays
180
+ * legible even when a commit carries multiple excerpts (linked groups).
181
+ */
182
+ function formatChangelogBlock(change) {
183
+ if (!change.changelog?.body) {
184
+ return '';
185
+ }
186
+ const cl = change.changelog;
187
+ const attribution = cl.source === 'github-release'
188
+ ? cl.url
189
+ ? `source: GitHub Release (${cl.url})`
190
+ : 'source: GitHub Release'
191
+ : 'source: CHANGELOG.md';
192
+ return [
193
+ `--- ${change.name} ${tidyVersion(change.from)} → ${tidyVersion(change.to)} ---`,
194
+ attribution,
195
+ '',
196
+ cl.body,
197
+ ].join('\n');
198
+ }
199
+ /** Concatenate every available changelog block, separated by blank lines. */
200
+ function changelogSection(changes) {
201
+ const blocks = changes.map(formatChangelogBlock).filter(Boolean);
202
+ return blocks.length > 0 ? `\n\n${blocks.join('\n\n')}` : '';
203
+ }
204
+ /**
205
+ * Prepend a conventional-commits-ish `security` scope and severity tag when ANY change in the
206
+ * batch carries security metadata. Keeps the subject parseable by dashboards that group by
207
+ * keyword while still fitting in a normal 72-char commit subject line.
208
+ */
209
+ function securitySubjectTag(changes) {
210
+ const highest = changes.reduce((acc, c) => {
211
+ const s = c.security?.severity;
212
+ if (!s)
213
+ return acc;
214
+ if (!acc)
215
+ return s;
216
+ const rank = { low: 1, moderate: 2, high: 3, critical: 4 };
217
+ return rank[s] > rank[acc] ? s : acc;
218
+ }, undefined);
219
+ return highest ? `[security:${highest}] ` : '';
220
+ }
221
+ /**
222
+ * True when ANY change in the batch has a breaking-change marker detected in its changelog.
223
+ * Consumed by the subject tag (`[breaking] `) and the dedicated "Breaking changes:" footer so
224
+ * reviewers spot them at a glance in `git log` + `gh pr view`.
225
+ */
226
+ function hasBreakingChange(changes) {
227
+ return changes.some((c) => c.changelog?.breaking?.hasBreaking === true);
228
+ }
229
+ /** Render the `[breaking] ` tag prefix; emitted BEFORE the security tag so order is stable. */
230
+ function breakingSubjectTag(changes) {
231
+ return hasBreakingChange(changes) ? '[breaking] ' : '';
232
+ }
233
+ /**
234
+ * Render a per-change breaking-changes footer. One section per upgrade so reviewers can see
235
+ * which package the breaking lines came from. Capped to 5 lines per package — the scanner
236
+ * already dedupes, this is just a belt-and-braces against especially noisy changelogs.
237
+ */
238
+ function breakingFooter(changes) {
239
+ const rows = [];
240
+ for (const c of changes) {
241
+ const b = c.changelog?.breaking;
242
+ if (!b?.hasBreaking || b.matchedLines.length === 0)
243
+ continue;
244
+ rows.push(`- ${c.name}:`);
245
+ for (const line of b.matchedLines.slice(0, 5)) {
246
+ rows.push(` · ${line}`);
247
+ }
248
+ }
249
+ return rows.length > 0 ? `\n\nBreaking changes detected:\n${rows.join('\n')}` : '';
250
+ }
251
+ /** Render a per-change security footer (inside the commit body). */
252
+ function securityFooter(changes) {
253
+ const rows = changes
254
+ .filter((c) => c.security)
255
+ .map((c) => {
256
+ const s = c.security;
257
+ const id = s.ids[0] ? ` ${s.ids[0]}` : '';
258
+ const title = s.title ? ` — ${s.title}` : '';
259
+ const url = s.url ? ` (${s.url})` : '';
260
+ return `- ${c.name}: ${s.severity}${id}${title}${url}`;
261
+ });
262
+ return rows.length > 0 ? `\n\nSecurity fixes:\n${rows.join('\n')}` : '';
263
+ }
177
264
  export function formatPerSuccessMessage(prefix, changes) {
265
+ const brkTag = breakingSubjectTag(changes);
266
+ const secTag = securitySubjectTag(changes);
178
267
  if (changes.length === 1) {
179
268
  const c = changes[0];
180
269
  const ws = c.workspace && c.workspace !== 'root' ? ` (${c.workspace})` : '';
181
- return `${prefix}bump ${c.name} from ${tidyVersion(c.from)} to ${tidyVersion(c.to)}${ws}`;
270
+ const subject = `${prefix}${brkTag}${secTag}bump ${c.name} from ${tidyVersion(c.from)} to ${tidyVersion(c.to)}${ws}`;
271
+ return subject + breakingFooter(changes) + securityFooter(changes) + changelogSection(changes);
182
272
  }
183
- // Linked group → multi-line message with each member listed.
184
273
  const head = changes[0];
185
274
  const ws = head.workspace && head.workspace !== 'root' ? ` (${head.workspace})` : '';
186
275
  const lines = [
187
- `${prefix}bump ${changes.length} linked packages${ws}`,
276
+ `${prefix}${brkTag}${secTag}bump ${changes.length} linked packages${ws}`,
188
277
  '',
189
278
  ...changes.map((c) => `- ${c.name}: ${tidyVersion(c.from)} → ${tidyVersion(c.to)}`),
190
279
  ];
191
- return lines.join('\n');
280
+ return lines.join('\n') + breakingFooter(changes) + securityFooter(changes) + changelogSection(changes);
281
+ }
282
+ /**
283
+ * Compact one-line changelog reference for per-target / all-in-one commit modes where embedding
284
+ * full release notes per package would balloon the message. We surface the best-known URL when
285
+ * we have one, otherwise a short `(CHANGELOG.md)` marker.
286
+ */
287
+ function compactChangelogMark(change) {
288
+ if (!change.changelog?.body) {
289
+ return '';
290
+ }
291
+ if (change.changelog.source === 'github-release' && change.changelog.url) {
292
+ return ` (release notes: ${change.changelog.url})`;
293
+ }
294
+ if (change.changelog.source === 'github-release') {
295
+ return ' (see GitHub release)';
296
+ }
297
+ return ' (see CHANGELOG.md)';
192
298
  }
193
299
  export function formatPerTargetMessage(prefix, workspace, changes) {
194
300
  if (changes.length === 0) {
195
301
  return `${prefix}no changes for ${workspace}`;
196
302
  }
303
+ const brkTag = breakingSubjectTag(changes);
304
+ const secTag = securitySubjectTag(changes);
197
305
  const wsLabel = workspace === 'root' ? '' : ` in ${workspace}`;
198
306
  const lines = [
199
- `${prefix}${changes.length} upgrade${changes.length === 1 ? '' : 's'}${wsLabel}`,
307
+ `${prefix}${brkTag}${secTag}${changes.length} upgrade${changes.length === 1 ? '' : 's'}${wsLabel}`,
200
308
  '',
201
- ...changes.map((c) => `- ${c.name}: ${tidyVersion(c.from)} → ${tidyVersion(c.to)}`),
309
+ ...changes.map((c) => `- ${c.name}: ${tidyVersion(c.from)} → ${tidyVersion(c.to)}${compactChangelogMark(c)}`),
202
310
  ];
203
- return lines.join('\n');
311
+ return lines.join('\n') + breakingFooter(changes) + securityFooter(changes);
204
312
  }
205
313
  export function formatAllInOneMessage(prefix, changes) {
206
314
  if (changes.length === 0) {
207
315
  return `${prefix}no upgrades`;
208
316
  }
317
+ const brkTag = breakingSubjectTag(changes);
318
+ const secTag = securitySubjectTag(changes);
209
319
  const targets = new Map();
210
320
  for (const c of changes) {
211
321
  const key = c.workspace ?? 'root';
@@ -215,15 +325,15 @@ export function formatAllInOneMessage(prefix, changes) {
215
325
  }
216
326
  const targetCount = targets.size;
217
327
  const head = targetCount === 1
218
- ? `${prefix}${changes.length} upgrade${changes.length === 1 ? '' : 's'}`
219
- : `${prefix}${changes.length} upgrades across ${targetCount} targets`;
328
+ ? `${prefix}${brkTag}${secTag}${changes.length} upgrade${changes.length === 1 ? '' : 's'}`
329
+ : `${prefix}${brkTag}${secTag}${changes.length} upgrades across ${targetCount} targets`;
220
330
  const lines = [head, ''];
221
331
  for (const [ws, list] of targets) {
222
332
  if (targetCount > 1) {
223
333
  lines.push(`[${ws}]`);
224
334
  }
225
335
  for (const c of list) {
226
- lines.push(`- ${c.name}: ${tidyVersion(c.from)} → ${tidyVersion(c.to)}`);
336
+ lines.push(`- ${c.name}: ${tidyVersion(c.from)} → ${tidyVersion(c.to)}${compactChangelogMark(c)}`);
227
337
  }
228
338
  if (targetCount > 1) {
229
339
  lines.push('');
@@ -233,6 +343,6 @@ export function formatAllInOneMessage(prefix, changes) {
233
343
  while (lines.length > 0 && lines[lines.length - 1] === '') {
234
344
  lines.pop();
235
345
  }
236
- return lines.join('\n');
346
+ return lines.join('\n') + breakingFooter(changes) + securityFooter(changes);
237
347
  }
238
348
  //# sourceMappingURL=git.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"git.js","sourceRoot":"","sources":["../../src/cli/git.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AA0B9B,oDAAoD;AACpD,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,GAAW;IACzC,MAAM,CAAC,GAAG,MAAM,KAAK,CAAC,KAAK,EAAE,CAAC,WAAW,EAAE,uBAAuB,CAAC,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;IAC7F,OAAO,CAAC,CAAC,QAAQ,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,MAAM,CAAC;AACxD,CAAC;AAED,yFAAyF;AACzF,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,GAAW;IAC3C,MAAM,CAAC,GAAG,MAAM,KAA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CAAC,CAAC,IAAI,CAAC,MAAM,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QACrG,CAAC;QACD,IAAI,WAAW,GAAG,CAAC,EAAE,CAAC;YACpB,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACjB,CAAC;IACH,CAAC;IACD,4BAA4B;IAC5B,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC;QAC1D,KAAK,CAAC,GAAG,EAAE,CAAC;IACd,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,cAAc,CAAC,OAAO,CAAC,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;AAC9E,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import type { PackageManager } from '../core/workspaces.js';
2
2
  import type { GitCommitRecord } from '../types.js';
3
3
  import type { UpgradeAppliedEvent } from '../core/upgrader.js';
4
+ import { type ChangelogFetchers } from '../utils/changelog.js';
4
5
  import { type GitCommitMode } from './git.js';
5
6
  export interface GitFlowConfig {
6
7
  enabled: boolean;
@@ -9,6 +10,28 @@ export interface GitFlowConfig {
9
10
  sign: boolean;
10
11
  allowDirty: boolean;
11
12
  branch?: string;
13
+ /**
14
+ * When true, the flow fetches a changelog excerpt for every successful upgrade and appends it
15
+ * to the commit body (per-success mode) or a one-line link (per-target / all modes). Fetching
16
+ * is best-effort — missing / rate-limited changelogs are silently dropped and never abort the
17
+ * upgrade or the commit. Off by default only when the user passes `--no-changelog`.
18
+ */
19
+ includeChangelog?: boolean;
20
+ /** Injection point for tests. Bypasses the real GitHub + pacote calls. */
21
+ changelogFetchers?: ChangelogFetchers;
22
+ /** Explicit GitHub token (otherwise read from `GITHUB_TOKEN` / `GH_TOKEN`). */
23
+ githubToken?: string;
24
+ /**
25
+ * Map of package-name → `SecurityAdvisory` from the `--security-only` pre-flight audit.
26
+ * When a change matches an advisory, gitFlow stamps it onto the `UpgradeChange.security`
27
+ * field so the commit subject gets the `[security:<sev>]` tag + the body lists the CVE.
28
+ */
29
+ securityAdvisories?: Map<string, {
30
+ severity: 'low' | 'moderate' | 'high' | 'critical';
31
+ ids: string[];
32
+ url?: string;
33
+ title?: string;
34
+ }>;
12
35
  }
13
36
  export interface GitFlowController {
14
37
  enabled: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"gitFlow.d.ts","sourceRoot":"","sources":["../../src/cli/gitFlow.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE/D,OAAO,EASL,KAAK,aAAa,EAEnB,MAAM,UAAU,CAAC;AAElB,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,aAAa,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,OAAO,CAAC;IACd,UAAU,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,gFAAgF;IAChF,gBAAgB,CAAC,EAAE,CAAC,EAAE,EAAE,mBAAmB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9D,2EAA2E;IAC3E,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAChG,yFAAyF;IACzF,UAAU,CAAC,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,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