@storm-software/git-tools 2.131.29 → 2.131.32
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/README.md +1 -1
- package/bin/{chunk-AX3PXQKJ.js → chunk-3I7DR63M.js} +3 -3
- package/bin/{chunk-AX3PXQKJ.js.map → chunk-3I7DR63M.js.map} +1 -1
- package/bin/{chunk-C6K3ZRT6.js → chunk-3NC3GIM6.js} +3 -3
- package/bin/{chunk-C6K3ZRT6.js.map → chunk-3NC3GIM6.js.map} +1 -1
- package/bin/{chunk-MQOEMLKV.cjs → chunk-6AN4QYAN.cjs} +4 -4
- package/bin/{chunk-MQOEMLKV.cjs.map → chunk-6AN4QYAN.cjs.map} +1 -1
- package/bin/{chunk-QITSXT5W.cjs → chunk-AY74OKG5.cjs} +6 -6
- package/bin/{chunk-QITSXT5W.cjs.map → chunk-AY74OKG5.cjs.map} +1 -1
- package/bin/{chunk-M4UDDFX2.cjs → chunk-B56KWU7H.cjs} +4 -4
- package/bin/{chunk-M4UDDFX2.cjs.map → chunk-B56KWU7H.cjs.map} +1 -1
- package/bin/{chunk-3XAQUPZK.js → chunk-BPY6SBLC.js} +5 -5
- package/bin/chunk-BPY6SBLC.js.map +1 -0
- package/bin/{chunk-GPHBDU6A.js → chunk-DDC7F5UZ.js} +3 -3
- package/bin/{chunk-GPHBDU6A.js.map → chunk-DDC7F5UZ.js.map} +1 -1
- package/bin/{chunk-Y7OK7243.js → chunk-EQ7Z3P24.js} +3 -3
- package/bin/{chunk-Y7OK7243.js.map → chunk-EQ7Z3P24.js.map} +1 -1
- package/bin/{chunk-4GZZR7XL.js → chunk-FC4WBB3T.js} +3 -3
- package/bin/{chunk-4GZZR7XL.js.map → chunk-FC4WBB3T.js.map} +1 -1
- package/bin/{chunk-QOOEK76B.cjs → chunk-M4LUWNQR.cjs} +5 -5
- package/bin/chunk-M4LUWNQR.cjs.map +1 -0
- package/bin/{chunk-WZZIVUHI.cjs → chunk-O3X5QPCQ.cjs} +4 -4
- package/bin/{chunk-WZZIVUHI.cjs.map → chunk-O3X5QPCQ.cjs.map} +1 -1
- package/bin/{chunk-DOELUOOS.js → chunk-O5U4PY3Z.js} +3 -3
- package/bin/{chunk-DOELUOOS.js.map → chunk-O5U4PY3Z.js.map} +1 -1
- package/bin/{chunk-3PI2VV32.js → chunk-SJQTSJGU.js} +3 -3
- package/bin/{chunk-3PI2VV32.js.map → chunk-SJQTSJGU.js.map} +1 -1
- package/bin/{chunk-3LVCR6LS.cjs → chunk-U7X6DX3D.cjs} +4 -4
- package/bin/{chunk-3LVCR6LS.cjs.map → chunk-U7X6DX3D.cjs.map} +1 -1
- package/bin/{chunk-4CS5RPMP.cjs → chunk-Y7LS5W35.cjs} +5 -5
- package/bin/{chunk-4CS5RPMP.cjs.map → chunk-Y7LS5W35.cjs.map} +1 -1
- package/bin/{chunk-NSP7UDOF.cjs → chunk-ZMVLIEV4.cjs} +4 -4
- package/bin/{chunk-NSP7UDOF.cjs.map → chunk-ZMVLIEV4.cjs.map} +1 -1
- package/bin/git.cjs +177 -224
- package/bin/git.cjs.map +1 -1
- package/bin/git.js +33 -80
- package/bin/git.js.map +1 -1
- package/bin/post-checkout.cjs +7 -7
- package/bin/post-checkout.js +2 -2
- package/bin/post-commit.cjs +7 -7
- package/bin/post-commit.js +2 -2
- package/bin/post-merge.cjs +7 -7
- package/bin/post-merge.js +2 -2
- package/bin/pre-commit.cjs +7 -7
- package/bin/pre-commit.js +2 -2
- package/bin/pre-install.cjs +7 -7
- package/bin/pre-install.js +2 -2
- package/bin/pre-push.cjs +7 -7
- package/bin/pre-push.js +2 -2
- package/bin/prepare.cjs +7 -7
- package/bin/prepare.js +2 -2
- package/bin/version-warning.cjs +5 -5
- package/bin/version-warning.js +1 -1
- package/package.json +11 -11
- package/bin/chunk-3XAQUPZK.js.map +0 -1
- 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-
|
|
3
|
-
import { postCommitHook } from './chunk-
|
|
4
|
-
import { postMergeHook } from './chunk-
|
|
5
|
-
import { preCommitHook } from './chunk-
|
|
6
|
-
import './chunk-
|
|
7
|
-
import { prePushHook } from './chunk-
|
|
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-
|
|
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-
|
|
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,
|
|
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,
|
|
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
|
-
|
|
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
|
-
|
|
2835
|
-
`Not using strict preid, will use the
|
|
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
|
|
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
|
|
2874
|
-
|
|
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
|
|
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
|
|
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 {
|