@storm-software/git-tools 2.131.28 → 2.131.31

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 (56) hide show
  1. package/README.md +1 -1
  2. package/bin/{chunk-AX3PXQKJ.js → chunk-3I7DR63M.js} +3 -3
  3. package/bin/{chunk-AX3PXQKJ.js.map → chunk-3I7DR63M.js.map} +1 -1
  4. package/bin/{chunk-C6K3ZRT6.js → chunk-3NC3GIM6.js} +3 -3
  5. package/bin/{chunk-C6K3ZRT6.js.map → chunk-3NC3GIM6.js.map} +1 -1
  6. package/bin/{chunk-MQOEMLKV.cjs → chunk-6AN4QYAN.cjs} +4 -4
  7. package/bin/{chunk-MQOEMLKV.cjs.map → chunk-6AN4QYAN.cjs.map} +1 -1
  8. package/bin/{chunk-QITSXT5W.cjs → chunk-AY74OKG5.cjs} +6 -6
  9. package/bin/{chunk-QITSXT5W.cjs.map → chunk-AY74OKG5.cjs.map} +1 -1
  10. package/bin/{chunk-M4UDDFX2.cjs → chunk-B56KWU7H.cjs} +4 -4
  11. package/bin/{chunk-M4UDDFX2.cjs.map → chunk-B56KWU7H.cjs.map} +1 -1
  12. package/bin/{chunk-3XAQUPZK.js → chunk-BPY6SBLC.js} +5 -5
  13. package/bin/chunk-BPY6SBLC.js.map +1 -0
  14. package/bin/{chunk-GPHBDU6A.js → chunk-DDC7F5UZ.js} +3 -3
  15. package/bin/{chunk-GPHBDU6A.js.map → chunk-DDC7F5UZ.js.map} +1 -1
  16. package/bin/{chunk-Y7OK7243.js → chunk-EQ7Z3P24.js} +3 -3
  17. package/bin/{chunk-Y7OK7243.js.map → chunk-EQ7Z3P24.js.map} +1 -1
  18. package/bin/{chunk-4GZZR7XL.js → chunk-FC4WBB3T.js} +3 -3
  19. package/bin/{chunk-4GZZR7XL.js.map → chunk-FC4WBB3T.js.map} +1 -1
  20. package/bin/{chunk-QOOEK76B.cjs → chunk-M4LUWNQR.cjs} +5 -5
  21. package/bin/chunk-M4LUWNQR.cjs.map +1 -0
  22. package/bin/{chunk-WZZIVUHI.cjs → chunk-O3X5QPCQ.cjs} +4 -4
  23. package/bin/{chunk-WZZIVUHI.cjs.map → chunk-O3X5QPCQ.cjs.map} +1 -1
  24. package/bin/{chunk-DOELUOOS.js → chunk-O5U4PY3Z.js} +3 -3
  25. package/bin/{chunk-DOELUOOS.js.map → chunk-O5U4PY3Z.js.map} +1 -1
  26. package/bin/{chunk-3PI2VV32.js → chunk-SJQTSJGU.js} +3 -3
  27. package/bin/{chunk-3PI2VV32.js.map → chunk-SJQTSJGU.js.map} +1 -1
  28. package/bin/{chunk-3LVCR6LS.cjs → chunk-U7X6DX3D.cjs} +4 -4
  29. package/bin/{chunk-3LVCR6LS.cjs.map → chunk-U7X6DX3D.cjs.map} +1 -1
  30. package/bin/{chunk-4CS5RPMP.cjs → chunk-Y7LS5W35.cjs} +5 -5
  31. package/bin/{chunk-4CS5RPMP.cjs.map → chunk-Y7LS5W35.cjs.map} +1 -1
  32. package/bin/{chunk-NSP7UDOF.cjs → chunk-ZMVLIEV4.cjs} +4 -4
  33. package/bin/{chunk-NSP7UDOF.cjs.map → chunk-ZMVLIEV4.cjs.map} +1 -1
  34. package/bin/git.cjs +177 -224
  35. package/bin/git.cjs.map +1 -1
  36. package/bin/git.js +33 -80
  37. package/bin/git.js.map +1 -1
  38. package/bin/post-checkout.cjs +7 -7
  39. package/bin/post-checkout.js +2 -2
  40. package/bin/post-commit.cjs +7 -7
  41. package/bin/post-commit.js +2 -2
  42. package/bin/post-merge.cjs +7 -7
  43. package/bin/post-merge.js +2 -2
  44. package/bin/pre-commit.cjs +7 -7
  45. package/bin/pre-commit.js +2 -2
  46. package/bin/pre-install.cjs +7 -7
  47. package/bin/pre-install.js +2 -2
  48. package/bin/pre-push.cjs +7 -7
  49. package/bin/pre-push.js +2 -2
  50. package/bin/prepare.cjs +7 -7
  51. package/bin/prepare.js +2 -2
  52. package/bin/version-warning.cjs +5 -5
  53. package/bin/version-warning.js +1 -1
  54. package/package.json +11 -11
  55. package/bin/chunk-3XAQUPZK.js.map +0 -1
  56. package/bin/chunk-QOOEK76B.cjs.map +0 -1
