@reelout/core 0.5.0 → 0.5.1

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.
@@ -14,7 +14,7 @@ import assert from "node:assert";
14
14
  import createPreset from "conventional-changelog-conventionalcommits";
15
15
  import { writeChangelogString } from "conventional-changelog-writer";
16
16
  import { toMarkdown } from "mdast-util-to-markdown";
17
- //#region src/workflow/versioning/extractVersionQualifier.ts
17
+ // src/workflow/versioning/extractVersionQualifier.ts
18
18
  /**
19
19
  * Extract the version qualifier string from a parsed `SemVer` instance.
20
20
  *
@@ -31,8 +31,7 @@ function extractVersionQualifier(version) {
31
31
  return prerelease.join(".");
32
32
  } else return;
33
33
  }
34
- //#endregion
35
- //#region src/workflow/versioning/bumpVersion.ts
34
+ // src/workflow/versioning/bumpVersion.ts
36
35
  /**
37
36
  * Bump a semantic version string based on release and transition rules.
38
37
  *
@@ -66,8 +65,7 @@ function bumpVersion(options) {
66
65
  }
67
66
  return semver.inc(parsed, release, { loose: false }, identifier, "0");
68
67
  }
69
- //#endregion
70
- //#region src/workflow/versioning/determineReleaseType.ts
68
+ // src/workflow/versioning/determineReleaseType.ts
71
69
  /**
72
70
  * Determine the release type for a single commit.
73
71
  *
@@ -89,8 +87,7 @@ function determineReleaseType(classifier, commit) {
89
87
  }
90
88
  return null;
91
89
  }
92
- //#endregion
93
- //#region src/workflow/versioning/pickPriorityReleaseType.ts
90
+ // src/workflow/versioning/pickPriorityReleaseType.ts
94
91
  /**
95
92
  * Determine the highest-priority release type between two candidates.
96
93
  *
@@ -109,8 +106,7 @@ function pickPriorityReleaseType(curr, next) {
109
106
  ]) if (curr === type || next === type) return type;
110
107
  return null;
111
108
  }
112
- //#endregion
113
- //#region src/workflow/versioning/deriveReleaseType.ts
109
+ // src/workflow/versioning/deriveReleaseType.ts
114
110
  /**
115
111
  * Derive the combined release type from a commit history collection.
116
112
  *
@@ -127,8 +123,7 @@ function deriveReleaseType(classifier, history) {
127
123
  for (const commit of history) releaseType = pickPriorityReleaseType(releaseType, determineReleaseType(classifier, commit));
128
124
  return releaseType;
129
125
  }
130
- //#endregion
131
- //#region src/workflow/versioning/isSameReleaseCycle.ts
126
+ // src/workflow/versioning/isSameReleaseCycle.ts
132
127
  /**
133
128
  * Determine whether two semantic version strings or objects belong to the same release cycle.
134
129
  *
@@ -148,8 +143,7 @@ function isSameReleaseCycle(currentVersion, nextVersion) {
148
143
  if (current.compareMain(next) === 0) return true;
149
144
  return current.major === 0 && (current.minor > 0 || current.patch > 0) && next.major === 1 && next.minor === 0 && next.patch === 0;
150
145
  }
151
- //#endregion
152
- //#region src/workflow/versioning/isStableVersion.ts
146
+ // src/workflow/versioning/isStableVersion.ts
153
147
  /**
154
148
  * Determine whether a version string represents a stable SemVer release.
155
149
  *
@@ -169,8 +163,7 @@ function isStableVersion(version) {
169
163
  if (!parsed) throw new Error(`The version "${colors.bold(version)}" is not a valid SemVer.`);
170
164
  return parsed.major > 0 && parsed.prerelease.length === 0;
171
165
  }
172
- //#endregion
173
- //#region src/config/const.ts
166
+ // src/config/const.ts
174
167
  var ALL_FILES = "**/*";
175
168
  var DEFAULT_CHANGELOG_FILE = "CHANGELOG.md";
176
169
  var GIT_TRAILER_RELEASE_AGENT = "Release-Agent";
@@ -235,8 +228,7 @@ var RELEASE_HOOK_NAMES = [
235
228
  "publish",
236
229
  "finalize"
237
230
  ];
