@storm-software/git-tools 2.131.127 → 2.131.129
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-NNIW4L2Q.js → chunk-4PYFQEVV.js} +3 -3
- package/bin/{chunk-NNIW4L2Q.js.map → chunk-4PYFQEVV.js.map} +1 -1
- package/bin/chunk-5N5WKPFP.cjs +2116 -0
- package/bin/chunk-5N5WKPFP.cjs.map +1 -0
- package/bin/{chunk-VIFL2F7H.js → chunk-6QIXTOH3.js} +3 -3
- package/bin/{chunk-VIFL2F7H.js.map → chunk-6QIXTOH3.js.map} +1 -1
- package/bin/{chunk-MSQDEBW3.js → chunk-7QTKVCXH.js} +3 -3
- package/bin/{chunk-MSQDEBW3.js.map → chunk-7QTKVCXH.js.map} +1 -1
- package/bin/chunk-BB4W6BYT.js +2073 -0
- package/bin/chunk-BB4W6BYT.js.map +1 -0
- package/bin/{chunk-GAHICIOD.js → chunk-CTZZFGE5.js} +3 -3
- package/bin/{chunk-GAHICIOD.js.map → chunk-CTZZFGE5.js.map} +1 -1
- package/bin/{chunk-B5CZCP2Y.cjs → chunk-GVDRZBZ6.cjs} +4 -4
- package/bin/{chunk-B5CZCP2Y.cjs.map → chunk-GVDRZBZ6.cjs.map} +1 -1
- package/bin/{chunk-ZBZINLOA.js → chunk-IAPT5G4H.js} +3 -3
- package/bin/{chunk-ZBZINLOA.js.map → chunk-IAPT5G4H.js.map} +1 -1
- package/bin/{chunk-SASCLX6I.js → chunk-NMEHIDW7.js} +3 -3
- package/bin/{chunk-SASCLX6I.js.map → chunk-NMEHIDW7.js.map} +1 -1
- package/bin/{chunk-IXUKWNVT.cjs → chunk-NPQDZF7C.cjs} +4 -4
- package/bin/{chunk-IXUKWNVT.cjs.map → chunk-NPQDZF7C.cjs.map} +1 -1
- package/bin/{chunk-NZ4HDNJ7.cjs → chunk-Q5KDQ5YL.cjs} +4 -4
- package/bin/{chunk-NZ4HDNJ7.cjs.map → chunk-Q5KDQ5YL.cjs.map} +1 -1
- package/bin/{chunk-MUNEGKNC.cjs → chunk-RMBYK2PG.cjs} +5 -5
- package/bin/{chunk-MUNEGKNC.cjs.map → chunk-RMBYK2PG.cjs.map} +1 -1
- package/bin/{chunk-KJMWPKRH.cjs → chunk-TTSXYT7W.cjs} +4 -4
- package/bin/{chunk-KJMWPKRH.cjs.map → chunk-TTSXYT7W.cjs.map} +1 -1
- package/bin/{chunk-ZL2JPPJF.cjs → chunk-U3US7IBH.cjs} +4 -4
- package/bin/{chunk-ZL2JPPJF.cjs.map → chunk-U3US7IBH.cjs.map} +1 -1
- package/bin/{chunk-2NTFR3EF.cjs → chunk-XVVRI3DK.cjs} +6 -6
- package/bin/{chunk-2NTFR3EF.cjs.map → chunk-XVVRI3DK.cjs.map} +1 -1
- package/bin/{chunk-KFRB3UCF.js → chunk-ZPPKYVIH.js} +3 -3
- package/bin/{chunk-KFRB3UCF.js.map → chunk-ZPPKYVIH.js.map} +1 -1
- package/bin/git.cjs +185 -195
- package/bin/git.cjs.map +1 -1
- package/bin/git.js +46 -54
- 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/dist/chunk-5AHFCU2Z.js +2412 -0
- package/dist/{chunk-OMWWQPRY.js → chunk-F22OVP2A.js} +2 -2
- package/dist/{chunk-RIPABM45.cjs → chunk-GFCNZUMY.cjs} +9 -9
- package/dist/chunk-TEL5N7KI.cjs +2454 -0
- package/dist/commit/minimal.cjs +4 -4
- package/dist/commit/minimal.js +2 -2
- package/dist/commit/monorepo.cjs +5 -5
- package/dist/commit/monorepo.js +3 -3
- package/dist/index.cjs +39 -39
- package/dist/index.js +10 -10
- package/dist/release/config.cjs +21 -21
- package/dist/release/config.js +4 -4
- package/package.json +20 -24
- package/bin/chunk-DGRFGD2R.cjs +0 -3578
- package/bin/chunk-DGRFGD2R.cjs.map +0 -1
- package/bin/chunk-ZW42VDY5.js +0 -3554
- package/bin/chunk-ZW42VDY5.js.map +0 -1
- package/dist/chunk-IVBFLZSL.cjs +0 -3863
- package/dist/chunk-J5FHPMMG.js +0 -3840
- package/dist/{chunk-XS6PFVQQ.js → chunk-2YWPEDFN.js} +1 -1
- package/dist/{chunk-OABXW2AI.js → chunk-5GF6UCF2.js} +1 -1
- package/dist/{chunk-LXXJEGUX.cjs → chunk-5UUCFSHA.cjs} +1 -1
- package/dist/{chunk-PBGCSXPL.js → chunk-7IP42CZC.js} +1 -1
- package/dist/{chunk-WRSI3KUJ.cjs → chunk-HBZTKU5M.cjs} +1 -1
- package/dist/{chunk-NPCVH6FC.js → chunk-HEEBBIWA.js} +1 -1
- package/dist/{chunk-SHNYRICK.cjs → chunk-J6OZPTPD.cjs} +1 -1
- package/dist/{chunk-ZYMWVRAL.cjs → chunk-RWLJU2S2.cjs} +1 -1
package/bin/git.js
CHANGED
|
@@ -1,30 +1,22 @@
|
|
|
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-7QTKVCXH.js';
|
|
3
|
+
import { postCommitHook } from './chunk-ZPPKYVIH.js';
|
|
4
|
+
import { postMergeHook } from './chunk-IAPT5G4H.js';
|
|
5
|
+
import { preCommitHook } from './chunk-4PYFQEVV.js';
|
|
6
|
+
import './chunk-CTZZFGE5.js';
|
|
7
|
+
import { prePushHook } from './chunk-6QIXTOH3.js';
|
|
8
8
|
import './chunk-XVWRXJFS.js';
|
|
9
|
-
import { prepareHook } from './chunk-
|
|
9
|
+
import { prepareHook } from './chunk-NMEHIDW7.js';
|
|
10
10
|
import { run, runAsync } from './chunk-RPK5AKGK.js';
|
|
11
|
-
import {
|
|
11
|
+
import { getConfig, handleProcess, writeSuccess, exitWithSuccess, exitWithError, writeInfo, brandIcon, findWorkspaceRootSafe, writeFatal, getWorkspaceConfig, joinPaths, writeDebug, writeWarning, writeTrace, isVerbose, formatLogMessage, __require, STORM_DEFAULT_RELEASE_BANNER } from './chunk-BB4W6BYT.js';
|
|
12
12
|
import TOML from '@ltd/j-toml';
|
|
13
13
|
import { Command } from 'commander';
|
|
14
|
-
import '@inquirer/
|
|
15
|
-
import '@inquirer/editor';
|
|
16
|
-
import default4 from '@inquirer/confirm';
|
|
17
|
-
import default5 from '@inquirer/input';
|
|
18
|
-
import '@inquirer/number';
|
|
19
|
-
import '@inquirer/expand';
|
|
20
|
-
import '@inquirer/rawlist';
|
|
21
|
-
import '@inquirer/password';
|
|
22
|
-
import '@inquirer/search';
|
|
23
|
-
import default11 from '@inquirer/select';
|
|
14
|
+
import { select, confirm, input } from '@inquirer/prompts';
|
|
24
15
|
import shellescape from 'any-shell-escape';
|
|
25
16
|
import chalk2 from 'chalk';
|
|
26
17
|
import fs, { readFile as readFile$1, writeFile } from 'node:fs/promises';
|
|
27
18
|
import createBasePreset from 'conventional-changelog-conventionalcommits';
|
|
19
|
+
import defu3, { defu } from 'defu';
|
|
28
20
|
import { createProjectGraphAsync, readProjectsConfigurationFromProjectGraph, readCachedProjectGraph } from 'nx/src/project-graph/project-graph';
|
|
29
21
|
import { existsSync as existsSync$1 } from 'fs';
|
|
30
22
|
import { readFile } from 'fs/promises';
|
|
@@ -403,7 +395,7 @@ function getRuleFromScopeEnum(scopeEnum) {
|
|
|
403
395
|
async function createPreset(variant = "monorepo") {
|
|
404
396
|
const workspaceConfig = await getWorkspaceConfig();
|
|
405
397
|
if (variant === "minimal") {
|
|
406
|
-
return
|
|
398
|
+
return defu3(
|
|
407
399
|
await createBasePreset({ ...COMMIT_CONFIGS.minimal.changelogs.props }),
|
|
408
400
|
{
|
|
409
401
|
...COMMIT_CONFIGS.minimal,
|
|
@@ -417,7 +409,7 @@ async function createPreset(variant = "monorepo") {
|
|
|
417
409
|
);
|
|
418
410
|
}
|
|
419
411
|
const nxScopes = await getNxScopes({ config: workspaceConfig });
|
|
420
|
-
return
|
|
412
|
+
return defu3(
|
|
421
413
|
await createBasePreset({
|
|
422
414
|
...COMMIT_CONFIGS.monorepo.changelogs.props,
|
|
423
415
|
scope: nxScopes
|
|
@@ -485,17 +477,17 @@ function getParserRegexes(options = {}) {
|
|
|
485
477
|
|
|
486
478
|
// ../../node_modules/.pnpm/conventional-commits-parser@6.4.0/node_modules/conventional-commits-parser/dist/utils.js
|
|
487
479
|
var SCISSOR = "------------------------ >8 ------------------------";
|
|
488
|
-
function trimNewLines(
|
|
489
|
-
const matches =
|
|
480
|
+
function trimNewLines(input2) {
|
|
481
|
+
const matches = input2.match(/[^\r\n]/);
|
|
490
482
|
if (typeof matches?.index !== "number") {
|
|
491
483
|
return "";
|
|
492
484
|
}
|
|
493
485
|
const firstIndex = matches.index;
|
|
494
|
-
let lastIndex =
|
|
495
|
-
while (
|
|
486
|
+
let lastIndex = input2.length - 1;
|
|
487
|
+
while (input2[lastIndex] === "\r" || input2[lastIndex] === "\n") {
|
|
496
488
|
lastIndex--;
|
|
497
489
|
}
|
|
498
|
-
return
|
|
490
|
+
return input2.substring(firstIndex, lastIndex + 1);
|
|
499
491
|
}
|
|
500
492
|
function appendLine(src, line) {
|
|
501
493
|
return src ? `${src}
|
|
@@ -585,12 +577,12 @@ var CommitParser = class {
|
|
|
585
577
|
isLineAvailable() {
|
|
586
578
|
return this.lineIndex < this.lines.length;
|
|
587
579
|
}
|
|
588
|
-
parseReference(
|
|
580
|
+
parseReference(input2, action) {
|
|
589
581
|
const { regexes } = this;
|
|
590
|
-
if (regexes.url.test(
|
|
582
|
+
if (regexes.url.test(input2)) {
|
|
591
583
|
return null;
|
|
592
584
|
}
|
|
593
|
-
const matches = regexes.referenceParts.exec(
|
|
585
|
+
const matches = regexes.referenceParts.exec(input2);
|
|
594
586
|
if (!matches) {
|
|
595
587
|
return null;
|
|
596
588
|
}
|
|
@@ -612,16 +604,16 @@ var CommitParser = class {
|
|
|
612
604
|
issue
|
|
613
605
|
};
|
|
614
606
|
}
|
|
615
|
-
parseReferences(
|
|
607
|
+
parseReferences(input2) {
|
|
616
608
|
const { regexes } = this;
|
|
617
|
-
const regex =
|
|
609
|
+
const regex = input2.match(regexes.references) ? regexes.references : /()(.+)/gi;
|
|
618
610
|
const references = [];
|
|
619
611
|
let matches;
|
|
620
612
|
let action;
|
|
621
613
|
let sentence;
|
|
622
614
|
let reference;
|
|
623
615
|
while (true) {
|
|
624
|
-
matches = regex.exec(
|
|
616
|
+
matches = regex.exec(input2);
|
|
625
617
|
if (!matches) {
|
|
626
618
|
break;
|
|
627
619
|
}
|
|
@@ -772,21 +764,21 @@ var CommitParser = class {
|
|
|
772
764
|
});
|
|
773
765
|
}
|
|
774
766
|
}
|
|
775
|
-
parseMentions(
|
|
767
|
+
parseMentions(input2) {
|
|
776
768
|
const { commit, regexes } = this;
|
|
777
769
|
let matches;
|
|
778
770
|
for (; ; ) {
|
|
779
|
-
matches = regexes.mentions.exec(
|
|
771
|
+
matches = regexes.mentions.exec(input2);
|
|
780
772
|
if (!matches) {
|
|
781
773
|
break;
|
|
782
774
|
}
|
|
783
775
|
commit.mentions.push(matches[1]);
|
|
784
776
|
}
|
|
785
777
|
}
|
|
786
|
-
parseRevert(
|
|
778
|
+
parseRevert(input2) {
|
|
787
779
|
const { commit, options } = this;
|
|
788
780
|
const correspondence = options.revertCorrespondence || [];
|
|
789
|
-
const matches = options.revertPattern ?
|
|
781
|
+
const matches = options.revertPattern ? input2.match(options.revertPattern) : null;
|
|
790
782
|
if (matches) {
|
|
791
783
|
commit.revert = assignMatchedCorrespondence({}, matches, correspondence);
|
|
792
784
|
}
|
|
@@ -817,13 +809,13 @@ var CommitParser = class {
|
|
|
817
809
|
* @param input - Commit message string.
|
|
818
810
|
* @returns Commit object.
|
|
819
811
|
*/
|
|
820
|
-
parse(
|
|
821
|
-
if (!
|
|
812
|
+
parse(input2) {
|
|
813
|
+
if (!input2.trim()) {
|
|
822
814
|
throw new TypeError("Expected a raw commit");
|
|
823
815
|
}
|
|
824
816
|
const { commentChar } = this.options;
|
|
825
817
|
const commentFilter = getCommentFilter(commentChar);
|
|
826
|
-
const rawLines = trimNewLines(
|
|
818
|
+
const rawLines = trimNewLines(input2).split(/\r?\n/);
|
|
827
819
|
const lines = commentChar ? truncateToScissor(rawLines, commentChar).filter((line) => commentFilter(line) && gpgFilter(line)) : rawLines.filter((line) => gpgFilter(line));
|
|
828
820
|
const commit = createCommitObject();
|
|
829
821
|
this.lines = lines;
|
|
@@ -845,8 +837,8 @@ var CommitParser = class {
|
|
|
845
837
|
}
|
|
846
838
|
}
|
|
847
839
|
this.parseBreakingHeader();
|
|
848
|
-
this.parseMentions(
|
|
849
|
-
this.parseRevert(
|
|
840
|
+
this.parseMentions(input2);
|
|
841
|
+
this.parseRevert(input2);
|
|
850
842
|
this.cleanupCommit();
|
|
851
843
|
return commit;
|
|
852
844
|
}
|
|
@@ -1378,7 +1370,7 @@ async function askQuestion(index, question) {
|
|
|
1378
1370
|
)} - ${question.description}
|
|
1379
1371
|
`;
|
|
1380
1372
|
if (question.type === "select" && question.enum && Object.keys(question.enum).length > 1) {
|
|
1381
|
-
return
|
|
1373
|
+
return select({
|
|
1382
1374
|
message,
|
|
1383
1375
|
choices: Object.keys(question.enum).filter((key) => !question.enum?.[key]?.hidden).map((key) => ({
|
|
1384
1376
|
name: question.enum?.[key]?.title || key,
|
|
@@ -1388,7 +1380,7 @@ async function askQuestion(index, question) {
|
|
|
1388
1380
|
default: String(question.defaultValue || "")
|
|
1389
1381
|
});
|
|
1390
1382
|
} else if (question.type === "confirm") {
|
|
1391
|
-
return
|
|
1383
|
+
return confirm({
|
|
1392
1384
|
message,
|
|
1393
1385
|
default: Boolean(question.defaultValue)
|
|
1394
1386
|
});
|
|
@@ -1405,7 +1397,7 @@ async function askQuestion(index, question) {
|
|
|
1405
1397
|
return true;
|
|
1406
1398
|
};
|
|
1407
1399
|
}
|
|
1408
|
-
return
|
|
1400
|
+
return input({
|
|
1409
1401
|
message,
|
|
1410
1402
|
required: !!(question.minLength !== void 0 && question.minLength > 0),
|
|
1411
1403
|
default: String(question.defaultValue || ""),
|
|
@@ -2408,9 +2400,9 @@ var LOWER_CASE_WHEN_NOT_FIRST = [
|
|
|
2408
2400
|
"at",
|
|
2409
2401
|
"by"
|
|
2410
2402
|
];
|
|
2411
|
-
function titleCase(
|
|
2412
|
-
if (!
|
|
2413
|
-
return
|
|
2403
|
+
function titleCase(input2) {
|
|
2404
|
+
if (!input2) {
|
|
2405
|
+
return input2;
|
|
2414
2406
|
}
|
|
2415
2407
|
const formatSegment = (segment) => segment.toLowerCase().split(/[\s\-_]+/).filter(Boolean).map((word, index) => {
|
|
2416
2408
|
if (LOWER_CASE_WHEN_NOT_FIRST.includes(word.toLowerCase()) && index > 0) {
|
|
@@ -2421,7 +2413,7 @@ function titleCase(input) {
|
|
|
2421
2413
|
}
|
|
2422
2414
|
return `${word ? word.charAt(0).toUpperCase() + word.toLowerCase().slice(1) : word}`;
|
|
2423
2415
|
}).join(" ");
|
|
2424
|
-
return
|
|
2416
|
+
return input2.split(/\s+-\s+/).map((part) => formatSegment(part)).join(" - ");
|
|
2425
2417
|
}
|
|
2426
2418
|
|
|
2427
2419
|
// src/utilities/changelog-utils.ts
|
|
@@ -3507,7 +3499,7 @@ var DEFAULT_RUST_RELEASE_GROUP_CONFIG = {
|
|
|
3507
3499
|
var DEFAULT_RELEASE_CONFIG = {
|
|
3508
3500
|
conventionalCommits: DEFAULT_CONVENTIONAL_COMMITS_CONFIG2,
|
|
3509
3501
|
groups: {
|
|
3510
|
-
packages:
|
|
3502
|
+
packages: defu3(
|
|
3511
3503
|
{
|
|
3512
3504
|
projects: ["packages/*"]
|
|
3513
3505
|
},
|
|
@@ -3515,7 +3507,7 @@ var DEFAULT_RELEASE_CONFIG = {
|
|
|
3515
3507
|
DEFAULT_INDEPENDENT_RELEASE_GROUP_CONFIG,
|
|
3516
3508
|
DEFAULT_RELEASE_GROUP_CONFIG
|
|
3517
3509
|
),
|
|
3518
|
-
crates:
|
|
3510
|
+
crates: defu3(
|
|
3519
3511
|
{
|
|
3520
3512
|
projects: ["crates/*"]
|
|
3521
3513
|
},
|
|
@@ -3538,7 +3530,7 @@ var DEFAULT_RELEASE_CONFIG = {
|
|
|
3538
3530
|
}
|
|
3539
3531
|
};
|
|
3540
3532
|
function mergeReleaseGroupConfig(config5, defaultConfig, workspaceConfig) {
|
|
3541
|
-
return
|
|
3533
|
+
return defu3(
|
|
3542
3534
|
{
|
|
3543
3535
|
...omit(defaultConfig, ["changelog", "version"]),
|
|
3544
3536
|
...config5
|
|
@@ -3595,7 +3587,7 @@ function getReleaseGroupConfig(projectGraph, releaseConfig, workspaceConfig) {
|
|
|
3595
3587
|
)
|
|
3596
3588
|
))
|
|
3597
3589
|
)) {
|
|
3598
|
-
defaultConfig =
|
|
3590
|
+
defaultConfig = defu3(
|
|
3599
3591
|
group.projectsRelationship === "fixed" ? DEFAULT_FIXED_RELEASE_GROUP_CONFIG : DEFAULT_INDEPENDENT_RELEASE_GROUP_CONFIG,
|
|
3600
3592
|
DEFAULT_JS_RELEASE_GROUP_CONFIG,
|
|
3601
3593
|
DEFAULT_RELEASE_GROUP_CONFIG
|
|
@@ -3612,7 +3604,7 @@ function getReleaseGroupConfig(projectGraph, releaseConfig, workspaceConfig) {
|
|
|
3612
3604
|
)
|
|
3613
3605
|
))
|
|
3614
3606
|
)) {
|
|
3615
|
-
defaultConfig =
|
|
3607
|
+
defaultConfig = defu3(
|
|
3616
3608
|
group.projectsRelationship === "fixed" ? DEFAULT_FIXED_RELEASE_GROUP_CONFIG : DEFAULT_INDEPENDENT_RELEASE_GROUP_CONFIG,
|
|
3617
3609
|
DEFAULT_RUST_RELEASE_GROUP_CONFIG,
|
|
3618
3610
|
DEFAULT_RELEASE_GROUP_CONFIG
|
|
@@ -3647,7 +3639,7 @@ function getReleaseConfig(projectGraph, releaseConfig, workspaceConfig, ignoreNx
|
|
|
3647
3639
|
if (!ignoreNxJsonConfig && existsSync$1(joinPaths(workspaceConfig.workspaceRoot, "nx.json"))) {
|
|
3648
3640
|
nxJson = readNxJson();
|
|
3649
3641
|
}
|
|
3650
|
-
const baseConfig =
|
|
3642
|
+
const baseConfig = defu3(
|
|
3651
3643
|
{
|
|
3652
3644
|
changelog: {
|
|
3653
3645
|
renderOptions: {
|
|
@@ -3664,7 +3656,7 @@ function getReleaseConfig(projectGraph, releaseConfig, workspaceConfig, ignoreNx
|
|
|
3664
3656
|
if (releaseConfig?.groups && Object.keys(releaseConfig.groups).length > 0) {
|
|
3665
3657
|
groups = releaseConfig.groups;
|
|
3666
3658
|
if (nxJson.release?.groups && Object.keys(nxJson.release.groups).length > 0) {
|
|
3667
|
-
groups =
|
|
3659
|
+
groups = defu3(
|
|
3668
3660
|
groups,
|
|
3669
3661
|
nxJson.release.groups
|
|
3670
3662
|
);
|