@storm-software/git-tools 2.131.126 → 2.131.128

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 (66) hide show
  1. package/README.md +1 -1
  2. package/bin/{chunk-GAHICIOD.js → chunk-A5X7CY3W.js} +3 -3
  3. package/bin/{chunk-GAHICIOD.js.map → chunk-A5X7CY3W.js.map} +1 -1
  4. package/bin/{chunk-ZBZINLOA.js → chunk-AOZSGQGA.js} +3 -3
  5. package/bin/{chunk-ZBZINLOA.js.map → chunk-AOZSGQGA.js.map} +1 -1
  6. package/bin/chunk-FOMBLMLH.js +2073 -0
  7. package/bin/chunk-FOMBLMLH.js.map +1 -0
  8. package/bin/{chunk-B5CZCP2Y.cjs → chunk-GT7HITVF.cjs} +4 -4
  9. package/bin/{chunk-B5CZCP2Y.cjs.map → chunk-GT7HITVF.cjs.map} +1 -1
  10. package/bin/{chunk-ZL2JPPJF.cjs → chunk-IHDSESSE.cjs} +4 -4
  11. package/bin/{chunk-ZL2JPPJF.cjs.map → chunk-IHDSESSE.cjs.map} +1 -1
  12. package/bin/{chunk-SASCLX6I.js → chunk-IIH7F7OZ.js} +3 -3
  13. package/bin/{chunk-SASCLX6I.js.map → chunk-IIH7F7OZ.js.map} +1 -1
  14. package/bin/{chunk-KFRB3UCF.js → chunk-JBHMFR7F.js} +3 -3
  15. package/bin/{chunk-KFRB3UCF.js.map → chunk-JBHMFR7F.js.map} +1 -1
  16. package/bin/{chunk-KJMWPKRH.cjs → chunk-JYYYVLIU.cjs} +4 -4
  17. package/bin/{chunk-KJMWPKRH.cjs.map → chunk-JYYYVLIU.cjs.map} +1 -1
  18. package/bin/{chunk-MUNEGKNC.cjs → chunk-ML5MZIGJ.cjs} +5 -5
  19. package/bin/{chunk-MUNEGKNC.cjs.map → chunk-ML5MZIGJ.cjs.map} +1 -1
  20. package/bin/{chunk-NNIW4L2Q.js → chunk-NG23E43K.js} +3 -3
  21. package/bin/{chunk-NNIW4L2Q.js.map → chunk-NG23E43K.js.map} +1 -1
  22. package/bin/{chunk-2NTFR3EF.cjs → chunk-QBI7KQ6A.cjs} +6 -6
  23. package/bin/{chunk-2NTFR3EF.cjs.map → chunk-QBI7KQ6A.cjs.map} +1 -1
  24. package/bin/{chunk-VIFL2F7H.js → chunk-SHH572XU.js} +3 -3
  25. package/bin/{chunk-VIFL2F7H.js.map → chunk-SHH572XU.js.map} +1 -1
  26. package/bin/{chunk-NZ4HDNJ7.cjs → chunk-SZFP3TKI.cjs} +4 -4
  27. package/bin/{chunk-NZ4HDNJ7.cjs.map → chunk-SZFP3TKI.cjs.map} +1 -1
  28. package/bin/chunk-TOLGVHZM.cjs +2116 -0
  29. package/bin/chunk-TOLGVHZM.cjs.map +1 -0
  30. package/bin/{chunk-MSQDEBW3.js → chunk-WUN4N3D7.js} +3 -3
  31. package/bin/{chunk-MSQDEBW3.js.map → chunk-WUN4N3D7.js.map} +1 -1
  32. package/bin/{chunk-IXUKWNVT.cjs → chunk-ZJN2D7NE.cjs} +4 -4
  33. package/bin/{chunk-IXUKWNVT.cjs.map → chunk-ZJN2D7NE.cjs.map} +1 -1
  34. package/bin/git.cjs +185 -195
  35. package/bin/git.cjs.map +1 -1
  36. package/bin/git.js +46 -54
  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/dist/chunk-52Z6PKZI.js +2412 -0
  55. package/dist/chunk-U5IGP2SZ.cjs +2454 -0
  56. package/dist/index.cjs +18 -18
  57. package/dist/index.js +1 -1
  58. package/dist/release/config.cjs +18 -18
  59. package/dist/release/config.js +1 -1
  60. package/package.json +10 -14
  61. package/bin/chunk-DGRFGD2R.cjs +0 -3578
  62. package/bin/chunk-DGRFGD2R.cjs.map +0 -1
  63. package/bin/chunk-ZW42VDY5.js +0 -3554
  64. package/bin/chunk-ZW42VDY5.js.map +0 -1
  65. package/dist/chunk-IVBFLZSL.cjs +0 -3863
  66. package/dist/chunk-J5FHPMMG.js +0 -3840