238
- //#endregion
239
- //#region src/util/buildTrailerPattern.ts
231
+ // src/util/buildTrailerPattern.ts
240
232
  /**
241
233
  * Build a regular expression to match trailer lines using custom markers.
242
234
  *
@@ -249,8 +241,7 @@ var RELEASE_HOOK_NAMES = [
249
241
  function buildTrailerPattern(markers = []) {
250
242
  return new RegExp(`^(${markers.map(RegExp.escape).concat("[A-Za-z0-9_-]+").join("|")})[ \\t]*:[ \\t]*(.*)$`);
251
243
  }
252
- //#endregion
253
- //#region src/util/isDefined.ts
244
+ // src/util/isDefined.ts
254
245
  /**
255
246
  * Type guard that asserts a value is neither `null` nor `undefined`.
256
247
  *
@@ -260,8 +251,7 @@ function buildTrailerPattern(markers = []) {
260
251
  function isDefined(value) {
261
252
  return value != null;
262
253
  }
263
- //#endregion
264
- //#region src/util/compact.ts
254
+ // src/util/compact.ts
265
255
  /**
266
256
  * Remove `null` and `undefined` values from an array.
267
257
  *
@@ -271,8 +261,7 @@ function isDefined(value) {
271
261
  function compact(array) {
272
262
  return array.filter(isDefined);
273
263
  }
274
- //#endregion
275
- //#region src/util/execCommand.ts
264
+ // src/util/execCommand.ts
276
265
  /**
277
266
  * Execute a system command with arguments as a child process.
278
267
  *
@@ -377,8 +366,7 @@ function quoteCommandForMessage(command) {
377
366
  if (!command.includes("\"")) return `"${command}"`;
378
367
  return JSON.stringify(command);
379
368
  }
380
- //#endregion
381
- //#region src/util/execGit.ts
369
+ // src/util/execGit.ts
382
370
  /**
383
371
  * Execute a Git command inside a target directory.
384
372
  *
@@ -396,8 +384,7 @@ function execGit(cwd, args, options) {
396
384
  cwd
397
385
  });
398
386
  }
399
- //#endregion
400
- //#region src/util/formatFile.ts
387
+ // src/util/formatFile.ts
401
388
  /**
402
389
  * Format `content` for `filePath` using Prettier when possible.
403
390
  *
@@ -422,8 +409,7 @@ async function formatFile(filePath, content) {
422
409
  return content;
423
410
  }
424
411
  }
425
- //#endregion
426
- //#region src/util/interpolate.ts
412
+ // src/util/interpolate.ts
427
413
  var BACKSLASH = "\\";
428
414
  var LEFT_BRACE = "{";
429
415
  var RIGHT_BRACE = "}";
@@ -522,8 +508,7 @@ function interpolate(template, data) {
522
508
  }
523
509
  return result;
524
510
  }
525
- //#endregion
526
- //#region src/util/isClass.ts
511
+ // src/util/isClass.ts
527
512
  /**
528
513
  * Determine whether a given value is a constructible class.
529
514
  *
@@ -545,8 +530,7 @@ function isClass(func) {
545
530
  if (!descriptor || descriptor.writable) return false;
546
531
  return /^class\s/.test(Function.prototype.toString.call(func));
547
532
  }
548
- //#endregion
549
- //#region src/util/isMatch.ts
533
+ // src/util/isMatch.ts
550
534
  /**
551
535
  * Determine whether a target string matches glob patterns.
552
536
  *
@@ -568,8 +552,7 @@ function isMatch(target, patterns) {
568
552
  else positives.push(pattern);
569
553
  return positives.some((pattern) => minimatch(target, pattern, { dot: true })) && negatives.every((pattern) => minimatch(target, pattern, { dot: true }));
570
554
  }
571
- //#endregion
572
- //#region src/util/readJson.ts
555
+ // src/util/readJson.ts
573
556
  /**
574
557
  * Read and parse a JSON file.
575
558
  *
@@ -596,8 +579,7 @@ async function readJson(filePath) {
596
579
  if (typeof json !== "object" || json === null) throw new Error(`JSON file at "${colors.bold(filePath)}" does not contain a valid object.`);
597
580
  return json;
598
581
  }
599
- //#endregion
600
- //#region src/util/writeJson.ts
582
+ // src/util/writeJson.ts
601
583
  /**
602
584
  * Write a JSON `payload` to `filePath`, formatting the content first.
603
585
  *
@@ -613,8 +595,7 @@ async function writeJson(filePath, payload) {
613
595
  await fs.mkdir(path.dirname(filePath), { recursive: true });
614
596
  await fs.writeFile(filePath, content);
615
597
  }
616
- //#endregion
617
- //#region src/config/createPlugin.ts
598
+ // src/config/createPlugin.ts
618
599
  /**
619
600
  * Instantiate or invoke a plugin factory to produce a release plugin instance.
620
601
  *
@@ -633,8 +614,7 @@ async function createPlugin(plugin) {
633
614
  if (plugin != null && typeof plugin === "object" && Object.hasOwn(plugin, "name") && typeof plugin.name === "string") return plugin;
634
615
  return null;
635
616
  }
636
- //#endregion
637
- //#region src/config/findReleaseRule.ts
617
+ // src/config/findReleaseRule.ts
638
618
  /**
639
619
  * Find the first release rule matching a release reference.
640
620
  *
@@ -649,8 +629,7 @@ function findReleaseRule(ref, rules) {
649
629
  return (rule.type == null || rule.type === ref.type) && isMatch(ref.name, rule.pattern);
650
630
  });
651
631
  }
652
- //#endregion
653
- //#region src/config/isSemVer.ts
632
+ // src/config/isSemVer.ts
654
633
  /**
655
634
  * Determine whether a value is a valid Semantic Versioning string.
656
635
  *
@@ -666,8 +645,7 @@ function isSemVer(version) {
666
645
  if (version.startsWith("v")) return false;
667
646
  return semver.parse(version) != null;
668
647
  }
669
- //#endregion
670
- //#region src/config/isSemVerGitTag.ts
648
+ // src/config/isSemVerGitTag.ts
671
649
  /**
672
650
  * Determine whether a tag string is a valid SemVer-style Git tag.
673
651
  *
@@ -684,8 +662,7 @@ function isSemVerGitTag(tag) {
684
662
  const hasVersionPrefix = tag.startsWith("v");
685
663
  return isScopedPackage || hasVersionPrefix;
686
664
  }
687
- //#endregion
688
- //#region src/config/sanitizePrereleaseLabel.ts
665
+ // src/config/sanitizePrereleaseLabel.ts
689
666
  /**
690
667
  * Sanitize a string into a safe, SemVer-compliant prerelease label.
691
668
  *
@@ -698,8 +675,7 @@ function isSemVerGitTag(tag) {
698
675
  function sanitizePrereleaseLabel(label) {
699
676
  return label.replace(/[^a-zA-Z0-9]+/g, "-").replace(/-+/g, "-").replace(/^-+|-+$/g, "");
700
677
  }
701
- //#endregion
702
- //#region src/config/resolveReleaseChannel.ts
678
+ // src/config/resolveReleaseChannel.ts
703
679
  /**
704
680
  * Resolve the release channel for a release context.
705
681
  *
@@ -720,8 +696,7 @@ function resolveReleaseChannel(options) {
720
696
  if (typeof resolved === "string") resolved = interpolate(resolved, templateParams);
721
697
  return resolved;
722
698
  }
723
- //#endregion
724
- //#region src/config/resolveVersionQualifier.ts
699
+ // src/config/resolveVersionQualifier.ts
725
700
  /**
726
701
  * Resolve the version qualifier for a release context.
727
702
  *
@@ -744,8 +719,7 @@ function resolveVersionQualifier(options) {
744
719
  if (resolved && !isSemVer(`1.0.0-${resolved}.1`)) throw new Error(`The resolved version qualifier "${resolved}" is not a valid SemVer prerelease identifier.`);
745
720
  return resolved;
746
721
  }
747
- //#endregion
748
- //#region src/workflow/analysis/isCommitForPackage.ts
722
+ // src/workflow/analysis/isCommitForPackage.ts
749
723
  /**
750
724
  * Test whether a commit modifies files in a package.
751
725
  *
@@ -759,8 +733,7 @@ function isCommitForPackage(pkg, commit) {
759
733
  return isMatch(file, pkg.files || path.join(location, "**/*"));
