@storm-software/git-tools 2.121.2 → 2.121.4

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 CHANGED
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
21
21
 
22
22
  <h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
23
23
 
24
- [![Version](https://img.shields.io/badge/version-2.121.0-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
24
+ [![Version](https://img.shields.io/badge/version-2.121.2-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
25
25
 
26
26
  <!-- prettier-ignore-start -->
27
27
  <!-- markdownlint-disable -->
@@ -2729,7 +2729,7 @@ var correctPaths = function(path) {
2729
2729
  return ".";
2730
2730
  }
2731
2731
  path = normalizeWindowsPath(path);
2732
- const isUNCPath = path.match(_UNC_REGEX);
2732
+ const isUNCPath = path?.match(_UNC_REGEX);
2733
2733
  const isPathAbsolute = isAbsolute(path);
2734
2734
  const trailingSeparator = path[path.length - 1] === "/";
2735
2735
  path = normalizeString(path, !isPathAbsolute);
@@ -2719,7 +2719,7 @@ var correctPaths = function(path) {
2719
2719
  return ".";
2720
2720
  }
2721
2721
  path = normalizeWindowsPath(path);
2722
- const isUNCPath = path.match(_UNC_REGEX);
2722
+ const isUNCPath = path?.match(_UNC_REGEX);
2723
2723
  const isPathAbsolute = isAbsolute(path);
2724
2724
  const trailingSeparator = path[path.length - 1] === "/";
2725
2725
  path = normalizeString(path, !isPathAbsolute);
package/bin/git.cjs CHANGED
@@ -2,7 +2,7 @@
2
2
  'use strict';
3
3
 
4
4
  var chunkCIJVSMK2_cjs = require('./chunk-CIJVSMK2.cjs');
5
- var chunk7V324BCR_cjs = require('./chunk-7V324BCR.cjs');
5
+ var chunkN5U2S3QK_cjs = require('./chunk-N5U2S3QK.cjs');
6
6
  var TOML = require('@ltd/j-toml');
7
7
  var commander = require('commander');
8
8
  var prompts = require('@inquirer/prompts');
@@ -447,16 +447,16 @@ var config2 = {
447
447
  var monorepo_default = config2;
448
448
 
449
449
  // src/commitlint/helpers.ts
450
- var jiti = jiti$1.createJiti(chunk7V324BCR_cjs.importMetaUrl, { importMeta: ({ url: (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('git.cjs', document.baseURI).href)) }) });
450
+ var jiti = jiti$1.createJiti(chunkN5U2S3QK_cjs.importMetaUrl, { importMeta: ({ url: (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('git.cjs', document.baseURI).href)) }) });
451
451
  async function resolveCommitlintConfig(workspaceConfig, configPath) {
452
452
  if (configPath && configPath !== "@storm-software/git-tools/commitlint/minimal" && configPath !== "@storm-software/git-tools/commitlint/monorepo") {
453
- chunk7V324BCR_cjs.writeInfo(
453
+ chunkN5U2S3QK_cjs.writeInfo(
454
454
  `Using custom commitlint config file: ${configPath}`,
455
455
  workspaceConfig
456
456
  );
457
457
  } else {
458
458
  configPath = workspaceConfig?.variant === "minimal" ? "@storm-software/git-tools/commitlint/minimal" : "@storm-software/git-tools/commitlint/monorepo";
459
- chunk7V324BCR_cjs.writeInfo(
459
+ chunkN5U2S3QK_cjs.writeInfo(
460
460
  `Using standard commitlint config file: ${configPath}`,
461
461
  workspaceConfig
462
462
  );
@@ -893,7 +893,11 @@ ${footer}` : message;
893
893
  return message || "";
894
894
  };
895
895
  async function lint(message, commitlintConfig) {
896
- const parser = new CommitParser(commitlintConfig.parserOpts);
896
+ const workspaceConfig = await chunkN5U2S3QK_cjs.getWorkspaceConfig();
897
+ const parserOpts = await createParserOpts(workspaceConfig.variant);
898
+ const parser = new CommitParser(
899
+ chunkN5U2S3QK_cjs.defu(commitlintConfig.parserOpts, parserOpts)
900
+ );
897
901
  const parsed = parser.parse(message);
898
902
  if (parsed.header === null && parsed.body === null && parsed.footer === null) {
899
903
  return {
@@ -1047,7 +1051,7 @@ function getRuleFromScopeEnum(scopeEnum) {
1047
1051
  // src/commitlint/run.ts
1048
1052
  var COMMIT_EDITMSG_PATH = ".git/COMMIT_EDITMSG";
1049
1053
  async function runCommitLint(workspaceConfig, options) {
1050
- chunk7V324BCR_cjs.writeInfo(
1054
+ chunkN5U2S3QK_cjs.writeInfo(
1051
1055
  "\u{1F4DD} Validating git commit message aligns with the Storm Software specification",
1052
1056
  workspaceConfig
1053
1057
  );
@@ -1055,7 +1059,7 @@ async function runCommitLint(workspaceConfig, options) {
1055
1059
  if (options.message && options.message !== COMMIT_EDITMSG_PATH) {
1056
1060
  commitMessage = options.message;
1057
1061
  } else {
1058
- const commitFile = chunk7V324BCR_cjs.joinPaths(
1062
+ const commitFile = chunkN5U2S3QK_cjs.joinPaths(
1059
1063
  workspaceConfig.workspaceRoot,
1060
1064
  options.file || options.message || COMMIT_EDITMSG_PATH
1061
1065
  );
@@ -1072,17 +1076,17 @@ async function runCommitLint(workspaceConfig, options) {
1072
1076
  if (upstreamRemote) {
1073
1077
  const upstreamRemoteIdentifier = upstreamRemote.split(" ")[0]?.trim();
1074
1078
  if (!upstreamRemoteIdentifier) {
1075
- chunk7V324BCR_cjs.writeWarning(
1079
+ chunkN5U2S3QK_cjs.writeWarning(
1076
1080
  `No upstream remote found for ${workspaceConfig.name}.git. Skipping comparison.`,
1077
1081
  workspaceConfig
1078
1082
  );
1079
1083
  return;
1080
1084
  }
1081
- chunk7V324BCR_cjs.writeDebug(`Comparing against remote ${upstreamRemoteIdentifier}`);
1085
+ chunkN5U2S3QK_cjs.writeDebug(`Comparing against remote ${upstreamRemoteIdentifier}`);
1082
1086
  const currentBranch = childProcess__default.default.execSync("git branch --show-current").toString().trim();
1083
1087
  gitLogCmd = gitLogCmd + ` ${currentBranch} ^${upstreamRemoteIdentifier}/main`;
1084
1088
  } else {
1085
- chunk7V324BCR_cjs.writeWarning(
1089
+ chunkN5U2S3QK_cjs.writeWarning(
1086
1090
  `No upstream remote found for ${workspaceConfig.name}.git. Skipping comparison against upstream main.`,
1087
1091
  workspaceConfig
1088
1092
  );
@@ -1090,7 +1094,7 @@ async function runCommitLint(workspaceConfig, options) {
1090
1094
  }
1091
1095
  commitMessage = childProcess__default.default.execSync(gitLogCmd).toString().trim();
1092
1096
  if (!commitMessage) {
1093
- chunk7V324BCR_cjs.writeWarning(
1097
+ chunkN5U2S3QK_cjs.writeWarning(
1094
1098
  "No commits found. Skipping commit message validation.",
1095
1099
  workspaceConfig
1096
1100
  );
@@ -1104,7 +1108,7 @@ async function runCommitLint(workspaceConfig, options) {
1104
1108
  let commitlintRegex;
1105
1109
  const allowedTypes = commitlintConfig.rules["type-enum"] ?? COMMIT_TYPES;
1106
1110
  let allowedScopes = [];
1107
- if (commitlintConfig.rules["scope-empty"] && commitlintConfig.rules["scope-empty"][0] !== 0 /* Disabled */) {
1111
+ if (workspaceConfig.variant !== "minimal" && commitlintConfig.rules["scope-empty"] && commitlintConfig.rules["scope-empty"][0] !== 0 /* Disabled */) {
1108
1112
  allowedScopes = await getNxScopes({
1109
1113
  config: workspaceConfig
1110
1114
  });
@@ -1122,7 +1126,7 @@ async function runCommitLint(workspaceConfig, options) {
1122
1126
  parserOpts: createParserOpts(workspaceConfig.variant)
1123
1127
  });
1124
1128
  if (!commitlintRegex.test(commitMessage) || report.errors.length || report.warnings.length) {
1125
- chunk7V324BCR_cjs.writeSuccess(
1129
+ chunkN5U2S3QK_cjs.writeSuccess(
1126
1130
  `Commit was processing completed successfully!`,
1127
1131
  workspaceConfig
1128
1132
  );
@@ -1194,16 +1198,16 @@ function resolveMonorepoCommitOptions(workspaceConfig, config5 = monorepo_defaul
1194
1198
  }
1195
1199
  };
1196
1200
  }
1197
- var jiti2 = jiti$1.createJiti(chunk7V324BCR_cjs.importMetaUrl, { importMeta: ({ url: (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('git.cjs', document.baseURI).href)) }) });
1201
+ var jiti2 = jiti$1.createJiti(chunkN5U2S3QK_cjs.importMetaUrl, { importMeta: ({ url: (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('git.cjs', document.baseURI).href)) }) });
1198
1202
  async function resolveCommitConfig(workspaceConfig, configPath) {
1199
1203
  if (configPath && configPath !== "@storm-software/git-tools/commit/minimal" && configPath !== "@storm-software/git-tools/commit/monorepo") {
1200
- chunk7V324BCR_cjs.writeInfo(
1204
+ chunkN5U2S3QK_cjs.writeInfo(
1201
1205
  `Using custom commit config file: ${configPath}`,
1202
1206
  workspaceConfig
1203
1207
  );
1204
1208
  } else {
1205
1209
  configPath = workspaceConfig?.variant === "minimal" ? "@storm-software/git-tools/commit/minimal" : "@storm-software/git-tools/commit/monorepo";
1206
- chunk7V324BCR_cjs.writeInfo(
1210
+ chunkN5U2S3QK_cjs.writeInfo(
1207
1211
  `Using standard commit config file: ${configPath}`,
1208
1212
  workspaceConfig
1209
1213
  );
@@ -1303,7 +1307,7 @@ async function createState(workspaceConfig, configPath) {
1303
1307
  const project = projectConfigurations.projects[scope];
1304
1308
  if (project) {
1305
1309
  let description = `${project.name} - ${project.root}`;
1306
- const packageJsonPath = chunk7V324BCR_cjs.joinPaths(project.root, "package.json");
1310
+ const packageJsonPath = chunkN5U2S3QK_cjs.joinPaths(project.root, "package.json");
1307
1311
  if (fs$1.existsSync(packageJsonPath)) {
1308
1312
  const packageJsonFile = await fs.readFile(packageJsonPath, "utf8");
1309
1313
  const packageJson = JSON.parse(packageJsonFile);
@@ -1380,10 +1384,10 @@ ${closedIssueEmoji}${config5.prompt.settings.closedIssueMessage}${issues}`;
1380
1384
 
1381
1385
  // src/commit/run.ts
1382
1386
  async function runCommit(commitizenFile, dryRun = false) {
1383
- const workspaceConfig = await chunk7V324BCR_cjs.getWorkspaceConfig();
1387
+ const workspaceConfig = await chunkN5U2S3QK_cjs.getWorkspaceConfig();
1384
1388
  const state = await createState(workspaceConfig, commitizenFile);
1385
1389
  if (dryRun) {
1386
- chunk7V324BCR_cjs.writeInfo("Running in dry mode.", workspaceConfig);
1390
+ chunkN5U2S3QK_cjs.writeInfo("Running in dry mode.", workspaceConfig);
1387
1391
  }
1388
1392
  console.log(chalkTemplate__default.default`
1389
1393
  {bold.#999999 ----------------------------------------}
@@ -1393,7 +1397,7 @@ async function runCommit(commitizenFile, dryRun = false) {
1393
1397
  `);
1394
1398
  state.answers = await askQuestions(state);
1395
1399
  const message = formatCommitMessage(state, workspaceConfig);
1396
- const commitMsgFile = chunk7V324BCR_cjs.joinPaths(getGitDir(), "COMMIT_EDITMSG");
1400
+ const commitMsgFile = chunkN5U2S3QK_cjs.joinPaths(getGitDir(), "COMMIT_EDITMSG");
1397
1401
  console.log(chalkTemplate__default.default`
1398
1402
  {bold.#999999 ----------------------------------------}
1399
1403
 
@@ -1406,11 +1410,11 @@ async function runCommit(commitizenFile, dryRun = false) {
1406
1410
  commandItems.push(...["--file", commitMsgFile]);
1407
1411
  const command = shellescape__default.default(commandItems);
1408
1412
  if (dryRun) {
1409
- chunk7V324BCR_cjs.writeDebug(
1413
+ chunkN5U2S3QK_cjs.writeDebug(
1410
1414
  `Skipping execution [dry-run]: ${command.replace(commitMsgFile, ".git/COMMIT_EDITMSG")}`,
1411
1415
  workspaceConfig
1412
1416
  );
1413
- chunk7V324BCR_cjs.writeDebug(`Message [dry-run]: ${message}`, workspaceConfig);
1417
+ chunkN5U2S3QK_cjs.writeDebug(`Message [dry-run]: ${message}`, workspaceConfig);
1414
1418
  } else {
1415
1419
  await fs__default.default.writeFile(commitMsgFile, message);
1416
1420
  chunkCIJVSMK2_cjs.run(workspaceConfig, command);
@@ -2442,7 +2446,7 @@ async function generateChangelogContent(releaseVersion, filepath, newContent, cu
2442
2446
  const header = await prettier.format(
2443
2447
  `![${(typeof workspaceConfig?.release.banner === "string" ? workspaceConfig.organization ? titleCase(
2444
2448
  typeof workspaceConfig.organization === "string" ? workspaceConfig.organization : workspaceConfig.organization.name
2445
- ) : void 0 : workspaceConfig?.release.banner.alt) || "Branded release banner image"}](${bannerUrl || chunk7V324BCR_cjs.STORM_DEFAULT_RELEASE_BANNER})
2449
+ ) : void 0 : workspaceConfig?.release.banner.alt) || "Branded release banner image"}](${bannerUrl || chunkN5U2S3QK_cjs.STORM_DEFAULT_RELEASE_BANNER})
2446
2450
 
2447
2451
  # Changelog ${project || workspaceConfig?.name ? "for" : ""}${workspaceConfig?.name ? ` ${titleCase(workspaceConfig.name)}` : ""}${project ? `${workspaceConfig?.name ? " -" : ""} ${titleCase(project)}` : ""}
2448
2452
 
@@ -2491,7 +2495,7 @@ function parseChangelogMarkdown(contents) {
2491
2495
  "^#+\\s*\\[?(\\d+\\.\\d+\\.\\d+(?:-[a-zA-Z0-9\\.]+)?)\\]?",
2492
2496
  "gm"
2493
2497
  );
2494
- const headings = [...contents.matchAll(CHANGELOG_RELEASE_HEAD_RE)];
2498
+ const headings = contents ? [...contents.matchAll(CHANGELOG_RELEASE_HEAD_RE)] : [];
2495
2499
  const releases = [];
2496
2500
  for (let i = 0; i < headings.length; i++) {
2497
2501
  const heading = headings[i];
@@ -2681,7 +2685,7 @@ var StormChangelogRenderer = class extends DefaultChangelogRenderer__default.def
2681
2685
  };
2682
2686
  }
2683
2687
  async render() {
2684
- this.workspaceConfig = await chunk7V324BCR_cjs.getWorkspaceConfig();
2688
+ this.workspaceConfig = await chunkN5U2S3QK_cjs.getWorkspaceConfig();
2685
2689
  return await super.render();
2686
2690
  }
2687
2691
  preprocessChanges() {
@@ -2799,8 +2803,8 @@ var StormChangelogRenderer = class extends DefaultChangelogRenderer__default.def
2799
2803
  return;
2800
2804
  }
2801
2805
  for (const email of meta.email) {
2802
- if (email.endsWith("@users.noreply.github.com")) {
2803
- const match = email.match(
2806
+ if (email?.endsWith("@users.noreply.github.com")) {
2807
+ const match = email?.match(
2804
2808
  /^(\d+\+)?([^@]+)@users\.noreply\.github\.com$/
2805
2809
  );
2806
2810
  if (match && match[2]) {
@@ -2874,7 +2878,7 @@ function getGitHubRepoData(remoteName = "origin", createReleaseConfig) {
2874
2878
  const escapedHostname = hostname.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
2875
2879
  const regexString = `${escapedHostname}[/:]([\\w.-]+/[\\w.-]+)(\\.git)?`;
2876
2880
  const regex = new RegExp(regexString);
2877
- const match = remoteUrl.match(regex);
2881
+ const match = remoteUrl?.match(regex);
2878
2882
  if (match && match[1]) {
2879
2883
  return {
2880
2884
  hostname,
@@ -2992,7 +2996,7 @@ async function createOrUpdateGithubReleaseInternal(githubRequestConfig, release,
2992
2996
  if (!shouldContinueInGitHub) {
2993
2997
  return;
2994
2998
  }
2995
- const open = chunk7V324BCR_cjs.__require("open");
2999
+ const open = chunkN5U2S3QK_cjs.__require("open");
2996
3000
  await open(result.url).then(() => {
2997
3001
  console.info(
2998
3002
  `
@@ -3218,7 +3222,7 @@ async function isUserAnOrganizationMember(userId, config5, remoteName = "origin"
3218
3222
  // src/release/changelog.ts
3219
3223
  function createAPI(overrideReleaseConfig) {
3220
3224
  return async function releaseChangelog(args) {
3221
- const workspaceConfig = await chunk7V324BCR_cjs.getWorkspaceConfig();
3225
+ const workspaceConfig = await chunkN5U2S3QK_cjs.getWorkspaceConfig();
3222
3226
  const projectGraph$1 = await projectGraph.createProjectGraphAsync({ exitOnError: true });
3223
3227
  const nxJson$1 = nxJson.readNxJson();
3224
3228
  const userProvidedReleaseConfig = deepMergeJson.deepMergeJson(
@@ -3879,7 +3883,7 @@ async function applyChangesAndExit(args, nxReleaseConfig, tree, toSHA, postGitTa
3879
3883
  });
3880
3884
  latestCommit = await git.getCommitHash("HEAD");
3881
3885
  } else if ((args.stageChanges ?? nxReleaseConfig.changelog?.git.stageChanges) && changes.length) {
3882
- chunk7V324BCR_cjs.writeDebug(`Staging changed files with git`);
3886
+ chunkN5U2S3QK_cjs.writeDebug(`Staging changed files with git`);
3883
3887
  await git.gitAdd({
3884
3888
  changedFiles,
3885
3889
  deletedFiles,
@@ -3888,7 +3892,7 @@ async function applyChangesAndExit(args, nxReleaseConfig, tree, toSHA, postGitTa
3888
3892
  });
3889
3893
  }
3890
3894
  if (args.gitTag ?? nxReleaseConfig.changelog?.git.tag) {
3891
- chunk7V324BCR_cjs.writeDebug(`Tagging commit with git`);
3895
+ chunkN5U2S3QK_cjs.writeDebug(`Tagging commit with git`);
3892
3896
  for (const tag of gitTagValues) {
3893
3897
  await gitTag({
3894
3898
  tag,
@@ -3900,7 +3904,7 @@ async function applyChangesAndExit(args, nxReleaseConfig, tree, toSHA, postGitTa
3900
3904
  }
3901
3905
  }
3902
3906
  if (args.gitPush ?? nxReleaseConfig.changelog?.git.push) {
3903
- chunk7V324BCR_cjs.writeDebug(`Pushing to git remote "${args.gitRemote}"`);
3907
+ chunkN5U2S3QK_cjs.writeDebug(`Pushing to git remote "${args.gitRemote}"`);
3904
3908
  await git.gitPush({
3905
3909
  gitRemote: args.gitRemote,
3906
3910
  dryRun: args.dryRun,
@@ -3919,7 +3923,7 @@ async function generateChangelogForWorkspace({
3919
3923
  workspaceChangelogVersion,
3920
3924
  changes
3921
3925
  }) {
3922
- const workspaceConfig = await chunk7V324BCR_cjs.getWorkspaceConfig();
3926
+ const workspaceConfig = await chunkN5U2S3QK_cjs.getWorkspaceConfig();
3923
3927
  if (!workspaceConfig) {
3924
3928
  throw new Error(
3925
3929
  `Unable to determine the Storm workspace config. Please ensure that your storm-workspace.json file is present and valid.`
@@ -4033,7 +4037,7 @@ async function generateChangelogForProjects({
4033
4037
  nxReleaseConfig,
4034
4038
  projectToAdditionalDependencyBumps
4035
4039
  }) {
4036
- const workspaceConfig = await chunk7V324BCR_cjs.getWorkspaceConfig();
4040
+ const workspaceConfig = await chunkN5U2S3QK_cjs.getWorkspaceConfig();
4037
4041
  if (!workspaceConfig) {
4038
4042
  throw new Error(
4039
4043
  `Unable to determine the Storm workspace config. Please ensure that your storm-workspace.json file is present and valid.`
@@ -4338,7 +4342,7 @@ var runRelease = async (config5, options) => {
4338
4342
  throw new Error("The `GITHUB_ACTOR` environment variable is not set.");
4339
4343
  }
4340
4344
  if (!await isUserAnOrganizationMember(process.env.GITHUB_ACTOR, config5)) {
4341
- chunk7V324BCR_cjs.writeFatal(
4345
+ chunkN5U2S3QK_cjs.writeFatal(
4342
4346
  "You must be a member of the Storm Software organization to run the release process.",
4343
4347
  config5
4344
4348
  );
@@ -4355,12 +4359,12 @@ var runRelease = async (config5, options) => {
4355
4359
  process.env.NODE_AUTH_TOKEN = process.env.NPM_TOKEN;
4356
4360
  process.env.NPM_AUTH_TOKEN = process.env.NPM_TOKEN;
4357
4361
  process.env.NPM_CONFIG_PROVENANCE = "true";
4358
- chunk7V324BCR_cjs.writeDebug("Creating workspace Project Graph data...", config5);
4362
+ chunkN5U2S3QK_cjs.writeDebug("Creating workspace Project Graph data...", config5);
4359
4363
  const nxJson = nxJson_js.readNxJson();
4360
- chunk7V324BCR_cjs.writeDebug("Reading in the workspaces release configuration", config5);
4364
+ chunkN5U2S3QK_cjs.writeDebug("Reading in the workspaces release configuration", config5);
4361
4365
  const to = options.head || process.env.NX_HEAD;
4362
4366
  const from = options.base || process.env.NX_BASE;
4363
- chunk7V324BCR_cjs.writeDebug(
4367
+ chunkN5U2S3QK_cjs.writeDebug(
4364
4368
  `Using the following Git SHAs to determine the release content:
4365
4369
  - From: ${from}
4366
4370
  - To: ${to}
@@ -4371,28 +4375,28 @@ var runRelease = async (config5, options) => {
4371
4375
  nxJson.release.groups = Object.keys(nxJson.release.groups).reduce(
4372
4376
  (ret, groupName) => {
4373
4377
  const groupConfig = nxJson.release?.groups?.[groupName];
4374
- ret[groupName] = chunk7V324BCR_cjs.defu(groupConfig, DEFAULT_RELEASE_GROUP_CONFIG);
4378
+ ret[groupName] = chunkN5U2S3QK_cjs.defu(groupConfig, DEFAULT_RELEASE_GROUP_CONFIG);
4375
4379
  return ret;
4376
4380
  },
4377
4381
  {}
4378
4382
  );
4379
4383
  }
4380
- const nxReleaseConfig = chunk7V324BCR_cjs.defu(
4384
+ const nxReleaseConfig = chunkN5U2S3QK_cjs.defu(
4381
4385
  nxJson.release,
4382
4386
  DEFAULT_RELEASE_CONFIG
4383
4387
  );
4384
- chunk7V324BCR_cjs.writeInfo(
4388
+ chunkN5U2S3QK_cjs.writeInfo(
4385
4389
  "Using the following `nx.json` release configuration values",
4386
4390
  config5
4387
4391
  );
4388
- chunk7V324BCR_cjs.writeInfo(nxReleaseConfig, config5);
4392
+ chunkN5U2S3QK_cjs.writeInfo(nxReleaseConfig, config5);
4389
4393
  const releaseVersion = version_js.createAPI(nxReleaseConfig);
4390
4394
  const releaseChangelog = createAPI(nxReleaseConfig);
4391
4395
  const releasePublish = publish_js.createAPI(nxReleaseConfig);
4392
- chunk7V324BCR_cjs.writeDebug("Determining the current release versions...", config5);
4396
+ chunkN5U2S3QK_cjs.writeDebug("Determining the current release versions...", config5);
4393
4397
  const { workspaceVersion, projectsVersionData } = await releaseVersion({
4394
4398
  dryRun: false,
4395
- verbose: chunk7V324BCR_cjs.isVerbose(config5.logLevel),
4399
+ verbose: chunkN5U2S3QK_cjs.isVerbose(config5.logLevel),
4396
4400
  preid: config5.preid,
4397
4401
  deleteVersionPlans: false,
4398
4402
  stageChanges: true,
@@ -4403,15 +4407,15 @@ var runRelease = async (config5, options) => {
4403
4407
  version: nxReleaseConfig?.projectsRelationship !== "fixed" ? void 0 : workspaceVersion,
4404
4408
  versionData: projectsVersionData,
4405
4409
  dryRun: false,
4406
- verbose: chunk7V324BCR_cjs.isVerbose(config5.logLevel),
4410
+ verbose: chunkN5U2S3QK_cjs.isVerbose(config5.logLevel),
4407
4411
  to,
4408
4412
  from,
4409
4413
  gitCommit: true,
4410
4414
  gitCommitMessage: "release(monorepo): Publish workspace release updates"
4411
4415
  });
4412
- chunk7V324BCR_cjs.writeDebug("Tagging commit with git", config5);
4416
+ chunkN5U2S3QK_cjs.writeDebug("Tagging commit with git", config5);
4413
4417
  if (options.skipPublish) {
4414
- chunk7V324BCR_cjs.writeWarning(
4418
+ chunkN5U2S3QK_cjs.writeWarning(
4415
4419
  "Skipping publishing packages since `skipPublish` was provided as `true` in the release options.",
4416
4420
  config5
4417
4421
  );
@@ -4420,7 +4424,7 @@ var runRelease = async (config5, options) => {
4420
4424
  (key) => projectsVersionData[key]?.newVersion
4421
4425
  );
4422
4426
  if (changedProjects.length > 0) {
4423
- chunk7V324BCR_cjs.writeInfo(
4427
+ chunkN5U2S3QK_cjs.writeInfo(
4424
4428
  `Publishing release for ${changedProjects.length} ${changedProjects.length === 1 ? "project" : "projects"}:
4425
4429
  ${changedProjects.map((changedProject) => ` - ${changedProject}`).join("\n")}
4426
4430
  `,
@@ -4430,7 +4434,7 @@ ${changedProjects.map((changedProject) => ` - ${changedProject}`).join("\n")}
4430
4434
  const result = await releasePublish({
4431
4435
  ...options,
4432
4436
  dryRun: !!options.dryRun,
4433
- verbose: chunk7V324BCR_cjs.isVerbose(config5.logLevel)
4437
+ verbose: chunkN5U2S3QK_cjs.isVerbose(config5.logLevel)
4434
4438
  });
4435
4439
  const failedProjects = Object.keys(result).filter(
4436
4440
  (key) => result[key]?.code && result[key]?.code > 0
@@ -4445,10 +4449,10 @@ ${failedProjects.map((failedProject) => ` - ${failedProject} (Error Code: ${res
4445
4449
  );
4446
4450
  }
4447
4451
  } else {
4448
- chunk7V324BCR_cjs.writeWarning("Skipped publishing packages.", config5);
4452
+ chunkN5U2S3QK_cjs.writeWarning("Skipped publishing packages.", config5);
4449
4453
  }
4450
4454
  }
4451
- chunk7V324BCR_cjs.writeSuccess("Completed the Storm workspace release process!", config5);
4455
+ chunkN5U2S3QK_cjs.writeSuccess("Completed the Storm workspace release process!", config5);
4452
4456
  };
4453
4457
  async function updatePackageManifests(projectsVersionData, config5) {
4454
4458
  let projectGraph;
@@ -4463,7 +4467,7 @@ async function updatePackageManifests(projectsVersionData, config5) {
4463
4467
  Object.keys(projectsVersionData).map(async (node) => {
4464
4468
  const projectNode = projectGraph.nodes[node];
4465
4469
  if (!projectNode?.data.root) {
4466
- chunk7V324BCR_cjs.writeWarning(
4470
+ chunkN5U2S3QK_cjs.writeWarning(
4467
4471
  `Project node ${node} not found in the project graph. Skipping manifest update.`,
4468
4472
  config5
4469
4473
  );
@@ -4471,17 +4475,17 @@ async function updatePackageManifests(projectsVersionData, config5) {
4471
4475
  }
4472
4476
  const versionData = projectsVersionData[node];
4473
4477
  if (projectNode?.data.root && versionData && versionData.newVersion !== null) {
4474
- chunk7V324BCR_cjs.writeTrace(
4478
+ chunkN5U2S3QK_cjs.writeTrace(
4475
4479
  `Writing version ${versionData.newVersion} update to manifest file for ${node}
4476
4480
  `,
4477
4481
  config5
4478
4482
  );
4479
- const projectRoot = chunk7V324BCR_cjs.joinPaths(
4483
+ const projectRoot = chunkN5U2S3QK_cjs.joinPaths(
4480
4484
  config5.workspaceRoot,
4481
4485
  projectNode.data.root
4482
4486
  );
4483
- const packageJsonPath = chunk7V324BCR_cjs.joinPaths(projectRoot, "package.json");
4484
- const cargoTomlPath = chunk7V324BCR_cjs.joinPaths(projectRoot, "Cargo.toml");
4487
+ const packageJsonPath = chunkN5U2S3QK_cjs.joinPaths(projectRoot, "package.json");
4488
+ const cargoTomlPath = chunkN5U2S3QK_cjs.joinPaths(projectRoot, "Cargo.toml");
4485
4489
  if (fs$1.existsSync(packageJsonPath)) {
4486
4490
  const packageJsonContent = await fs.readFile(packageJsonPath, "utf8");
4487
4491
  const packageJson = JSON.parse(packageJsonContent);
@@ -4499,7 +4503,7 @@ async function updatePackageManifests(projectsVersionData, config5) {
4499
4503
  })
4500
4504
  );
4501
4505
  } else {
4502
- chunk7V324BCR_cjs.writeWarning("No project nodes found. Skipping manifest updates.", config5);
4506
+ chunkN5U2S3QK_cjs.writeWarning("No project nodes found. Skipping manifest updates.", config5);
4503
4507
  }
4504
4508
  }
4505
4509
 
@@ -4507,8 +4511,8 @@ async function updatePackageManifests(projectsVersionData, config5) {
4507
4511
  var _config = {};
4508
4512
  function createProgram(config5) {
4509
4513
  _config = config5;
4510
- chunk7V324BCR_cjs.writeInfo("\u26A1 Running Storm Git Tools", config5);
4511
- const root = chunk7V324BCR_cjs.findWorkspaceRootSafe(process.cwd());
4514
+ chunkN5U2S3QK_cjs.writeInfo("\u26A1 Running Storm Git Tools", config5);
4515
+ const root = chunkN5U2S3QK_cjs.findWorkspaceRootSafe(process.cwd());
4512
4516
  process.env.STORM_WORKSPACE_ROOT ??= root;
4513
4517
  process.env.NX_WORKSPACE_ROOT_PATH ??= root;
4514
4518
  if (root) {
@@ -4577,12 +4581,12 @@ async function commitAction({
4577
4581
  dryRun = false
4578
4582
  }) {
4579
4583
  try {
4580
- chunk7V324BCR_cjs.writeInfo(
4584
+ chunkN5U2S3QK_cjs.writeInfo(
4581
4585
  `\u26A1 Preparing to commit your changes. Please provide the requested details below...`,
4582
4586
  _config
4583
4587
  );
4584
4588
  await runCommit(config5, dryRun);
4585
- chunk7V324BCR_cjs.writeSuccess(
4589
+ chunkN5U2S3QK_cjs.writeSuccess(
4586
4590
  `\u{1F389} Storm Commit processing completed successfully!
4587
4591
 
4588
4592
  Note: Please run "pnpm push" to upload these changes to the remote ${_config.name ? _config.name : _config.namespace ? _config.namespace : _config.organization ? _config.organization : "Storm-Software"} Git repository at ${_config.repository}
@@ -4590,10 +4594,14 @@ Note: Please run "pnpm push" to upload these changes to the remote ${_config.nam
4590
4594
  _config
4591
4595
  );
4592
4596
  } catch (error) {
4593
- chunk7V324BCR_cjs.writeFatal(
4597
+ chunkN5U2S3QK_cjs.writeFatal(
4594
4598
  `A fatal error occurred while running commit action:
4595
4599
 
4596
- ${error.message}`,
4600
+ ${error.message}${error.stack ? `
4601
+
4602
+ Stacktrace: ${error.stack}` : ""}
4603
+
4604
+ Please fix any errors and try committing again.`,
4597
4605
  _config
4598
4606
  );
4599
4607
  throw new Error(error.message, { cause: error });
@@ -4601,14 +4609,14 @@ ${error.message}`,
4601
4609
  }
4602
4610
  async function readmeAction(options) {
4603
4611
  try {
4604
- chunk7V324BCR_cjs.writeInfo("\u26A1 Formatting the workspace's README.md files", _config);
4612
+ chunkN5U2S3QK_cjs.writeInfo("\u26A1 Formatting the workspace's README.md files", _config);
4605
4613
  await runReadme(options);
4606
- chunk7V324BCR_cjs.writeSuccess(
4614
+ chunkN5U2S3QK_cjs.writeSuccess(
4607
4615
  "Formatting of the workspace's README.md files is complete\n",
4608
4616
  _config
4609
4617
  );
4610
4618
  } catch (error) {
4611
- chunk7V324BCR_cjs.writeFatal(
4619
+ chunkN5U2S3QK_cjs.writeFatal(
4612
4620
  `A fatal error occurred while running README format action:
4613
4621
 
4614
4622
  ${error.message}`
@@ -4623,7 +4631,7 @@ async function releaseAction({
4623
4631
  dryRun
4624
4632
  }) {
4625
4633
  try {
4626
- chunk7V324BCR_cjs.writeInfo(
4634
+ chunkN5U2S3QK_cjs.writeInfo(
4627
4635
  "\u26A1 Running the Storm Release and Publish process on the workspace",
4628
4636
  _config
4629
4637
  );
@@ -4633,9 +4641,9 @@ async function releaseAction({
4633
4641
  base,
4634
4642
  head
4635
4643
  });
4636
- chunk7V324BCR_cjs.writeSuccess("Release completed successfully!\n", _config);
4644
+ chunkN5U2S3QK_cjs.writeSuccess("Release completed successfully!\n", _config);
4637
4645
  } catch (error) {
4638
- chunk7V324BCR_cjs.writeFatal(
4646
+ chunkN5U2S3QK_cjs.writeFatal(
4639
4647
  `A fatal error occurred while running release action:
4640
4648
 
4641
4649
  ${error.message} ${error.stack ? `
@@ -4649,17 +4657,17 @@ Stacktrace: ${error.stack}` : ""}`,
4649
4657
  }
4650
4658
  async function commitLintAction(options) {
4651
4659
  try {
4652
- chunk7V324BCR_cjs.writeInfo(
4660
+ chunkN5U2S3QK_cjs.writeInfo(
4653
4661
  `\u26A1 Linting the ${_config.repository ? _config.repository : _config.namespace ? _config.namespace : _config.name ? _config.name : typeof _config.organization === "string" ? _config.organization : _config.organization?.name ? _config.organization?.name : "Storm-Software"} repository's commit messages.`,
4654
4662
  _config
4655
4663
  );
4656
4664
  await runCommitLint(_config, options);
4657
- chunk7V324BCR_cjs.writeSuccess(
4665
+ chunkN5U2S3QK_cjs.writeSuccess(
4658
4666
  "Linting the commit messages completed successfully!\n",
4659
4667
  _config
4660
4668
  );
4661
4669
  } catch (error) {
4662
- chunk7V324BCR_cjs.writeFatal(
4670
+ chunkN5U2S3QK_cjs.writeFatal(
4663
4671
  `A fatal error occurred while linting the commit messages:
4664
4672
 
4665
4673
  ${error.message}`,
@@ -4671,18 +4679,18 @@ ${error.message}`,
4671
4679
 
4672
4680
  // bin/git.ts
4673
4681
  void (async () => {
4674
- const config5 = await chunk7V324BCR_cjs.getConfig();
4682
+ const config5 = await chunkN5U2S3QK_cjs.getConfig();
4675
4683
  try {
4676
- chunk7V324BCR_cjs.handleProcess(config5);
4684
+ chunkN5U2S3QK_cjs.handleProcess(config5);
4677
4685
  const program = createProgram(config5);
4678
4686
  await program.parseAsync(process.argv);
4679
- chunk7V324BCR_cjs.writeSuccess(
4687
+ chunkN5U2S3QK_cjs.writeSuccess(
4680
4688
  `\u{1F389} Git ${process.argv && process.argv.length >= 3 && process.argv[2] ? process.argv[2] : "tool"} processing completed successfully!`,
4681
4689
  config5
4682
4690
  );
4683
- chunk7V324BCR_cjs.exitWithSuccess(config5);
4691
+ chunkN5U2S3QK_cjs.exitWithSuccess(config5);
4684
4692
  } catch (error) {
4685
- chunk7V324BCR_cjs.exitWithError(config5);
4693
+ chunkN5U2S3QK_cjs.exitWithError(config5);
4686
4694
  process.exit(1);
4687
4695
  }
4688
4696
  })();
package/bin/git.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { run } from './chunk-54Q5U5WW.js';
3
- import { getConfig, handleProcess, writeSuccess, exitWithSuccess, exitWithError, writeInfo, findWorkspaceRootSafe, writeFatal, getWorkspaceConfig, joinPaths, writeDebug, defu, isVerbose, writeWarning, writeTrace, STORM_DEFAULT_RELEASE_BANNER, __require } from './chunk-XJZXOYRK.js';
3
+ import { getConfig, handleProcess, writeSuccess, exitWithSuccess, exitWithError, writeInfo, findWorkspaceRootSafe, writeFatal, getWorkspaceConfig, joinPaths, writeDebug, defu, isVerbose, writeWarning, writeTrace, STORM_DEFAULT_RELEASE_BANNER, __require } from './chunk-QBJQH2IK.js';
4
4
  import TOML from '@ltd/j-toml';
5
5
  import { Command, Option } from 'commander';
6
6
  import { select, confirm, input } from '@inquirer/prompts';
@@ -875,7 +875,11 @@ ${footer}` : message;
875
875
  return message || "";
876
876
  };
877
877
  async function lint(message, commitlintConfig) {
878
- const parser = new CommitParser(commitlintConfig.parserOpts);
878
+ const workspaceConfig = await getWorkspaceConfig();
879
+ const parserOpts = await createParserOpts(workspaceConfig.variant);
880
+ const parser = new CommitParser(
881
+ defu(commitlintConfig.parserOpts, parserOpts)
882
+ );
879
883
  const parsed = parser.parse(message);
880
884
  if (parsed.header === null && parsed.body === null && parsed.footer === null) {
881
885
  return {
@@ -1086,7 +1090,7 @@ async function runCommitLint(workspaceConfig, options) {
1086
1090
  let commitlintRegex;
1087
1091
  const allowedTypes = commitlintConfig.rules["type-enum"] ?? COMMIT_TYPES;
1088
1092
  let allowedScopes = [];
1089
- if (commitlintConfig.rules["scope-empty"] && commitlintConfig.rules["scope-empty"][0] !== 0 /* Disabled */) {
1093
+ if (workspaceConfig.variant !== "minimal" && commitlintConfig.rules["scope-empty"] && commitlintConfig.rules["scope-empty"][0] !== 0 /* Disabled */) {
1090
1094
  allowedScopes = await getNxScopes({
1091
1095
  config: workspaceConfig
1092
1096
  });
@@ -2473,7 +2477,7 @@ function parseChangelogMarkdown(contents) {
2473
2477
  "^#+\\s*\\[?(\\d+\\.\\d+\\.\\d+(?:-[a-zA-Z0-9\\.]+)?)\\]?",
2474
2478
  "gm"
2475
2479
  );
2476
- const headings = [...contents.matchAll(CHANGELOG_RELEASE_HEAD_RE)];
2480
+ const headings = contents ? [...contents.matchAll(CHANGELOG_RELEASE_HEAD_RE)] : [];
2477
2481
  const releases = [];
2478
2482
  for (let i = 0; i < headings.length; i++) {
2479
2483
  const heading = headings[i];
@@ -2781,8 +2785,8 @@ var StormChangelogRenderer = class extends DefaultChangelogRenderer {
2781
2785
  return;
2782
2786
  }
2783
2787
  for (const email of meta.email) {
2784
- if (email.endsWith("@users.noreply.github.com")) {
2785
- const match = email.match(
2788
+ if (email?.endsWith("@users.noreply.github.com")) {
2789
+ const match = email?.match(
2786
2790
  /^(\d+\+)?([^@]+)@users\.noreply\.github\.com$/
2787
2791
  );
2788
2792
  if (match && match[2]) {
@@ -2856,7 +2860,7 @@ function getGitHubRepoData(remoteName = "origin", createReleaseConfig) {
2856
2860
  const escapedHostname = hostname.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
2857
2861
  const regexString = `${escapedHostname}[/:]([\\w.-]+/[\\w.-]+)(\\.git)?`;
2858
2862
  const regex = new RegExp(regexString);
2859
- const match = remoteUrl.match(regex);
2863
+ const match = remoteUrl?.match(regex);
2860
2864
  if (match && match[1]) {
2861
2865
  return {
2862
2866
  hostname,
@@ -4575,7 +4579,11 @@ Note: Please run "pnpm push" to upload these changes to the remote ${_config.nam
4575
4579
  writeFatal(
4576
4580
  `A fatal error occurred while running commit action:
4577
4581
 
4578
- ${error.message}`,
4582
+ ${error.message}${error.stack ? `
4583
+
4584
+ Stacktrace: ${error.stack}` : ""}
4585
+
4586
+ Please fix any errors and try committing again.`,
4579
4587
  _config
4580
4588
  );
4581
4589
  throw new Error(error.message, { cause: error });
@@ -3,33 +3,33 @@
3
3
 
4
4
  var chunkSWXHQXUT_cjs = require('./chunk-SWXHQXUT.cjs');
5
5
  var chunkCIJVSMK2_cjs = require('./chunk-CIJVSMK2.cjs');
6
- var chunk7V324BCR_cjs = require('./chunk-7V324BCR.cjs');
6
+ var chunkN5U2S3QK_cjs = require('./chunk-N5U2S3QK.cjs');
7
7
 
8
8
  // bin/post-checkout.ts
9
9
  void (async () => {
10
- const config = await chunk7V324BCR_cjs.getConfig();
10
+ const config = await chunkN5U2S3QK_cjs.getConfig();
11
11
  try {
12
- chunk7V324BCR_cjs.handleProcess(config);
13
- chunk7V324BCR_cjs.writeInfo("Running post-checkout hook...", config);
12
+ chunkN5U2S3QK_cjs.handleProcess(config);
13
+ chunkN5U2S3QK_cjs.writeInfo("Running post-checkout hook...", config);
14
14
  chunkSWXHQXUT_cjs.checkPackageVersion(process.argv?.slice(1));
15
15
  try {
16
16
  chunkCIJVSMK2_cjs.run(config, "git-lfs version");
17
17
  } catch (error) {
18
- chunk7V324BCR_cjs.writeError(
18
+ chunkN5U2S3QK_cjs.writeError(
19
19
  `This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-checkout.
20
20
  Error: ${error?.message}`,
21
21
  config
22
22
  );
23
- chunk7V324BCR_cjs.exitWithError(config);
23
+ chunkN5U2S3QK_cjs.exitWithError(config);
24
24
  }
25
25
  chunkCIJVSMK2_cjs.run(config, "git lfs post-checkout");
26
- chunk7V324BCR_cjs.exitWithSuccess(config);
26
+ chunkN5U2S3QK_cjs.exitWithSuccess(config);
27
27
  } catch (error) {
28
- chunk7V324BCR_cjs.writeFatal(
28
+ chunkN5U2S3QK_cjs.writeFatal(
29
29
  `A fatal error occurred while running the program: ${error.message}`,
30
30
  config
31
31
  );
32
- chunk7V324BCR_cjs.exitWithError(config);
32
+ chunkN5U2S3QK_cjs.exitWithError(config);
33
33
  process.exit(1);
34
34
  }
35
35
  })();
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { checkPackageVersion } from './chunk-AMSZ7DVW.js';
3
3
  import { run } from './chunk-54Q5U5WW.js';
4
- import { getConfig, handleProcess, writeInfo, writeError, exitWithError, exitWithSuccess, writeFatal } from './chunk-XJZXOYRK.js';
4
+ import { getConfig, handleProcess, writeInfo, writeError, exitWithError, exitWithSuccess, writeFatal } from './chunk-QBJQH2IK.js';
5
5
 
6
6
  // bin/post-checkout.ts
7
7
  void (async () => {
@@ -3,33 +3,33 @@
3
3
 
4
4
  var chunkSWXHQXUT_cjs = require('./chunk-SWXHQXUT.cjs');
5
5
  var chunkCIJVSMK2_cjs = require('./chunk-CIJVSMK2.cjs');
6
- var chunk7V324BCR_cjs = require('./chunk-7V324BCR.cjs');
6
+ var chunkN5U2S3QK_cjs = require('./chunk-N5U2S3QK.cjs');
7
7
 
8
8
  // bin/post-commit.ts
9
9
  void (async () => {
10
- const config = await chunk7V324BCR_cjs.getConfig();
10
+ const config = await chunkN5U2S3QK_cjs.getConfig();
11
11
  try {
12
- chunk7V324BCR_cjs.handleProcess(config);
13
- chunk7V324BCR_cjs.writeInfo("Running post-commit hook...", config);
12
+ chunkN5U2S3QK_cjs.handleProcess(config);
13
+ chunkN5U2S3QK_cjs.writeInfo("Running post-commit hook...", config);
14
14
  chunkSWXHQXUT_cjs.checkPackageVersion(process.argv?.slice(1));
15
15
  try {
16
16
  chunkCIJVSMK2_cjs.run(config, "git-lfs version");
17
17
  } catch (error) {
18
- chunk7V324BCR_cjs.writeError(
18
+ chunkN5U2S3QK_cjs.writeError(
19
19
  `This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-commit.
20
20
  Error: ${error?.message}`,
21
21
  config
22
22
  );
23
- chunk7V324BCR_cjs.exitWithError(config);
23
+ chunkN5U2S3QK_cjs.exitWithError(config);
24
24
  }
25
25
  chunkCIJVSMK2_cjs.run(config, "git lfs post-commit");
26
- chunk7V324BCR_cjs.exitWithSuccess(config);
26
+ chunkN5U2S3QK_cjs.exitWithSuccess(config);
27
27
  } catch (error) {
28
- chunk7V324BCR_cjs.writeFatal(
28
+ chunkN5U2S3QK_cjs.writeFatal(
29
29
  `A fatal error occurred while running the program: ${error.message}`,
30
30
  config
31
31
  );
32
- chunk7V324BCR_cjs.exitWithError(config);
32
+ chunkN5U2S3QK_cjs.exitWithError(config);
33
33
  process.exit(1);
34
34
  }
35
35
  })();
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { checkPackageVersion } from './chunk-AMSZ7DVW.js';
3
3
  import { run } from './chunk-54Q5U5WW.js';
4
- import { getConfig, handleProcess, writeInfo, writeError, exitWithError, exitWithSuccess, writeFatal } from './chunk-XJZXOYRK.js';
4
+ import { getConfig, handleProcess, writeInfo, writeError, exitWithError, exitWithSuccess, writeFatal } from './chunk-QBJQH2IK.js';
5
5
 
6
6
  // bin/post-commit.ts
7
7
  void (async () => {
@@ -3,33 +3,33 @@
3
3
 
4
4
  var chunkSWXHQXUT_cjs = require('./chunk-SWXHQXUT.cjs');
5
5
  var chunkCIJVSMK2_cjs = require('./chunk-CIJVSMK2.cjs');
6
- var chunk7V324BCR_cjs = require('./chunk-7V324BCR.cjs');
6
+ var chunkN5U2S3QK_cjs = require('./chunk-N5U2S3QK.cjs');
7
7
 
8
8
  // bin/post-merge.ts
9
9
  void (async () => {
10
- const config = await chunk7V324BCR_cjs.getConfig();
10
+ const config = await chunkN5U2S3QK_cjs.getConfig();
11
11
  try {
12
- chunk7V324BCR_cjs.handleProcess(config);
13
- chunk7V324BCR_cjs.writeInfo("Running post-merge hook...", config);
12
+ chunkN5U2S3QK_cjs.handleProcess(config);
13
+ chunkN5U2S3QK_cjs.writeInfo("Running post-merge hook...", config);
14
14
  chunkSWXHQXUT_cjs.checkPackageVersion(process.argv?.slice(1));
15
15
  try {
16
16
  chunkCIJVSMK2_cjs.run(config, "git-lfs version");
17
17
  } catch (error) {
18
- chunk7V324BCR_cjs.writeError(
18
+ chunkN5U2S3QK_cjs.writeError(
19
19
  `This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-merge.
20
20
  Error: ${error?.message}`,
21
21
  config
22
22
  );
23
- chunk7V324BCR_cjs.exitWithError(config);
23
+ chunkN5U2S3QK_cjs.exitWithError(config);
24
24
  }
25
25
  chunkCIJVSMK2_cjs.run(config, "git lfs post-merge");
26
- chunk7V324BCR_cjs.exitWithSuccess(config);
26
+ chunkN5U2S3QK_cjs.exitWithSuccess(config);
27
27
  } catch (error) {
28
- chunk7V324BCR_cjs.writeFatal(
28
+ chunkN5U2S3QK_cjs.writeFatal(
29
29
  `A fatal error occurred while running the program: ${error.message}`,
30
30
  config
31
31
  );
32
- chunk7V324BCR_cjs.exitWithError(config);
32
+ chunkN5U2S3QK_cjs.exitWithError(config);
33
33
  process.exit(1);
34
34
  }
35
35
  })();
package/bin/post-merge.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { checkPackageVersion } from './chunk-AMSZ7DVW.js';
3
3
  import { run } from './chunk-54Q5U5WW.js';
4
- import { getConfig, handleProcess, writeInfo, writeError, exitWithError, exitWithSuccess, writeFatal } from './chunk-XJZXOYRK.js';
4
+ import { getConfig, handleProcess, writeInfo, writeError, exitWithError, exitWithSuccess, writeFatal } from './chunk-QBJQH2IK.js';
5
5
 
6
6
  // bin/post-merge.ts
7
7
  void (async () => {
@@ -2,29 +2,29 @@
2
2
  'use strict';
3
3
 
4
4
  var chunkSWXHQXUT_cjs = require('./chunk-SWXHQXUT.cjs');
5
- var chunk7V324BCR_cjs = require('./chunk-7V324BCR.cjs');
5
+ var chunkN5U2S3QK_cjs = require('./chunk-N5U2S3QK.cjs');
6
6
 
7
7
  // bin/pre-commit.ts
8
8
  void (async () => {
9
- const config = await chunk7V324BCR_cjs.getConfig();
9
+ const config = await chunkN5U2S3QK_cjs.getConfig();
10
10
  try {
11
- chunk7V324BCR_cjs.handleProcess(config);
12
- chunk7V324BCR_cjs.writeInfo("Running pre-commit hook...", config);
11
+ chunkN5U2S3QK_cjs.handleProcess(config);
12
+ chunkN5U2S3QK_cjs.writeInfo("Running pre-commit hook...", config);
13
13
  chunkSWXHQXUT_cjs.checkPackageVersion(process.argv.slice(1));
14
14
  if (chunkSWXHQXUT_cjs.isPackageVersionChanged(process.argv?.slice(1))) {
15
- chunk7V324BCR_cjs.writeError(
15
+ chunkN5U2S3QK_cjs.writeError(
16
16
  "Please regenerate the package lock file before committing...",
17
17
  config
18
18
  );
19
- chunk7V324BCR_cjs.exitWithError(config);
19
+ chunkN5U2S3QK_cjs.exitWithError(config);
20
20
  }
21
- chunk7V324BCR_cjs.exitWithSuccess(config);
21
+ chunkN5U2S3QK_cjs.exitWithSuccess(config);
22
22
  } catch (error) {
23
- chunk7V324BCR_cjs.writeFatal(
23
+ chunkN5U2S3QK_cjs.writeFatal(
24
24
  `A fatal error occurred while running the program: ${error.message}`,
25
25
  config
26
26
  );
27
- chunk7V324BCR_cjs.exitWithError(config);
27
+ chunkN5U2S3QK_cjs.exitWithError(config);
28
28
  process.exit(1);
29
29
  }
30
30
  })();
package/bin/pre-commit.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { checkPackageVersion, isPackageVersionChanged } from './chunk-AMSZ7DVW.js';
3
- import { getConfig, handleProcess, writeInfo, writeError, exitWithError, exitWithSuccess, writeFatal } from './chunk-XJZXOYRK.js';
3
+ import { getConfig, handleProcess, writeInfo, writeError, exitWithError, exitWithSuccess, writeFatal } from './chunk-QBJQH2IK.js';
4
4
 
5
5
  // bin/pre-commit.ts
6
6
  void (async () => {
@@ -2,26 +2,26 @@
2
2
  'use strict';
3
3
 
4
4
  var chunkCIJVSMK2_cjs = require('./chunk-CIJVSMK2.cjs');
5
- var chunk7V324BCR_cjs = require('./chunk-7V324BCR.cjs');
5
+ var chunkN5U2S3QK_cjs = require('./chunk-N5U2S3QK.cjs');
6
6
 
7
7
  // bin/pre-install.ts
8
8
  void (async () => {
9
- const config = await chunk7V324BCR_cjs.getConfig();
9
+ const config = await chunkN5U2S3QK_cjs.getConfig();
10
10
  try {
11
- chunk7V324BCR_cjs.handleProcess(config);
12
- chunk7V324BCR_cjs.writeInfo("Running pre-install hook...", config);
11
+ chunkN5U2S3QK_cjs.handleProcess(config);
12
+ chunkN5U2S3QK_cjs.writeInfo("Running pre-install hook...", config);
13
13
  if (Boolean(process.env.CI) || Boolean(process.env.STORM_CI)) {
14
- chunk7V324BCR_cjs.writeInfo("Skipping pre-install for CI process...", config);
15
- chunk7V324BCR_cjs.exitWithSuccess(config);
14
+ chunkN5U2S3QK_cjs.writeInfo("Skipping pre-install for CI process...", config);
15
+ chunkN5U2S3QK_cjs.exitWithSuccess(config);
16
16
  }
17
17
  chunkCIJVSMK2_cjs.run(config, "npx -y only-allow pnpm");
18
- chunk7V324BCR_cjs.exitWithSuccess(config);
18
+ chunkN5U2S3QK_cjs.exitWithSuccess(config);
19
19
  } catch (error) {
20
- chunk7V324BCR_cjs.writeFatal(
20
+ chunkN5U2S3QK_cjs.writeFatal(
21
21
  `A fatal error occurred while running the program: ${error.message}`,
22
22
  config
23
23
  );
24
- chunk7V324BCR_cjs.exitWithError(config);
24
+ chunkN5U2S3QK_cjs.exitWithError(config);
25
25
  process.exit(1);
26
26
  }
27
27
  })();
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { run } from './chunk-54Q5U5WW.js';
3
- import { getConfig, handleProcess, writeInfo, exitWithSuccess, writeFatal, exitWithError } from './chunk-XJZXOYRK.js';
3
+ import { getConfig, handleProcess, writeInfo, exitWithSuccess, writeFatal, exitWithError } from './chunk-QBJQH2IK.js';
4
4
 
5
5
  // bin/pre-install.ts
6
6
  void (async () => {
package/bin/pre-push.cjs CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  var chunkSWXHQXUT_cjs = require('./chunk-SWXHQXUT.cjs');
5
5
  var chunkCIJVSMK2_cjs = require('./chunk-CIJVSMK2.cjs');
6
- var chunk7V324BCR_cjs = require('./chunk-7V324BCR.cjs');
6
+ var chunkN5U2S3QK_cjs = require('./chunk-N5U2S3QK.cjs');
7
7
  var fs = require('fs');
8
8
  var promises = require('fs/promises');
9
9
  var path = require('path');
@@ -14,12 +14,12 @@ var fs__default = /*#__PURE__*/_interopDefault(fs);
14
14
  var path__default = /*#__PURE__*/_interopDefault(path);
15
15
 
16
16
  void (async () => {
17
- const config = await chunk7V324BCR_cjs.getConfig();
17
+ const config = await chunkN5U2S3QK_cjs.getConfig();
18
18
  try {
19
- chunk7V324BCR_cjs.handleProcess(config);
20
- chunk7V324BCR_cjs.writeInfo("Running pre-push hook...", config);
19
+ chunkN5U2S3QK_cjs.handleProcess(config);
20
+ chunkN5U2S3QK_cjs.writeInfo("Running pre-push hook...", config);
21
21
  chunkSWXHQXUT_cjs.checkPackageVersion(process.argv?.slice(1));
22
- chunk7V324BCR_cjs.writeInfo("\u{1F512}\u{1F512}\u{1F512} Validating lock files \u{1F512}\u{1F512}\u{1F512}\n", config);
22
+ chunkN5U2S3QK_cjs.writeInfo("\u{1F512}\u{1F512}\u{1F512} Validating lock files \u{1F512}\u{1F512}\u{1F512}\n", config);
23
23
  const errors = [];
24
24
  if (fs__default.default.existsSync(
25
25
  path__default.default.join(config.workspaceRoot ?? "./", "package-lock.json")
@@ -40,12 +40,12 @@ void (async () => {
40
40
  encoding: "utf8"
41
41
  }
42
42
  );
43
- if (content.match(/localhost:487/)) {
43
+ if (content?.match(/localhost:487/)) {
44
44
  errors.push(
45
45
  'The "pnpm-lock.yaml" has reference to local repository ("localhost:4873"). Please use ensure you disable local registry before running "pnpm i"'
46
46
  );
47
47
  }
48
- if (content.match(/resolution: \{tarball/)) {
48
+ if (content?.match(/resolution: \{tarball/)) {
49
49
  errors.push(
50
50
  'The "pnpm-lock.yaml" has reference to tarball package. Please use npm registry only'
51
51
  );
@@ -54,32 +54,32 @@ void (async () => {
54
54
  errors.push('The "pnpm-lock.yaml" does not exist or cannot be read');
55
55
  }
56
56
  if (errors.length > 0) {
57
- chunk7V324BCR_cjs.writeError("\u274C Lock file validation failed", config);
57
+ chunkN5U2S3QK_cjs.writeError("\u274C Lock file validation failed", config);
58
58
  for (const error of errors) {
59
59
  console.error(error);
60
60
  }
61
- chunk7V324BCR_cjs.exitWithError(config);
61
+ chunkN5U2S3QK_cjs.exitWithError(config);
62
62
  }
63
- chunk7V324BCR_cjs.writeSuccess("Lock file is valid \u2705", config);
63
+ chunkN5U2S3QK_cjs.writeSuccess("Lock file is valid \u2705", config);
64
64
  chunkCIJVSMK2_cjs.run(config, "git lfs pre-push origin");
65
65
  try {
66
66
  chunkCIJVSMK2_cjs.run(config, "git-lfs version");
67
67
  } catch (error) {
68
- chunk7V324BCR_cjs.writeError(
68
+ chunkN5U2S3QK_cjs.writeError(
69
69
  `This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/pre-push.
70
70
  Error: ${error?.message}`,
71
71
  config
72
72
  );
73
- chunk7V324BCR_cjs.exitWithError(config);
73
+ chunkN5U2S3QK_cjs.exitWithError(config);
74
74
  }
75
75
  chunkCIJVSMK2_cjs.run(config, "git lfs pre-push origin");
76
- chunk7V324BCR_cjs.exitWithSuccess(config);
76
+ chunkN5U2S3QK_cjs.exitWithSuccess(config);
77
77
  } catch (error) {
78
- chunk7V324BCR_cjs.writeFatal(
78
+ chunkN5U2S3QK_cjs.writeFatal(
79
79
  `A fatal error occurred while running the program: ${error.message}`,
80
80
  config
81
81
  );
82
- chunk7V324BCR_cjs.exitWithError(config);
82
+ chunkN5U2S3QK_cjs.exitWithError(config);
83
83
  process.exit(1);
84
84
  }
85
85
  })();
package/bin/pre-push.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { checkPackageVersion } from './chunk-AMSZ7DVW.js';
3
3
  import { run } from './chunk-54Q5U5WW.js';
4
- import { getConfig, handleProcess, writeInfo, writeError, exitWithError, writeSuccess, exitWithSuccess, writeFatal } from './chunk-XJZXOYRK.js';
4
+ import { getConfig, handleProcess, writeInfo, writeError, exitWithError, writeSuccess, exitWithSuccess, writeFatal } from './chunk-QBJQH2IK.js';
5
5
  import fs from 'node:fs';
6
6
  import { readFile } from 'node:fs/promises';
7
7
  import path from 'node:path';
@@ -33,12 +33,12 @@ void (async () => {
33
33
  encoding: "utf8"
34
34
  }
35
35
  );
36
- if (content.match(/localhost:487/)) {
36
+ if (content?.match(/localhost:487/)) {
37
37
  errors.push(
38
38
  'The "pnpm-lock.yaml" has reference to local repository ("localhost:4873"). Please use ensure you disable local registry before running "pnpm i"'
39
39
  );
40
40
  }
41
- if (content.match(/resolution: \{tarball/)) {
41
+ if (content?.match(/resolution: \{tarball/)) {
42
42
  errors.push(
43
43
  'The "pnpm-lock.yaml" has reference to tarball package. Please use npm registry only'
44
44
  );
package/bin/prepare.cjs CHANGED
@@ -2,24 +2,24 @@
2
2
  'use strict';
3
3
 
4
4
  var chunkCIJVSMK2_cjs = require('./chunk-CIJVSMK2.cjs');
5
- var chunk7V324BCR_cjs = require('./chunk-7V324BCR.cjs');
5
+ var chunkN5U2S3QK_cjs = require('./chunk-N5U2S3QK.cjs');
6
6
 
7
7
  // bin/prepare.ts
8
8
  void (async () => {
9
- const config = await chunk7V324BCR_cjs.getConfig();
9
+ const config = await chunkN5U2S3QK_cjs.getConfig();
10
10
  try {
11
- chunk7V324BCR_cjs.handleProcess(config);
12
- chunk7V324BCR_cjs.writeInfo("Running prepare hook...", config);
11
+ chunkN5U2S3QK_cjs.handleProcess(config);
12
+ chunkN5U2S3QK_cjs.writeInfo("Running prepare hook...", config);
13
13
  if (!process.env.CI && !process.env.STORM_CI) {
14
14
  chunkCIJVSMK2_cjs.run(config, "lefthook install");
15
15
  }
16
- chunk7V324BCR_cjs.exitWithSuccess(config);
16
+ chunkN5U2S3QK_cjs.exitWithSuccess(config);
17
17
  } catch (error) {
18
- chunk7V324BCR_cjs.writeFatal(
18
+ chunkN5U2S3QK_cjs.writeFatal(
19
19
  `A fatal error occurred while running the program: ${error.message}`,
20
20
  config
21
21
  );
22
- chunk7V324BCR_cjs.exitWithError(config);
22
+ chunkN5U2S3QK_cjs.exitWithError(config);
23
23
  process.exit(1);
24
24
  }
25
25
  })();
package/bin/prepare.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { run } from './chunk-54Q5U5WW.js';
3
- import { getConfig, handleProcess, writeInfo, exitWithSuccess, writeFatal, exitWithError } from './chunk-XJZXOYRK.js';
3
+ import { getConfig, handleProcess, writeInfo, exitWithSuccess, writeFatal, exitWithError } from './chunk-QBJQH2IK.js';
4
4
 
5
5
  // bin/prepare.ts
6
6
  void (async () => {
@@ -2,20 +2,20 @@
2
2
  'use strict';
3
3
 
4
4
  var chunkSWXHQXUT_cjs = require('./chunk-SWXHQXUT.cjs');
5
- var chunk7V324BCR_cjs = require('./chunk-7V324BCR.cjs');
5
+ var chunkN5U2S3QK_cjs = require('./chunk-N5U2S3QK.cjs');
6
6
 
7
7
  // bin/version-warning.ts
8
8
  void (async () => {
9
- const config = await chunk7V324BCR_cjs.getConfig();
9
+ const config = await chunkN5U2S3QK_cjs.getConfig();
10
10
  try {
11
- chunk7V324BCR_cjs.handleProcess(config);
11
+ chunkN5U2S3QK_cjs.handleProcess(config);
12
12
  chunkSWXHQXUT_cjs.checkPackageVersion(process.argv.slice(1));
13
13
  } catch (error) {
14
- chunk7V324BCR_cjs.writeFatal(
14
+ chunkN5U2S3QK_cjs.writeFatal(
15
15
  `A fatal error occurred while running the program: ${error.message}`,
16
16
  config
17
17
  );
18
- chunk7V324BCR_cjs.exitWithError(config);
18
+ chunkN5U2S3QK_cjs.exitWithError(config);
19
19
  process.exit(1);
20
20
  }
21
21
  })();
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { checkPackageVersion } from './chunk-AMSZ7DVW.js';
3
- import { getConfig, handleProcess, writeFatal, exitWithError } from './chunk-XJZXOYRK.js';
3
+ import { getConfig, handleProcess, writeFatal, exitWithError } from './chunk-QBJQH2IK.js';
4
4
 
5
5
  // bin/version-warning.ts
6
6
  void (async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/git-tools",
3
- "version": "2.121.2",
3
+ "version": "2.121.4",
4
4
  "type": "module",
5
5
  "description": "Tools for managing Git repositories within a Nx workspace.",
6
6
  "repository": {
@@ -185,8 +185,8 @@
185
185
  "@inquirer/prompts": "7.2.1",
186
186
  "@nx/devkit": "^21.4.1",
187
187
  "@nx/js": "^21.4.1",
188
- "@storm-software/config": "^1.131.2",
189
- "@storm-software/config-tools": "^1.185.2",
188
+ "@storm-software/config": "^1.131.4",
189
+ "@storm-software/config-tools": "^1.185.4",
190
190
  "@textlint/ast-node-types": "14.4.2",
191
191
  "@textlint/markdown-to-ast": "14.4.2",
192
192
  "anchor-markdown-header": "0.7.0",
@@ -194,7 +194,7 @@
194
194
  "axios": "1.8.2",
195
195
  "chalk": "^4.1.2",
196
196
  "chalk-template": "1.1.0",
197
- "conventional-changelog-storm-software": "^0.1.2",
197
+ "conventional-changelog-storm-software": "^0.1.4",
198
198
  "htmlparser2": "10.0.0",
199
199
  "jsonc-parser": "3.2.1",
200
200
  "nx": "^21.4.1",
@@ -216,5 +216,5 @@
216
216
  "tsup": "8.4.0"
217
217
  },
218
218
  "publishConfig": { "access": "public" },
219
- "gitHead": "a65b87ef2f82c159996a3c45db514650df5d86ee"
219
+ "gitHead": "bf0e3ad2902fa0cd4613fe4896deea054a78a4be"
220
220
  }