package/bin/git.js CHANGED
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
- import { postCheckoutHook } from './chunk-DOELUOOS.js';
3
- import { postCommitHook } from './chunk-3PI2VV32.js';
4
- import { postMergeHook } from './chunk-AX3PXQKJ.js';
5
- import { preCommitHook } from './chunk-4GZZR7XL.js';
6
- import './chunk-C6K3ZRT6.js';
7
- import { prePushHook } from './chunk-GPHBDU6A.js';
2
+ import { postCheckoutHook } from './chunk-O5U4PY3Z.js';
3
+ import { postCommitHook } from './chunk-SJQTSJGU.js';
4
+ import { postMergeHook } from './chunk-3I7DR63M.js';
5
+ import { preCommitHook } from './chunk-FC4WBB3T.js';
6
+ import './chunk-3NC3GIM6.js';
7
+ import { prePushHook } from './chunk-DDC7F5UZ.js';
8
8
  import './chunk-HBLWPOJV.js';
9
- import { prepareHook } from './chunk-Y7OK7243.js';
9
+ import { prepareHook } from './chunk-EQ7Z3P24.js';
10
10
  import { run, runAsync } from './chunk-RPK5AKGK.js';
11
- import { defu, getConfig, handleProcess, writeSuccess, exitWithSuccess, exitWithError, writeInfo, brandIcon, findWorkspaceRootSafe, writeFatal, getWorkspaceConfig, joinPaths, writeDebug, writeWarning, writeTrace, isVerbose, formatLogMessage, __require, STORM_DEFAULT_RELEASE_BANNER } from './chunk-3XAQUPZK.js';
11
+ import { defu, getConfig, handleProcess, writeSuccess, exitWithSuccess, exitWithError, writeInfo, brandIcon, findWorkspaceRootSafe, writeFatal, getWorkspaceConfig, joinPaths, writeDebug, writeWarning, writeTrace, isVerbose, formatLogMessage, __require, STORM_DEFAULT_RELEASE_BANNER } from './chunk-BPY6SBLC.js';
12
12
  import TOML from '@ltd/j-toml';
13
13
  import { Command } from 'commander';
14
14
  import '@inquirer/checkbox';
@@ -52,9 +52,9 @@ import { printAndFlushChanges as printAndFlushChanges$1 } from 'nx/src/command-l
52
52
  import { createGitTagValues, handleDuplicateGitTags, createCommitMessageValues, isPrerelease, shouldPreferDockerVersionForReleaseGroup, ReleaseVersion, noDiffInChangelogMessage, shouldSkipVersionActions } from 'nx/src/command-line/release/utils/shared';
53
53
  import { interpolate as interpolate$1 } from 'nx/src/tasks-runner/utils';
54
54
  import { execCommand } from 'nx/src/command-line/release/utils/exec-command.js';