760
734
  });
761
735
  }
762
- //#endregion
763
- //#region src/workflow/analysis/deriveChangeReleases.ts
736
+ // src/workflow/analysis/deriveChangeReleases.ts
764
737
  /**
765
738
  * Analyze commit history to update release plans for packages.
766
739
  *
@@ -804,8 +777,7 @@ async function deriveChangeReleases(hint, classifier, plans, history) {
804
777
  };
805
778
  });
806
779
  }
807
- //#endregion
808
- //#region src/workflow/analysis/deriveTransitionReleases.ts
780
+ // src/workflow/analysis/deriveTransitionReleases.ts
809
781
  /**
810
782
  * Derive transition release types for release plans based on version qualifiers.
811
783
  *
@@ -863,8 +835,7 @@ function deriveTransitionReleases(hint, versionQualifier, plans) {
863
835
  };
864
836
  });
865
837
  }
866
- //#endregion
867
- //#region src/workflow/analysis/promotePrereleaseVersions.ts
838
+ // src/workflow/analysis/promotePrereleaseVersions.ts
868
839
  /**
869
840
  * Promote prerelease versions when they have no explicit release type.
870
841
  *
@@ -899,8 +870,7 @@ async function promotePrereleaseVersions(plans) {
899
870
  return plan;
900
871
  });
901
872
  }
902
- //#endregion
903
- //#region src/git/branch/getCurrentGitBranch.ts
873
+ // src/git/branch/getCurrentGitBranch.ts
904
874
  /**
905
875
  * Get the current Git branch name.
906
876
  *
@@ -919,8 +889,7 @@ async function getCurrentGitBranch(cwd) {
919
889
  "HEAD"
920
890
  ])).trim();
921
891
  }
922
- //#endregion
923
- //#region src/git/commit/createGitCommit.ts
892
+ // src/git/commit/createGitCommit.ts
924
893
  /**
925
894
  * Stage all changes and create a git commit with the specified message.
926
895
  *
@@ -941,8 +910,7 @@ async function createGitCommit(cwd, message) {
941
910
  message
942
911
  ]);
943
912
  }
944
- //#endregion
945
- //#region src/git/commit/extractMentions.ts
913
+ // src/git/commit/extractMentions.ts
946
914
  var ALPHANUMERIC = "[a-zA-Z0-9]";
947
915
  var SEPARATOR = "[-_]";
948
916
  var USERNAME = `${ALPHANUMERIC}+(?:${SEPARATOR}+${ALPHANUMERIC}+)*`;
@@ -966,8 +934,7 @@ function extractMentions(text) {
966
934
  const mentions = new Set(matches.map((match) => match[1]));
967
935
  return Array.from(mentions);
968
936
  }
969
- //#endregion
970
- //#region src/cache/TTLCache.ts
937
+ // src/cache/TTLCache.ts
971
938
  /**
972
939
  * A simple time-to-live cache that automatically evicts entries after a TTL.
973
940
  *
@@ -1046,8 +1013,7 @@ var TTLCache = class {
1046
1013
  this.cache.clear();
1047
1014
  }
1048
1015
  };
1049
- //#endregion
1050
- //#region src/git/commit/parseGitCommit.ts
1016
+ // src/git/commit/parseGitCommit.ts
1051
1017
  var BREAKING_HEADER_REGEX = /^([\w-]+)(?:\(([^)]+)\))?!: (.*)$/;
1052
1018
  var BREAKING_MARKERS = ["BREAKING CHANGE", "BREAKING-CHANGE"];
1053
1019
  /**
@@ -1107,8 +1073,7 @@ async function parseGitCommit(entry, markers = []) {
1107
1073
  files: entry.files
1108
1074
  };
1109
1075
  }
1110
- //#endregion
1111
- //#region src/git/commit/parseGitPrettyFormat.ts
1076
+ // src/git/commit/parseGitPrettyFormat.ts
1112
1077
  /**
1113
1078
  * Field separator used in the git pretty format to produce a single-line
1114
1079
  *, machine-parseable record.
@@ -1169,8 +1134,7 @@ function parseGitPrettyFormat(raw) {
1169
1134
  files: files ? files.split("\n") : []
1170
1135
  };
1171
1136
  }
1172
- //#endregion
1173
- //#region src/git/commit/getParsedGitCommit.ts
1137
+ // src/git/commit/getParsedGitCommit.ts
1174
1138
  var cache = new TTLCache();
1175
1139
  /**
1176
1140
  * Retrieve and parse a git commit by its reference.
@@ -1198,8 +1162,7 @@ async function getParsedGitCommit(cwd, ref, markers = []) {
1198
1162
  cache.set(key, parsed);
1199
1163
  return parsed;
1200
1164
  }
1201
- //#endregion
1202
- //#region src/git/commit/getCurrentGitCommit.ts
1165
+ // src/git/commit/getCurrentGitCommit.ts
1203
1166
  /**
1204
1167
  * Resolve the current `HEAD` commit in the repository.
1205
1168
  *
@@ -1210,8 +1173,7 @@ async function getParsedGitCommit(cwd, ref, markers = []) {
1210
1173
  function getCurrentGitCommit(cwd, markers = []) {
1211
1174
  return getParsedGitCommit(cwd, "HEAD", markers);
1212
1175
  }
1213
- //#endregion
1214
- //#region src/git/history/countGitHistory.ts
1176
+ // src/git/history/countGitHistory.ts
1215
1177
  /**
1216
1178
  * Count mainline commits reachable from a given reference.
1217
1179
  *
@@ -1231,8 +1193,7 @@ async function countGitHistory(cwd, ref = "HEAD") {
1231
1193
  ]);
1232
1194
  return Number.parseInt(stdout.trim(), 10);
1233
1195
  }
1234
- //#endregion
1235
- //#region src/git/repository/isGitShallowRepository.ts
1196
+ // src/git/repository/isGitShallowRepository.ts
1236
1197
  /**
1237
1198
  * Determine whether the repository at `cwd` is a shallow clone.
1238
1199
  *
@@ -1245,8 +1206,7 @@ async function countGitHistory(cwd, ref = "HEAD") {
1245
1206
  async function isGitShallowRepository(cwd) {
1246
1207
  return (await execGit(cwd, ["rev-parse", "--is-shallow-repository"])).trim() === "true";
1247
1208
  }
1248
- //#endregion
1249
- //#region src/git/repository/withShallowLock.ts
1209
+ // src/git/repository/withShallowLock.ts
1250
1210
  var lockQueue = /* @__PURE__ */ new Map();
