@biffo/cli 0.154.1 → 0.155.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 (2) hide show
  1. package/dist/index.js +31 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2693,7 +2693,8 @@ async function applyAndOpenPr(options, deps, plan, migrations, fromVersion, toVe
2693
2693
  base,
2694
2694
  lockfiles,
2695
2695
  breaking,
2696
- cleanedCoreVersion ? coreVersionCleanup : null
2696
+ cleanedCoreVersion ? coreVersionCleanup : null,
2697
+ readCarriedPrs(options.templateRepo, fromVersion, toVersion)
2697
2698
  )
2698
2699
  });
2699
2700
  if (plan.conflicts.length > 0) {
@@ -2702,7 +2703,34 @@ async function applyAndOpenPr(options, deps, plan, migrations, fromVersion, toVe
2702
2703
  log.success(`Opened PR #${pr.number}: ${pr.url}`);
2703
2704
  }
2704
2705
  }
2705
- function buildPrBody(from, to, plan, migrations, base = GLOBAL_DISPATCH_REF, lockfiles = [], breaking = [], coreVersionCleanup = null) {
2706
+ var CARRIED_PRS_MARKER = "biffo:carries-template-prs:";
2707
+ function readCarriedPrs(templateRepo, from, to) {
2708
+ if (!templateRepo) return [];
2709
+ try {
2710
+ const out = execSync2(`git log --format=%s core-v${from}..core-v${to}`, {
2711
+ cwd: templateRepo,
2712
+ encoding: "utf8",
2713
+ stdio: ["ignore", "pipe", "ignore"]
2714
+ });
2715
+ return carriedPrNumbers(out.split("\n"));
2716
+ } catch {
2717
+ return [];
2718
+ }
2719
+ }
2720
+ function carriedPrsSection(carriedPrs) {
2721
+ if (carriedPrs.length === 0) return [];
2722
+ const unique = [...new Set(carriedPrs)].sort((a, b) => a - b);
2723
+ return ["", `<!-- ${CARRIED_PRS_MARKER}${unique.join(",")} -->`];
2724
+ }
2725
+ function carriedPrNumbers(subjects) {
2726
+ const numbers = [];
2727
+ for (const subject of subjects) {
2728
+ const match = /\(#(\d+)\)\s*$/.exec(subject);
2729
+ if (match?.[1]) numbers.push(Number(match[1]));
2730
+ }
2731
+ return [...new Set(numbers)].sort((a, b) => a - b);
2732
+ }
2733
+ function buildPrBody(from, to, plan, migrations, base = GLOBAL_DISPATCH_REF, lockfiles = [], breaking = [], coreVersionCleanup = null, carriedPrs = []) {
2706
2734
  const lines = [];
2707
2735
  if (breaking.length > 0) {
2708
2736
  lines.push(
@@ -2719,6 +2747,7 @@ function buildPrBody(from, to, plan, migrations, base = GLOBAL_DISPATCH_REF, loc
2719
2747
  "Automated core upgrade generated by `biffo core upgrade` (ADR-0006).",
2720
2748
  "",
2721
2749
  `Bumps the Biffo template core from **${from}** to **${to}** and updates \`biffo.core.json\`. Only template-owned paths (see \`core-manifest.json\`) were touched \u2014 product, plugin, and infra files were left untouched.`,
2750
+ ...carriedPrsSection(carriedPrs),
2722
2751
  "",
2723
2752
  `## Changes (${plan.changes.length})`,
2724
2753
  "",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@biffo/cli",
3
- "version": "0.154.1",
3
+ "version": "0.155.0",
4
4
  "description": "Biffo project scaffolding CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",