55
- import { getCommitHash, getFirstGitCommit, gitPush, gitAdd, extractTagAndVersion, getGitDiff, parseCommits, sanitizeProjectNameForGitTag } from 'nx/src/command-line/release/utils/git';
55
+ import { getCommitHash, getFirstGitCommit, gitPush, gitAdd, parseCommits, getGitDiff, sanitizeProjectNameForGitTag, extractTagAndVersion } from 'nx/src/command-line/release/utils/git';
56
56
  import { interpolate } from 'nx/src/tasks-runner/utils.js';
57
- import semver, { prerelease, coerce, valid, gt, gte, major } from 'semver';
57
+ import semver, { prerelease, coerce, gte, valid, gt, major } from 'semver';
58
58
  import { ReleaseClient } from 'nx/release';
59
59
  import { readRawVersionPlans, setResolvedVersionPlansOnGroups } from 'nx/src/command-line/release/config/version-plans';
60
60
  import { printAndFlushChanges } from 'nx/src/command-line/release/utils/print-changes.js';
@@ -2648,8 +2648,7 @@ async function generateChangelogForProjects({
2648
2648
  return projectChangelogs;
2649
2649
  }
2650
2650
  async function getCommits(fromSHA, toSHA) {
2651
- const rawCommits = await getGitDiff(fromSHA, toSHA);
2652
- return parseCommits(rawCommits);
2651
+ return parseCommits(await getGitDiff(fromSHA, toSHA));
2653
2652
  }
2654
2653
  async function filterProjectCommits({
2655
2654
  fromSHA,
@@ -2802,6 +2801,20 @@ async function commitChanges({
2802
2801
  });
2803
2802
  }
2804
2803
  var SEMVER_REGEX = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/g;
2804
+ function compareTags(tags, tagRegexp, options) {
2805
+ return tags.reduce(
2806
+ (ret, releaseTag) => {
2807
+ const result = extractTagAndVersion(releaseTag, tagRegexp, options);
2808
+ const version = coerce(result.extractedVersion)?.version;
2809
+ const current = coerce(ret.extractedVersion)?.version;
2810
+ if (version && valid(version) && (!current || !valid(current) || gt(version, current, { loose: true }))) {
2811
+ return result;
2812
+ }
2813
+ return ret;
2814
+ },
2815
+ extractTagAndVersion(tags[0], tagRegexp, options)
2816
+ );
2817
+ }
2805
2818
  async function getLatestGitTagForPattern(workspaceConfig, releaseTagPattern, additionalInterpolationData = {}, resolveTags, options) {
2806
2819
  const { requireSemver, strictPreid, preid, checkAllBranchesWhen } = options;
2807
2820
  try {
@@ -2831,22 +2844,12 @@ async function getLatestGitTagForPattern(workspaceConfig, releaseTagPattern, add
2831
2844
  workspaceConfig
2832
2845
  );
2833
2846
  if (!strictPreid) {
2834
- writeDebug(
2835
- `Not using strict preid, will use the first matching tag ${matchingTags[0]} for release tag pattern "${releaseTagPattern}" (Interpolated tag pattern: ${interpolatedTagPattern})`,
2847
+ writeTrace(
2848
+ `Not using strict preid, will use the greatest matching tag of project "${additionalInterpolationData.projectName}":
2849
+ ${matchingTags.join(", ")}`,
2836
2850
  workspaceConfig
2837
2851
  );
2838
- return matchingTags.reduce(
2839
- (ret, releaseTag) => {
2840
- const result = extractTagAndVersion(releaseTag, tagRegexp, options);
2841
- const version = coerce(result.extractedVersion)?.version;
2842
- const current = coerce(ret.extractedVersion)?.version;
2843
- if (version && valid(version) && (!current || !valid(current) || gt(version, current, { loose: true }))) {
2844
- return result;
2845
- }
2846
- return ret;
2847
- },
2848
- extractTagAndVersion(matchingTags[0], tagRegexp, options)
2849
- );
2852
+ return compareTags(matchingTags, tagRegexp, options);
2850
2853
  }
2851
2854
  const stableReleaseTags = matchingTags.filter((tag) => {
2852
2855
  const matches = tag.match(tagRegexp);
@@ -2870,34 +2873,8 @@ async function getLatestGitTagForPattern(workspaceConfig, releaseTagPattern, add
2870
2873
  workspaceConfig
2871
2874
  );
2872
2875
  if (preidReleaseTags.length > 0 && stableReleaseTags.length > 0) {
2873
- const preidResult = preidReleaseTags.reduce(
2874
- (ret, releaseTag) => {
2875
- const result = extractTagAndVersion(releaseTag, tagRegexp, options);
2876
- const version = coerce(result.extractedVersion)?.version;
2877
- const current = coerce(ret.extractedVersion)?.version;
2878
- if (version && valid(version) && (!current || !valid(current) || gt(version, current, {
2879
- loose: true
2880
- }))) {
2881
- return result;
2882
- }
2883
- return ret;
2884
- },
2885
- extractTagAndVersion(preidReleaseTags[0], tagRegexp, options)
2886
- );
2887
- const stableResult = stableReleaseTags.reduce(
2888
- (ret, releaseTag) => {
2889
- const result = extractTagAndVersion(releaseTag, tagRegexp, options);
2890
- const version = coerce(result.extractedVersion)?.version;
2891
- const current = coerce(ret.extractedVersion)?.version;
2892
- if (version && valid(version) && (!current || !valid(current) || gt(version, current, {
2893
- loose: true
2894
- }))) {
2895
- return result;
2896
- }
2897
- return ret;
2898
- },
2899
- extractTagAndVersion(stableReleaseTags[0], tagRegexp, options)
2900
- );
2876
+ const preidResult = compareTags(preidReleaseTags, tagRegexp, options);
2877
+ const stableResult = compareTags(stableReleaseTags, tagRegexp, options);
2901
2878
  const preidBaseVersion = coerce(preidResult.extractedVersion)?.version;
2902
2879
  const stableVersion = coerce(stableResult.extractedVersion)?.version;
2903
2880
  writeDebug(
@@ -2918,20 +2895,7 @@ async function getLatestGitTagForPattern(workspaceConfig, releaseTagPattern, add
2918
2895
  `Using latest preid tag for release tag pattern "${releaseTagPattern}" (Interpolated tag pattern: ${interpolatedTagPattern})`,
2919
2896
  workspaceConfig
2920
2897
  );
2921
- return preidReleaseTags.reduce(
2922
- (ret, releaseTag) => {
2923
- const result = extractTagAndVersion(releaseTag, tagRegexp, options);
2924
- const version = coerce(result.extractedVersion)?.version;
2925
- const current = coerce(ret.extractedVersion)?.version;
2926
- if (version && valid(version) && (!current || !valid(current) || gt(version, current, {
2927
- loose: true
2928
- }))) {
2929
- return result;
2930
- }
2931
- return ret;
2932
- },
2933
- extractTagAndVersion(preidReleaseTags[0], tagRegexp, options)
2934
- );
2898
+ return compareTags(preidReleaseTags, tagRegexp, options);
2935
2899
  }
2936
2900
  }
2937
2901
  if (stableReleaseTags.length > 0) {
@@ -2939,18 +2903,7 @@ async function getLatestGitTagForPattern(workspaceConfig, releaseTagPattern, add
2939
2903
  `Using latest stable tag for release tag pattern "${releaseTagPattern}" (Interpolated tag pattern: ${interpolatedTagPattern})`,
2940
2904
  workspaceConfig
2941
2905
  );
2942
- return stableReleaseTags.reduce(
2943
- (ret, releaseTag) => {
2944
- const result = extractTagAndVersion(releaseTag, tagRegexp, options);
2945
- const version = coerce(result.extractedVersion)?.version;
2946
- const current = coerce(ret.extractedVersion)?.version;
2947
- if (version && valid(version) && (!current || !valid(current) || gt(version, current, { loose: true }))) {
2948
- return result;
2949
- }
2950
- return ret;
2951
- },
2952
- extractTagAndVersion(stableReleaseTags[0], tagRegexp, options)
2953
- );
2906
+ return compareTags(stableReleaseTags, tagRegexp, options);
2954
2907
  }
2955
2908
  return null;
2956
2909
  } catch {