1251
1211
  var context = new AsyncLocalStorage();
1252
1212
  /**
@@ -1278,8 +1238,7 @@ async function withShallowLock(cwd, callback) {
1278
1238
  if (lockQueue.get(cwd) === queued) lockQueue.delete(cwd);
1279
1239
  }
1280
1240
  }
1281
- //#endregion
1282
- //#region src/git/revision/isGitAncestor.ts
1241
+ // src/git/revision/isGitAncestor.ts
1283
1242
  /**
1284
1243
  * Determine whether `ancestor` is an ancestor of `descendant`.
1285
1244
  *
@@ -1304,8 +1263,7 @@ function isGitAncestor(cwd, ancestor, descendant) {
1304
1263
  throw err;
1305
1264
  });
1306
1265
  }
1307
- //#endregion
1308
- //#region src/git/revision/resolveGitRevision.ts
1266
+ // src/git/revision/resolveGitRevision.ts
1309
1267
  /**
1310
1268
  * Resolve a Git revision or commit-ish expression to its full commit hash.
1311
1269
  *
@@ -1323,8 +1281,7 @@ async function resolveGitRevision(cwd, revision) {
1323
1281
  `${revision}^{commit}`
1324
1282
  ])).trim();
1325
1283
  }
1326
- //#endregion
1327
- //#region src/git/history/expandGitHistory.ts
1284
+ // src/git/history/expandGitHistory.ts
1328
1285
  /**
1329
1286
  * Deepen a shallow clone so additional commits become available.
1330
1287
  *
@@ -1388,8 +1345,7 @@ async function expandGitHistory(cwd, options = {}) {
1388
1345
  }
1389
1346
  });
1390
1347
  }
1391
- //#endregion
1392
- //#region src/git/revision/detectGitRelationship.ts
1348
+ // src/git/revision/detectGitRelationship.ts
1393
1349
  var GIT_REL_FLAGS = {
1394
1350
  NONE: 0,
1395
1351
  IS_ANCESTOR: 1,
@@ -1415,8 +1371,7 @@ async function detectGitRelationship(cwd, refA, refB) {
1415
1371
  if (bIsAncestor) flags |= GIT_REL_FLAGS.IS_DESCENDANT;
1416
1372
  return flags;
1417
1373
  }
1418
- //#endregion
1419
- //#region src/git/history/mergeGitHistory.ts
1374
+ // src/git/history/mergeGitHistory.ts
1420
1375
  /**
1421
1376
  * Merge two newest-first commit lists into a single deduplicated newest-first list.
1422
1377
  *
@@ -1460,8 +1415,7 @@ async function mergeGitHistory(cwd, a, b) {
1460
1415
  if (j) merged.push(j);
1461
1416
  return merged.concat(a2).concat(b2);
1462
1417
  }
1463
- //#endregion
1464
- //#region src/git/history/restoreFullGitHistory.ts
1418
+ // src/git/history/restoreFullGitHistory.ts
1465
1419
  /**
1466
1420
  * Convert a shallow clone into a full clone by fetching additional history.
1467
1421
  *
@@ -1474,8 +1428,7 @@ async function mergeGitHistory(cwd, a, b) {
1474
1428
  function restoreFullGitHistory(cwd) {
1475
1429
  return execGit(cwd, ["fetch", "--unshallow"]).then(() => true).catch(() => false);
1476
1430
  }
1477
- //#endregion
1478
- //#region src/git/history/showGitHistory.ts
1431
+ // src/git/history/showGitHistory.ts
1479
1432
  /**
1480
1433
  * Yield commit SHAs from repository history in paginated order.
1481
1434
  *
@@ -1518,8 +1471,7 @@ async function* showGitHistory(cwd, options = {}) {
1518
1471
  }
1519
1472
  } catch {}
1520
1473
  }
1521
- //#endregion
1522
- //#region src/git/history/showParsedGitHistory.ts
1474
+ // src/git/history/showParsedGitHistory.ts
1523
1475
  /**
1524
1476
  * Yield parsed commits sequentially from repository history.
1525
1477
  *
@@ -1536,8 +1488,7 @@ async function* showParsedGitHistory(cwd, options) {
1536
1488
  yield await getParsedGitCommit(cwd, commit);
1537
1489
  } catch {}
1538
1490
  }
1539
- //#endregion
1540
- //#region src/git/repository/getGitConfigValue.ts
1491
+ // src/git/repository/getGitConfigValue.ts
1541
1492
  /**
1542
1493
  * Get a local git configuration value for `key` in the repository at `cwd`.
1543
1494
  *
@@ -1560,8 +1511,7 @@ async function getGitConfigValue(cwd, key) {
1560
1511
  return;
1561
1512
  }
1562
1513
  }
1563
- //#endregion
1564
- //#region src/git/repository/ensureGitUserConfig.ts
1514
+ // src/git/repository/ensureGitUserConfig.ts
1565
1515
  /**
1566
1516
  * Ensure Git user configuration is set and return a cleanup handle.
1567
1517
  *
@@ -1611,8 +1561,7 @@ async function ensureGitUserConfig(cwd, user) {
1611
1561
  ]);
1612
1562
  } };
1613
1563
  }
1614
- //#endregion
1615
- //#region src/git/repository/getGitRemote.ts
1564
+ // src/git/repository/getGitRemote.ts
1616
1565
  /**
1617
1566
  * Get the URL for the named remote (defaults to `origin`).
1618
1567
  *
@@ -1627,8 +1576,7 @@ function getGitRemote(cwd, remoteName = "origin") {
1627
1576
  remoteName
1628
1577
  ]).then((stdout) => stdout.trim()).catch(() => null);
1629
1578
  }
1630
- //#endregion
1631
- //#region src/git/repository/pushGitChanges.ts
1579
+ // src/git/repository/pushGitChanges.ts
1632
1580
  /**
1633
1581
  * Push a branch and optional tags to the `origin` remote using an atomic push.
1634
1582
  *
@@ -1646,8 +1594,7 @@ async function pushGitChanges(cwd, branch, ...additionalTags) {
1646
1594
  "--no-verify"
1647
1595
  ]);
1648
1596
  }
1649
- //#endregion
1650
- //#region src/git/repository/resolveGitRepository.ts
1597
+ // src/git/repository/resolveGitRepository.ts
1651
1598
  /**
1652
1599
  * Resolve Git repository host, owner, and project metadata from the `origin` remote URL.
1653
1600
  *
@@ -1666,8 +1613,7 @@ async function resolveGitRepository(cwd) {
1666
1613
  };
1667
1614
  return null;
1668
1615
  }
1669
- //#endregion
1670
- //#region src/git/revision/readGitFile.ts
1616
+ // src/git/revision/readGitFile.ts
1671
1617
  /**
1672
1618
  * Read a file's contents from a specific Git revision.
1673
1619
  *
@@ -1688,8 +1634,7 @@ async function resolveGitRepository(cwd) {
1688
1634
  function readGitFile(cwd, ref, filePath) {
1689
1635
  return execGit(cwd, ["show", `${ref}:${filePath}`]).catch(() => null);
1690
1636
  }
1691
- //#endregion
1692
- //#region src/git/tag/createGitTag.ts
1637
+ // src/git/tag/createGitTag.ts
1693
1638
  /**
1694
1639
  * Create a git tag in the repository at `cwd`.
1695
1640
  *
@@ -1709,8 +1654,7 @@ async function createGitTag(cwd, tag, message) {
1709
1654
  "--cleanup=whitespace"
1710
1655
  ] : [tag]]);
1711
1656
  }
1712
- //#endregion
1713
- //#region src/git/tag/deleteGitTag.ts
1657
+ // src/git/tag/deleteGitTag.ts
1714
1658
  /**
1715
1659
  * Delete a local git tag in the repository at `cwd`.
1716
1660
  *
@@ -1725,8 +1669,7 @@ function deleteGitTag(cwd, tag) {
1725
1669
  tag
1726
1670
  ]).then(() => true).catch(() => false);
1727
1671
  }
1728
- //#endregion
1729
- //#region src/git/tag/isGitTagPresent.ts
1672
+ // src/git/tag/isGitTagPresent.ts
1730
1673
  /**
1731
1674
  * Determine whether a specific git tag exists locally in the repository.
1732
1675
  *
@@ -1737,8 +1680,7 @@ function deleteGitTag(cwd, tag) {
1737
1680
  function isGitTagPresent(cwd, tag) {
1738
1681
  return resolveGitRevision(cwd, `refs/tags/${tag}`).then(() => true).catch(() => false);
1739
1682
  }
1740
- //#endregion
1741
- //#region src/git/tag/ensureGitTag.ts
1683
+ // src/git/tag/ensureGitTag.ts
1742
1684
  var MIN_HISTORY_DEPTH = 2;
1743
1685
  var ORIGIN_NOT_REPO = `fatal: 'origin' does not appear to be a git repository`;
1744
1686
  var REMOTE_REF_NOT_FOUND = `fatal: couldn't find remote ref`;
@@ -1777,16 +1719,14 @@ function ensureGitTag(cwd, tag) {
1777
1719
  return false;
1778
1720
  });
1779
1721
  }
1780
- //#endregion
1781
- //#region src/git/tag/generateGitTagName.ts
1722
+ // src/git/tag/generateGitTagName.ts
1782
1723
  function generateGitTagName(entry, name, version) {
1783
1724
  if (!version) return null;
1784
1725
  if (entry) return `v${version}`;
1785
1726
  if (!name) throw new Error("Package name is required to build a tag name.");
1786
1727
  return `${name}@${version}`;
1787
1728
  }
1788
- //#endregion
1789
- //#region src/git/tag/getCurrentGitTag.ts
1729
+ // src/git/tag/getCurrentGitTag.ts
1790
1730
  /**
1791
1731
  * Get the tag name that exactly matches the current `HEAD`, if any.
1792
1732
  *
@@ -1806,8 +1746,7 @@ async function getCurrentGitTag(cwd) {
1806
1746
  return null;
1807
1747
  }
1808
1748
  }
1809
- //#endregion
1810
- //#region src/git/tag/getGitTagMessage.ts
1749
+ // src/git/tag/getGitTagMessage.ts
1811
1750
  /**
1812
1751
  * Get the message of an annotated git tag in the repository at `cwd`.
1813
1752
  *
@@ -1829,8 +1768,7 @@ async function getGitTagMessage(cwd, tag) {
1829
1768
  return;
1830
1769
  }
1831
1770
  }
1832
- //#endregion
1833
- //#region src/git/tag/getLatestGitTag.ts
1771
+ // src/git/tag/getLatestGitTag.ts
1834
1772
  /**
1835
1773
  * Get the most recent tag reachable from `HEAD`.
1836
1774
  *
@@ -1850,8 +1788,7 @@ async function getLatestGitTag(cwd) {
1850
1788
  return null;
1851
1789
  }
1852
1790
  }
1853
- //#endregion
1854
- //#region src/git/tag/isGitTagConnected.ts
1791
+ // src/git/tag/isGitTagConnected.ts
1855
1792
  /**
1856
1793
  * Determine whether a specific git tag commit is reachable from the current HEAD.
1857
1794
  *
@@ -1876,8 +1813,7 @@ async function isGitTagConnected(cwd, tag) {
1876
1813
  return false;
1877
1814
  }
1878
1815
  }
1879
- //#endregion
1880
- //#region src/git/tag/isGitTagPointed.ts
1816
+ // src/git/tag/isGitTagPointed.ts
1881
1817
  /**
1882
1818
  * Check whether a given tag points to the provided commit.
1883
1819
  *
@@ -1905,8 +1841,7 @@ async function isGitTagPointed(cwd, tag, commit) {
1905
1841
  return false;
1906
1842
  }
1907
1843
  }
1908
- //#endregion
1909
- //#region src/workflow/discovery/buildDependencyGraph.ts
1844
+ // src/workflow/discovery/buildDependencyGraph.ts
1910
1845
  /**
1911
1846
  * Build a dependency graph mapping package names to dependent release plans.
1912
1847
  *
@@ -1926,8 +1861,7 @@ function buildDependencyGraph(plans) {
1926
1861
  }
1927
1862
  return graph;
1928
1863
  }
1929
- //#endregion
1930
- //#region src/workflow/changelog/extractPlainText.ts
1864
+ // src/workflow/changelog/extractPlainText.ts
1931
1865
  /**
1932
1866
  * Extract trimmed plain text from a Heading, Paragraph, or PhrasingContent node.
1933
1867
  *
@@ -1949,8 +1883,7 @@ function extractPlainText(node) {
1949
1883
  }
1950
1884
  return result.trim() || null;
1951
1885
  }
1952
- //#endregion
1953
- //#region src/workflow/changelog/extractSemVer.ts
1886
+ // src/workflow/changelog/extractSemVer.ts
1954
1887
  var ANCHORED_SEMVER_REGEX = new RegExp(`^${SEMVER_REGEX.source}$`);
1955
1888
  var BRACKETED_SEMVER_REGEX = new RegExp(`\\[${SEMVER_REGEX.source}\\]`);
1956
1889
  /**
@@ -1970,8 +1903,7 @@ function extractSemVer(line) {
1970
1903
  return (ANCHORED_SEMVER_REGEX.exec(token) ?? BRACKETED_SEMVER_REGEX.exec(token))?.at(2);
1971
1904
  }));
1972
1905
  }
1973
- //#endregion
1974
- //#region src/workflow/changelog/iterateChangelogVersions.ts
1906
+ // src/workflow/changelog/iterateChangelogVersions.ts
1975
1907
  var SENTENCE_TERMINAL_REGEX = /\p{Sentence_Terminal}$/u;
1976
1908
  /**
1977
1909
  * Iterate over Semantic Version strings extracted from a Markdown changelog.
@@ -2007,8 +1939,7 @@ function* iterateChangelogVersions(changelogContent) {
2007
1939
  if (isVersionFound) return;
2008
1940
  }
2009
1941
  }
2010
- //#endregion
2011
- //#region src/workflow/changelog/extractLatestVersion.ts
1942
+ // src/workflow/changelog/extractLatestVersion.ts
2012
1943
  /**
2013
1944
  * Find the highest semantic version from the first version-bearing element.
2014
1945
  *
@@ -2023,8 +1954,7 @@ function extractLatestVersion(changelogContent) {
2023
1954
  for (const version of iterateChangelogVersions(changelogContent)) return version;
2024
1955
  return null;
2025
1956
  }
2026
- //#endregion
2027
- //#region src/workflow/discovery/verifyPackageTag.ts
1957
+ // src/workflow/discovery/verifyPackageTag.ts
2028
1958
  /**
2029
1959
  * Verify a Git tag against package specifications and repository history.
2030
1960
  *
@@ -2050,8 +1980,7 @@ async function verifyPackageTag(cwd, pkg, tagName) {
2050
1980
  await expandGitHistory(cwd, { until: tagRef });
2051
1981
  return isGitTagConnected(cwd, tagName);
2052
1982
  }
2053
- //#endregion
2054
- //#region src/workflow/discovery/discoverPackageTag.ts
1983
+ // src/workflow/discovery/discoverPackageTag.ts
2055
1984
  /**
2056
1985
  * Discover and validate the Git tag for a package.
2057
1986
  *
@@ -2090,8 +2019,7 @@ async function discoverPackageTag(cwd, pkg) {
2090
2019
  message: await getGitTagMessage(cwd, expectedTagName)
2091
2020
  };
2092
2021
  }
2093
- //#endregion
2094
- //#region src/workflow/discovery/resolvePackageStableTag.ts
2022
+ // src/workflow/discovery/resolvePackageStableTag.ts
2095
2023
  /**
2096
2024
  * Resolve the latest stable Git tag for a package.
2097
2025
  *
@@ -2134,8 +2062,7 @@ async function resolvePackageStableTag(cwd, pkg) {
2134
2062
  }
2135
2063
  return null;
2136
2064
  }
2137
- //#endregion
2138
- //#region src/workflow/discovery/resolvePackageTag.ts
2065
+ // src/workflow/discovery/resolvePackageTag.ts
2139
2066
  /**
2140
2067
  * Resolve the release tag for a single package version.
2141
2068
  *
@@ -2160,8 +2087,7 @@ async function resolvePackageTag(cwd, pkg) {
2160
2087
  };
2161
2088
  return null;
2162
2089
  }
2163
- //#endregion
2164
- //#region src/workflow/analysis/propagateDependencyUpdates.ts
2090
+ // src/workflow/analysis/propagateDependencyUpdates.ts
2165
2091
  /**
2166
2092
  * Propagate release updates through package dependencies.
2167
2093
  *
@@ -2199,8 +2125,7 @@ async function propagateDependencyUpdates(cwd, plans) {
2199
2125
  return plan;
2200
2126
  });
2201
2127
  }
2202
- //#endregion
2203
- //#region src/workflow/committing/isReleaseCommit.ts
2128
+ // src/workflow/committing/isReleaseCommit.ts
2204
2129
  /**
2205
2130
  * Determine whether a commit represents a release or matches a release marker.
2206
2131
  *
@@ -2229,8 +2154,7 @@ async function isReleaseCommit(cwd, commit, marker = GIT_TRAILER_RELEASE_AGENT)
2229
2154
  commit.hash
2230
2155
  ]).then(() => true).catch(() => false);
2231
2156
  }
2232
- //#endregion
2233
- //#region src/workflow/analysis/sliceUnreleased.ts
2157
+ // src/workflow/analysis/sliceUnreleased.ts
2234
2158
  /**
2235
2159
  * Yield parsed commits from the workspace until a release commit is found.
2236
2160
  *
@@ -2247,8 +2171,7 @@ async function* sliceUnreleased(cwd, options) {
2247
2171
  yield commit;
2248
2172
  }
2249
2173
  }
2250
- //#endregion
2251
- //#region src/workflow/analysis/streamPackageCommits.ts
2174
+ // src/workflow/analysis/streamPackageCommits.ts
2252
2175
  /**
2253
2176
  * Yield commits from git history associated with a package.
2254
2177
  *
@@ -2267,8 +2190,7 @@ async function* streamPackageCommits(cwd, pkg, options = {}) {
2267
2190
  };
2268
2191
  for await (const commit of showParsedGitHistory(cwd, options)) if (isCommitForPackage(pkg, commit)) yield commit;
2269
2192
  }
2270
- //#endregion
2271
- //#region src/workflow/changelog/buildChangelog.ts
2193
+ // src/workflow/changelog/buildChangelog.ts
2272
2194
  var preset = await createPreset();
2273
2195
  var headerPartial = (context) => {
2274
2196
  return context.version ? preset.writer.headerPartial?.(context) : void 0;
@@ -2303,8 +2225,7 @@ async function buildChangelog(context, history, options = {}) {
2303
2225
  headerPartial
2304
2226
  }, preset.writer));
2305
2227
  }
2306
- //#endregion
2307
- //#region src/workflow/changelog/buildReleaseNotes.ts
2228
+ // src/workflow/changelog/buildReleaseNotes.ts
2308
2229
  /**
2309
2230
  * Build release notes from a release context and commit history.
2310
2231
  *
@@ -2331,8 +2252,7 @@ async function buildReleaseNotes(context, history) {
2331
2252
  });
2332
2253
  return formatFile(path.join(context.cwd, DEFAULT_CHANGELOG_FILE), toMarkdown(root));
2333
2254
  }
2334
- //#endregion
2335
- //#region src/workflow/changelog/extractPreviousVersion.ts
2255
+ // src/workflow/changelog/extractPreviousVersion.ts
2336
2256
  /**
2337
2257
  * Find the latest stable version that precedes the current version.
2338
2258
  *
@@ -2371,8 +2291,7 @@ async function extractPreviousVersion(currentVersion, changelogContent) {
2371
2291
  }
2372
2292
  return null;
2373
2293
  }
2374
- //#endregion
2375
- //#region src/workflow/changelog/prependChangelog.ts
2294
+ // src/workflow/changelog/prependChangelog.ts
2376
2295
  var defaultChangelogTitle = "Changelog";
2377
2296
  /**
2378
2297
  * Prepend changelog content to a markdown file, creating it if necessary.
@@ -2410,8 +2329,7 @@ async function prependChangelog(filePath, revision) {
2410
2329
  content = await formatFile(filePath, content);
2411
2330
  await fs.writeFile(filePath, content);
2412
2331
  }
2413
- //#endregion
2414
- //#region src/workflow/changelog/writeChangelog.ts
2332
+ // src/workflow/changelog/writeChangelog.ts
2415
2333
  /**
2416
2334
  * Write changelog content to the file system based on the release plan.
2417
2335
  *
@@ -2425,11 +2343,9 @@ async function writeChangelog(cwd, plan) {
2425
2343
  await prependChangelog(path.join(cwd, plan.package.location, changelogFile), plan.release.changelog);
2426
2344
  }
2427
2345
  }
2428
- //#endregion
2429
- //#region package.json
2430
- var version = "0.4.0";
2431
- //#endregion
2432
- //#region src/workflow/committing/generateReleaseCommitMessage.ts
2346
+ // package.json
2347
+ var version = "0.5.0";
2348
+ // src/workflow/committing/generateReleaseCommitMessage.ts
2433
2349
  var NOTABLE_TYPES = [
2434
2350
  "feat",
2435
2351
  "fix",
@@ -2496,8 +2412,7 @@ async function generateReleaseCommitMessage(cwd, plans, trailers = {}) {
2496
2412
  Object.entries(trailers).map(([key, value]) => key && value != null ? `${key}: ${value}` : "").filter(Boolean).join("\n")
2497
2413
  ].filter(Boolean).join("\n\n");
2498
2414
  }
2499
- //#endregion
2500
- //#region src/plugin/HookManager.ts
2415
+ // src/plugin/HookManager.ts
2501
2416
  var HookPriority = {
2502
2417
  High: 50,
2503
2418
  Normal: 0,
@@ -2572,8 +2487,7 @@ var HookManager = class {
2572
2487
  return await dispatch(0, context);
2573
2488
  }
2574
2489
  };
2575
- //#endregion
2576
- //#region src/workflow/report/generateReleaseReport.ts
2490
+ // src/workflow/report/generateReleaseReport.ts
2577
2491
  /**
2578
2492
  * Generate a structured release report from the current workflow state.
2579
2493
  *
@@ -2615,8 +2529,7 @@ function generateReleaseReport(context) {
2615
2529
  }))
2616
2530
  };
2617
2531
  }
2618
- //#endregion
2619
- //#region src/workflow/report/printReleaseReport.ts
2532
+ // src/workflow/report/printReleaseReport.ts
2620
2533
  /**
2621
2534
  * Print a formatted release report to the logger.
2622
2535
  *
@@ -2657,8 +2570,7 @@ function printReleaseReport(logger, report) {
2657
2570
  }).join("\n\n");
2658
2571
  logger.info(`${header}\n\n${list}\n`);
2659
2572
  }
2660
- //#endregion
2661
- //#region src/workflow/executeReleaseWorkflow.ts
2573
+ // src/workflow/executeReleaseWorkflow.ts
2662
2574
  /**
2663
2575
  * Execute the complete release workflow across all configured plugins.
2664
2576
  *
@@ -2730,7 +2642,6 @@ async function executeReleaseWorkflow(context, plugins) {
2730
2642
  printReleaseReport(context.logger, generateReleaseReport(context));
2731
2643
  }
2732
2644
  }
2733
- //#endregion
2734
2645
  export { countGitHistory as $, getCurrentGitTag as A, isDefined as At, ensureGitUserConfig as B, deriveReleaseType as Bt, extractSemVer as C, isMatch as Ct, isGitTagConnected as D, execGit as Dt, isGitTagPointed as E, formatFile as Et, createGitTag as F, GIT_TRAILER_RELEASE_AGENT as Ft, mergeGitHistory as G, showParsedGitHistory as H, determineReleaseType as Ht, readGitFile as I, RELEASE_HOOK_NAMES as It, expandGitHistory as J, GIT_REL_FLAGS as K, resolveGitRepository as L, SEMVER_REGEX as Lt, ensureGitTag as M, ALL_FILES as Mt, isGitTagPresent as N, DEFAULT_CHANGELOG_FILE as Nt, getLatestGitTag as O, execCommand as Ot, deleteGitTag as P, DEV_NULL as Pt, isGitShallowRepository as Q, pushGitChanges as R, isStableVersion as Rt, iterateChangelogVersions as S, readJson as St, buildDependencyGraph as T, interpolate as Tt, showGitHistory as U, bumpVersion as Ut, getGitConfigValue as V, pickPriorityReleaseType as Vt, restoreFullGitHistory as W, extractVersionQualifier as Wt, isGitAncestor as X, resolveGitRevision as Y, withShallowLock as Z, resolvePackageTag as _, isSemVerGitTag as _t, HookPriority as a, parseGitCommit as at, verifyPackageTag as b, createPlugin as bt, writeChangelog as c, createGitCommit as ct, buildReleaseNotes as d, deriveTransitionReleases as dt, getCurrentGitCommit as et, buildChangelog as f, deriveChangeReleases as ft, propagateDependencyUpdates as g, sanitizePrereleaseLabel as gt, isReleaseCommit as h, resolveReleaseChannel as ht, HookManager as i, parseGitPrettyFormat as it, generateGitTagName as j, buildTrailerPattern as jt, getGitTagMessage as k, compact as kt, prependChangelog as l, getCurrentGitBranch as lt, sliceUnreleased as m, resolveVersionQualifier as mt, printReleaseReport as n, GIT_PRETTY_FIELD_SEPARATOR as nt, generateReleaseCommitMessage as o, TTLCache as ot, streamPackageCommits as p, isCommitForPackage as pt, detectGitRelationship as q, generateReleaseReport as r, GIT_PRETTY_FORMAT as rt, version as s, extractMentions as st, executeReleaseWorkflow as t, getParsedGitCommit as tt, extractPreviousVersion as u, promotePrereleaseVersions as ut, resolvePackageStableTag as v, isSemVer as vt, extractPlainText as w, isClass as wt, extractLatestVersion as x, writeJson as xt, discoverPackageTag as y, findReleaseRule as yt, getGitRemote as z, isSameReleaseCycle as zt };
2735
2646
 
2736
- //# sourceMappingURL=workflow-CroJ6v4g.js.map
2647
+ //# sourceMappingURL=workflow-DUIHrB5P.js.map