package/bin/git.js CHANGED
@@ -1,30 +1,22 @@
1
1
  #!/usr/bin/env node
2
- import { postCheckoutHook } from './chunk-MSQDEBW3.js';
3
- import { postCommitHook } from './chunk-KFRB3UCF.js';
4
- import { postMergeHook } from './chunk-ZBZINLOA.js';
5
- import { preCommitHook } from './chunk-NNIW4L2Q.js';
6
- import './chunk-GAHICIOD.js';
7
- import { prePushHook } from './chunk-VIFL2F7H.js';
2
+ import { postCheckoutHook } from './chunk-WUN4N3D7.js';
3
+ import { postCommitHook } from './chunk-JBHMFR7F.js';
4
+ import { postMergeHook } from './chunk-AOZSGQGA.js';
5
+ import { preCommitHook } from './chunk-NG23E43K.js';
6
+ import './chunk-A5X7CY3W.js';
7
+ import { prePushHook } from './chunk-SHH572XU.js';
8
8
  import './chunk-XVWRXJFS.js';
9
- import { prepareHook } from './chunk-SASCLX6I.js';
9
+ import { prepareHook } from './chunk-IIH7F7OZ.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-ZW42VDY5.js';
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-FOMBLMLH.js';
12
12
  import TOML from '@ltd/j-toml';
13
13
  import { Command } from 'commander';
14
- import '@inquirer/checkbox';
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 defu(
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 defu(
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(input) {
489
- const matches = input.match(/[^\r\n]/);
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 = input.length - 1;
495
- while (input[lastIndex] === "\r" || input[lastIndex] === "\n") {
486
+ let lastIndex = input2.length - 1;
487
+ while (input2[lastIndex] === "\r" || input2[lastIndex] === "\n") {
496
488
  lastIndex--;
497
489
  }
498
- return input.substring(firstIndex, lastIndex + 1);
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(input, action) {
580
+ parseReference(input2, action) {
589
581
  const { regexes } = this;
590
- if (regexes.url.test(input)) {
582
+ if (regexes.url.test(input2)) {
591
583
  return null;
592
584
  }
593
- const matches = regexes.referenceParts.exec(input);
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(input) {
607
+ parseReferences(input2) {
616
608
  const { regexes } = this;
617
- const regex = input.match(regexes.references) ? regexes.references : /()(.+)/gi;
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(input);
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(input) {
767
+ parseMentions(input2) {
776
768
  const { commit, regexes } = this;
777
769
  let matches;
778
770
  for (; ; ) {
779
- matches = regexes.mentions.exec(input);
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(input) {
778
+ parseRevert(input2) {
787
779
  const { commit, options } = this;
788
780
  const correspondence = options.revertCorrespondence || [];
789
- const matches = options.revertPattern ? input.match(options.revertPattern) : null;
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(input) {
821
- if (!input.trim()) {
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(input).split(/\r?\n/);
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(input);
849
- this.parseRevert(input);
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 default11({
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 default4({
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 default5({
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(input) {
2412
- if (!input) {
2413
- return input;
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 input.split(/\s+-\s+/).map((part) => formatSegment(part)).join(" - ");
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: defu(
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: defu(
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 defu(
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 = defu(
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 = defu(
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 = defu(
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 = defu(
3659
+ groups = defu3(
3668
3660
  groups,
3669
3661
  nxJson.release.groups
3670
3662
  );