@biffo/cli 0.211.2 → 0.211.3

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 +8 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -3389,8 +3389,9 @@ async function buildCommitAndOpenPr(options, deps, plan, migrations, fromVersion
3389
3389
  `Applied ${applied.written.length} change(s), ${applied.deleted.length + (cleanedCoreVersion ? 1 : 0)} deletion(s), ${carried.length} new migration(s)`
3390
3390
  );
3391
3391
  const lockfiles = await refreshInstanceLockfiles(options.cwd, applied, deps);
3392
+ const carriedPrs = readCarriedPrs(options.templateRepo, fromVersion, toVersion);
3392
3393
  await git.add(options.cwd, ["-A"]);
3393
- await git.commit(options.cwd, `chore(core): upgrade template core ${fromVersion} -> ${toVersion}`);
3394
+ await git.commit(options.cwd, buildCommitMessage(fromVersion, toVersion, carriedPrs));
3394
3395
  log.step(3, 4, `Pushing ${branch}`);
3395
3396
  const pushOpts = { token };
3396
3397
  if (options.remote) pushOpts.remote = options.remote;
@@ -3415,7 +3416,7 @@ async function buildCommitAndOpenPr(options, deps, plan, migrations, fromVersion
3415
3416
  lockfiles,
3416
3417
  breaking,
3417
3418
  cleanedCoreVersion ? coreVersionCleanup : null,
3418
- readCarriedPrs(options.templateRepo, fromVersion, toVersion)
3419
+ carriedPrs
3419
3420
  )
3420
3421
  });
3421
3422
  if (plan.conflicts.length > 0) {
@@ -3443,6 +3444,11 @@ function carriedPrsSection(carriedPrs) {
3443
3444
  const unique = [...new Set(carriedPrs)].sort((a, b) => a - b);
3444
3445
  return ["", `<!-- ${CARRIED_PRS_MARKER}${unique.join(",")} -->`];
3445
3446
  }
3447
+ function buildCommitMessage(from, to, carriedPrs) {
3448
+ const subject = `chore(core): upgrade template core ${from} -> ${to}`;
3449
+ const marker = carriedPrsSection(carriedPrs);
3450
+ return marker.length === 0 ? subject : [subject, ...marker].join("\n");
3451
+ }
3446
3452
  function carriedPrNumbers(subjects) {
3447
3453
  const numbers = [];
3448
3454
  for (const subject of subjects) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@biffo/cli",
3
- "version": "0.211.2",
3
+ "version": "0.211.3",
4
4
  "description": "Biffo project scaffolding CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",