@storm-software/git-tools 2.131.18 → 2.131.20

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.
package/bin/git.cjs CHANGED
@@ -4300,7 +4300,7 @@ async function createReleaseGraph(options) {
4300
4300
  await graph.init(options);
4301
4301
  return graph;
4302
4302
  }
4303
- var StormReleaseGroupProcessor = class extends releaseGroupProcessor.ReleaseGroupProcessor {
4303
+ var StormReleaseGroupProcessor = class _StormReleaseGroupProcessor extends releaseGroupProcessor.ReleaseGroupProcessor {
4304
4304
  constructor(tree, workspaceConfig, projectGraph, nxReleaseConfig, releaseGraph, versionOptions) {
4305
4305
  super(tree, projectGraph, nxReleaseConfig, releaseGraph, {
4306
4306
  dryRun: !!versionOptions.dryRun,
@@ -4321,6 +4321,16 @@ var StormReleaseGroupProcessor = class extends releaseGroupProcessor.ReleaseGrou
4321
4321
  this.#nxReleaseConfig = nxReleaseConfig;
4322
4322
  this.#releaseGraph = releaseGraph;
4323
4323
  }
4324
+ static #BUMP_TYPE_PRIORITY = {
4325
+ major: 8,
4326
+ premajor: 7,
4327
+ minor: 6,
4328
+ preminor: 5,
4329
+ patch: 4,
4330
+ prepatch: 3,
4331
+ prerelease: 2,
4332
+ none: 1
4333
+ };
4324
4334
  #tree;
4325
4335
  #projectGraph;
4326
4336
  #nxReleaseConfig;
@@ -4527,11 +4537,17 @@ var StormReleaseGroupProcessor = class extends releaseGroupProcessor.ReleaseGrou
4527
4537
  newVersionInputReason,
4528
4538
  newVersionInputReasonData
4529
4539
  } = await this.#determineVersionBumpForProject(releaseGroup, project);
4530
- if (!fixedGroup.currentVersion || currentVersion && semver__default.default.gt(currentVersion, fixedGroup.currentVersion) || !fixedGroup.newVersion || fixedGroup.newVersion.input === "none" || newVersionInput && semver__default.default.gt(newVersionInput, fixedGroup.newVersion.input)) {
4540
+ if (!fixedGroup.currentVersion || currentVersion && semver__default.default.gt(currentVersion, fixedGroup.currentVersion) || !fixedGroup.newVersion || fixedGroup.newVersion.input === "none" || this.#isHigherPriorityBumpType(
4541
+ newVersionInput,
4542
+ fixedGroup.newVersion?.input
4543
+ )) {
4531
4544
  if (!fixedGroup.currentVersion || currentVersion && semver__default.default.gt(currentVersion, fixedGroup.currentVersion)) {
4532
4545
  fixedGroup.currentVersion = currentVersion;
4533
4546
  }
4534
- if (!fixedGroup.newVersion || fixedGroup.newVersion.input === "none" || newVersionInput && semver__default.default.gt(newVersionInput, fixedGroup.newVersion.input)) {
4547
+ if (!fixedGroup.newVersion || fixedGroup.newVersion.input === "none" || this.#isHigherPriorityBumpType(
4548
+ newVersionInput,
4549
+ fixedGroup.newVersion?.input
4550
+ )) {
4535
4551
  fixedGroup.newVersion = {
4536
4552
  input: newVersionInput,
4537
4553
  reason: newVersionInputReason,
@@ -4806,6 +4822,17 @@ var StormReleaseGroupProcessor = class extends releaseGroupProcessor.ReleaseGrou
4806
4822
  }
4807
4823
  return bumped;
4808
4824
  }
4825
+ #isHigherPriorityBumpType(candidate, current) {
4826
+ const candidatePriority = _StormReleaseGroupProcessor.#BUMP_TYPE_PRIORITY[candidate];
4827
+ const currentPriority = _StormReleaseGroupProcessor.#BUMP_TYPE_PRIORITY[current];
4828
+ if (candidatePriority === void 0) {
4829
+ return false;
4830
+ }
4831
+ if (currentPriority === void 0) {
4832
+ return true;
4833
+ }
4834
+ return candidatePriority > currentPriority;
4835
+ }
4809
4836
  #getCurrentCachedVersionForProject(projectName) {
4810
4837
  return this.#releaseGraph.cachedCurrentVersions.get(projectName) || null;
4811
4838
  }