@storm-software/git-tools 2.97.0 → 2.97.1

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 (3) hide show
  1. package/bin/git.cjs +57 -57
  2. package/bin/git.js +11 -11
  3. package/package.json +1 -1
package/bin/git.cjs CHANGED
@@ -80914,11 +80914,16 @@ var _workspaceroot = require('nx/src/utils/workspace-root');
80914
80914
 
80915
80915
  // src/utilities/generate-changelog-title.ts
80916
80916
  _chunkKK4YC43Scjs.init_cjs_shims.call(void 0, );
80917
- function generateChangelogTitle(version, project, workspaceConfig) {
80917
+ function generateChangelogTitle(version, project, excludeDate = false, workspaceConfig) {
80918
80918
  if (!_optionalChain([workspaceConfig, 'optionalAccess', _178 => _178.repository]) || !project) {
80919
80919
  return version;
80920
80920
  }
80921
- return `[${version}](${workspaceConfig.repository}/releases/tag/${project}%40${version})`;
80921
+ let maybeDateStr = "";
80922
+ if (excludeDate !== false) {
80923
+ const dateStr = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
80924
+ maybeDateStr = ` (${dateStr})`;
80925
+ }
80926
+ return `[${version}](${workspaceConfig.repository}/releases/tag/${project}%40${version})${maybeDateStr}`;
80922
80927
  }
80923
80928
  _chunkKK4YC43Scjs.__name.call(void 0, generateChangelogTitle, "generateChangelogTitle");
80924
80929
 
@@ -84454,12 +84459,7 @@ var StormChangelogRenderer = (_class13 = class extends _changelogrenderer2.defau
84454
84459
  }
84455
84460
  renderVersionTitle() {
84456
84461
  const isMajorVersion = `${(0, import_semver.major)(this.changelogEntryVersion)}.0.0` === this.changelogEntryVersion.replace(/^v/, "");
84457
- let maybeDateStr = "";
84458
- if (this.changelogRenderOptions.versionTitleDate) {
84459
- const dateStr = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
84460
- maybeDateStr = ` (${dateStr})`;
84461
- }
84462
- return isMajorVersion ? _optionalChain([this, 'access', _182 => _182.workspaceConfig, 'optionalAccess', _183 => _183.repository]) ? `# ${generateChangelogTitle(this.changelogEntryVersion, this.project, this.workspaceConfig)}${maybeDateStr}` : `# ${this.changelogEntryVersion}${maybeDateStr}` : _optionalChain([this, 'access', _184 => _184.workspaceConfig, 'optionalAccess', _185 => _185.repository]) ? `## ${generateChangelogTitle(this.changelogEntryVersion, this.project, this.workspaceConfig)}${maybeDateStr}` : `## ${this.changelogEntryVersion}${maybeDateStr}`;
84462
+ return isMajorVersion ? `# ${generateChangelogTitle(this.changelogEntryVersion, this.project, false, this.workspaceConfig)}` : `## ${generateChangelogTitle(this.changelogEntryVersion, this.project, false, this.workspaceConfig)}`;
84463
84463
  }
84464
84464
  renderBreakingChanges() {
84465
84465
  const uniqueBreakingChanges = Array.from(new Set(this.breakingChanges));
@@ -84475,7 +84475,7 @@ var StormChangelogRenderer = (_class13 = class extends _changelogrenderer2.defau
84475
84475
  "### Updated Dependencies",
84476
84476
  ""
84477
84477
  ];
84478
- _optionalChain([this, 'access', _186 => _186.dependencyBumps, 'optionalAccess', _187 => _187.forEach, 'call', _188 => _188(({ dependencyName, newVersion }) => {
84478
+ _optionalChain([this, 'access', _182 => _182.dependencyBumps, 'optionalAccess', _183 => _183.forEach, 'call', _184 => _184(({ dependencyName, newVersion }) => {
84479
84479
  markdownLines.push(`- Updated ${dependencyName} to ${newVersion}`);
84480
84480
  })]);
84481
84481
  return markdownLines;
@@ -84492,12 +84492,12 @@ var StormChangelogRenderer = (_class13 = class extends _changelogrenderer2.defau
84492
84492
  }
84493
84493
  for (const author of change.authors) {
84494
84494
  const name = this.formatName(author.name);
84495
- if (!name || name.includes("[bot]") || name === _optionalChain([this, 'access', _189 => _189.workspaceConfig, 'optionalAccess', _190 => _190.bot, 'access', _191 => _191.name])) {
84495
+ if (!name || name.includes("[bot]") || name === _optionalChain([this, 'access', _185 => _185.workspaceConfig, 'optionalAccess', _186 => _186.bot, 'access', _187 => _187.name])) {
84496
84496
  continue;
84497
84497
  }
84498
84498
  if (_authors.has(name)) {
84499
84499
  const entry = _authors.get(name);
84500
- _optionalChain([entry, 'optionalAccess', _192 => _192.email, 'access', _193 => _193.add, 'call', _194 => _194(author.email)]);
84500
+ _optionalChain([entry, 'optionalAccess', _188 => _188.email, 'access', _189 => _189.add, 'call', _190 => _190(author.email)]);
84501
84501
  } else {
84502
84502
  _authors.set(name, {
84503
84503
  email: /* @__PURE__ */ new Set([
@@ -84528,7 +84528,7 @@ var StormChangelogRenderer = (_class13 = class extends _changelogrenderer2.defau
84528
84528
  user: null
84529
84529
  }
84530
84530
  }));
84531
- if (_optionalChain([data, 'optionalAccess', _195 => _195.user])) {
84531
+ if (_optionalChain([data, 'optionalAccess', _191 => _191.user])) {
84532
84532
  meta.github = data.user.username;
84533
84533
  break;
84534
84534
  }
@@ -84619,7 +84619,7 @@ function createAPI(overrideReleaseConfig) {
84619
84619
  if (args.deleteVersionPlans === void 0) {
84620
84620
  args.deleteVersionPlans = true;
84621
84621
  }
84622
- const changelogGenerationEnabled = !!_optionalChain([nxReleaseConfig, 'optionalAccess', _196 => _196.changelog, 'access', _197 => _197.workspaceChangelog]) || _optionalChain([nxReleaseConfig, 'optionalAccess', _198 => _198.groups]) && Object.values(_optionalChain([nxReleaseConfig, 'optionalAccess', _199 => _199.groups])).some((g) => g.changelog);
84622
+ const changelogGenerationEnabled = !!_optionalChain([nxReleaseConfig, 'optionalAccess', _192 => _192.changelog, 'access', _193 => _193.workspaceChangelog]) || _optionalChain([nxReleaseConfig, 'optionalAccess', _194 => _194.groups]) && Object.values(_optionalChain([nxReleaseConfig, 'optionalAccess', _195 => _195.groups])).some((g) => g.changelog);
84623
84623
  if (!changelogGenerationEnabled) {
84624
84624
  _output.output.warn({
84625
84625
  title: `Changelogs are disabled. No changelog entries will be generated`,
@@ -84630,7 +84630,7 @@ function createAPI(overrideReleaseConfig) {
84630
84630
  return {};
84631
84631
  }
84632
84632
  const tree = new (0, _tree.FsTree)(_workspaceroot.workspaceRoot, !!args.verbose);
84633
- const useAutomaticFromRef = _optionalChain([nxReleaseConfig, 'optionalAccess', _200 => _200.changelog, 'optionalAccess', _201 => _201.automaticFromRef]) || args.firstRelease;
84633
+ const useAutomaticFromRef = _optionalChain([nxReleaseConfig, 'optionalAccess', _196 => _196.changelog, 'optionalAccess', _197 => _197.automaticFromRef]) || args.firstRelease;
84634
84634
  const { workspaceChangelogVersion, projectsVersionData } = resolveChangelogVersions(args, releaseGroups, releaseGroupToFilteredProjects);
84635
84635
  const to = args.to || "HEAD";
84636
84636
  const toSHA = await _git.getCommitHash.call(void 0, to);
@@ -84698,7 +84698,7 @@ function createAPI(overrideReleaseConfig) {
84698
84698
  }
84699
84699
  }
84700
84700
  } else {
84701
- let workspaceChangelogFromRef = args.from || await _asyncOptionalChain([(await _git.getLatestGitTagForPattern.call(void 0, nxReleaseConfig.releaseTagPattern, {}, nxReleaseConfig.releaseTagPatternCheckAllBranchesWhen)), 'optionalAccess', async _202 => _202.tag]);
84701
+ let workspaceChangelogFromRef = args.from || await _asyncOptionalChain([(await _git.getLatestGitTagForPattern.call(void 0, nxReleaseConfig.releaseTagPattern, {}, nxReleaseConfig.releaseTagPatternCheckAllBranchesWhen)), 'optionalAccess', async _198 => _198.tag]);
84702
84702
  if (!workspaceChangelogFromRef) {
84703
84703
  if (useAutomaticFromRef) {
84704
84704
  workspaceChangelogFromRef = await _git.getFirstGitCommit.call(void 0, );
@@ -84758,7 +84758,7 @@ function createAPI(overrideReleaseConfig) {
84758
84758
  const dependentProjects = (projectsVersionData[project].dependentProjects || []).map((dep) => {
84759
84759
  return {
84760
84760
  dependencyName: dep.source,
84761
- newVersion: _optionalChain([projectsVersionData, 'access', _203 => _203[dep.source], 'optionalAccess', _204 => _204.newVersion])
84761
+ newVersion: _optionalChain([projectsVersionData, 'access', _199 => _199[dep.source], 'optionalAccess', _200 => _200.newVersion])
84762
84762
  };
84763
84763
  }).filter((b) => b.newVersion !== null);
84764
84764
  for (const dependent of dependentProjects) {
@@ -84777,10 +84777,10 @@ function createAPI(overrideReleaseConfig) {
84777
84777
  if (config === false) {
84778
84778
  continue;
84779
84779
  }
84780
- const projects = _optionalChain([args, 'access', _205 => _205.projects, 'optionalAccess', _206 => _206.length]) ? Array.from(releaseGroupToFilteredProjects.get(releaseGroup)).flatMap((project) => {
84780
+ const projects = _optionalChain([args, 'access', _201 => _201.projects, 'optionalAccess', _202 => _202.length]) ? Array.from(releaseGroupToFilteredProjects.get(releaseGroup)).flatMap((project) => {
84781
84781
  return [
84782
84782
  project,
84783
- ..._optionalChain([projectsVersionData, 'access', _207 => _207[project], 'optionalAccess', _208 => _208.dependentProjects, 'access', _209 => _209.map, 'call', _210 => _210((dep) => dep.source)]) || []
84783
+ ..._optionalChain([projectsVersionData, 'access', _203 => _203[project], 'optionalAccess', _204 => _204.dependentProjects, 'access', _205 => _205.map, 'call', _206 => _206((dep) => dep.source)]) || []
84784
84784
  ];
84785
84785
  }) : releaseGroup.projects;
84786
84786
  const projectNodes = projects.map((name) => projectGraph.nodes[name]);
@@ -84816,12 +84816,12 @@ function createAPI(overrideReleaseConfig) {
84816
84816
  let fromRef = args.from || await _asyncOptionalChain([(await _git.getLatestGitTagForPattern.call(void 0, releaseGroup.releaseTagPattern, {
84817
84817
  projectName: project.name,
84818
84818
  releaseGroupName: releaseGroup.name
84819
- }, releaseGroup.releaseTagPatternCheckAllBranchesWhen)), 'optionalAccess', async _211 => _211.tag]);
84819
+ }, releaseGroup.releaseTagPatternCheckAllBranchesWhen)), 'optionalAccess', async _207 => _207.tag]);
84820
84820
  if (!fromRef && useAutomaticFromRef) {
84821
84821
  const firstCommit = await _git.getFirstGitCommit.call(void 0, );
84822
84822
  const allCommits = await getCommits(firstCommit, toSHA);
84823
84823
  const commitsForProject = allCommits.filter((c) => c.affectedFiles.find((f) => f.startsWith(project.data.root)));
84824
- fromRef = _optionalChain([commitsForProject, 'access', _212 => _212[0], 'optionalAccess', _213 => _213.shortHash]);
84824
+ fromRef = _optionalChain([commitsForProject, 'access', _208 => _208[0], 'optionalAccess', _209 => _209.shortHash]);
84825
84825
  if (args.verbose) {
84826
84826
  console.log(`Determined --from ref for ${project.name} from the first commit in which it exists: ${fromRef}`);
84827
84827
  }
@@ -84920,7 +84920,7 @@ function createAPI(overrideReleaseConfig) {
84920
84920
  return changes2;
84921
84921
  }).filter(Boolean);
84922
84922
  } else {
84923
- let fromRef = args.from || await _asyncOptionalChain([(await _git.getLatestGitTagForPattern.call(void 0, releaseGroup.releaseTagPattern, {}, releaseGroup.releaseTagPatternCheckAllBranchesWhen)), 'optionalAccess', async _214 => _214.tag]);
84923
+ let fromRef = args.from || await _asyncOptionalChain([(await _git.getLatestGitTagForPattern.call(void 0, releaseGroup.releaseTagPattern, {}, releaseGroup.releaseTagPatternCheckAllBranchesWhen)), 'optionalAccess', async _210 => _210.tag]);
84924
84924
  if (!fromRef) {
84925
84925
  if (useAutomaticFromRef) {
84926
84926
  fromRef = await _git.getFirstGitCommit.call(void 0, );
@@ -85138,7 +85138,7 @@ async function generateChangelogForWorkspace({ tree, args, projectGraph, nxRelea
85138
85138
  });
85139
85139
  return;
85140
85140
  }
85141
- if (_optionalChain([Object, 'access', _215 => _215.values, 'call', _216 => _216(nxReleaseConfig.groups), 'access', _217 => _217[0], 'optionalAccess', _218 => _218.projectsRelationship]) === "independent") {
85141
+ if (_optionalChain([Object, 'access', _211 => _211.values, 'call', _212 => _212(nxReleaseConfig.groups), 'access', _213 => _213[0], 'optionalAccess', _214 => _214.projectsRelationship]) === "independent") {
85142
85142
  _output.output.warn({
85143
85143
  title: `Workspace changelog is enabled, but you have configured an independent projects relationship. This is not supported, so workspace changelog will be disabled.`,
85144
85144
  bodyLines: [
@@ -85191,15 +85191,15 @@ async function generateChangelogForWorkspace({ tree, args, projectGraph, nxRelea
85191
85191
  );
85192
85192
  _fs.writeFileSync.call(void 0, changelogPath, contents);
85193
85193
  await _launcheditor.launchEditor.call(void 0, changelogPath);
85194
- contents = _fs.readFileSync.call(void 0, changelogPath, "utf-8");
85194
+ contents = _fs.readFileSync.call(void 0, changelogPath, "utf8");
85195
85195
  }
85196
85196
  if (interpolatedTreePath) {
85197
- let rootChangelogContents = tree.exists(interpolatedTreePath) ? _optionalChain([tree, 'access', _219 => _219.read, 'call', _220 => _220(interpolatedTreePath), 'optionalAccess', _221 => _221.toString, 'call', _222 => _222()]) : "";
85197
+ let rootChangelogContents = tree.exists(interpolatedTreePath) ? _optionalChain([tree, 'access', _215 => _215.read, 'call', _216 => _216(interpolatedTreePath), 'optionalAccess', _217 => _217.toString, 'call', _218 => _218()]) : "";
85198
85198
  if (rootChangelogContents) {
85199
85199
  const changelogReleases = _markdown.parseChangelogMarkdown.call(void 0, rootChangelogContents).releases;
85200
85200
  const existingVersionToUpdate = changelogReleases.find((r) => r.version === releaseVersion2.rawVersion);
85201
85201
  if (existingVersionToUpdate) {
85202
- rootChangelogContents = rootChangelogContents.replace(`## ${generateChangelogTitle(releaseVersion2.rawVersion, null, workspaceConfig)}
85202
+ rootChangelogContents = rootChangelogContents.replace(`## ${generateChangelogTitle(releaseVersion2.rawVersion, null, false, workspaceConfig)}
85203
85203
 
85204
85204
 
85205
85205
  ${existingVersionToUpdate.body}`, contents);
@@ -85243,7 +85243,7 @@ async function generateChangelogForProjects({ tree, args, changes, projectsVersi
85243
85243
  // within the tree, workspaceRoot is the root
85244
85244
  });
85245
85245
  }
85246
- if (!_optionalChain([projectsVersionData, 'access', _223 => _223[project.name], 'optionalAccess', _224 => _224.newVersion])) {
85246
+ if (!_optionalChain([projectsVersionData, 'access', _219 => _219[project.name], 'optionalAccess', _220 => _220.newVersion])) {
85247
85247
  continue;
85248
85248
  }
85249
85249
  const releaseVersion2 = new (0, _shared.ReleaseVersion)({
@@ -85287,12 +85287,12 @@ async function generateChangelogForProjects({ tree, args, changes, projectsVersi
85287
85287
  contents = _fs.readFileSync.call(void 0, changelogPath, "utf8");
85288
85288
  }
85289
85289
  if (interpolatedTreePath) {
85290
- let changelogContents = tree.exists(interpolatedTreePath) ? _optionalChain([tree, 'access', _225 => _225.read, 'call', _226 => _226(interpolatedTreePath), 'optionalAccess', _227 => _227.toString, 'call', _228 => _228()]) : "";
85290
+ let changelogContents = tree.exists(interpolatedTreePath) ? _optionalChain([tree, 'access', _221 => _221.read, 'call', _222 => _222(interpolatedTreePath), 'optionalAccess', _223 => _223.toString, 'call', _224 => _224()]) : "";
85291
85291
  if (changelogContents) {
85292
85292
  const changelogReleases = _markdown.parseChangelogMarkdown.call(void 0, changelogContents).releases;
85293
85293
  const existingVersionToUpdate = changelogReleases.find((r) => r.version === releaseVersion2.rawVersion);
85294
85294
  if (existingVersionToUpdate) {
85295
- changelogContents = changelogContents.replace(`## ${generateChangelogTitle(releaseVersion2.rawVersion, project.name, workspaceConfig)}
85295
+ changelogContents = changelogContents.replace(`## ${generateChangelogTitle(releaseVersion2.rawVersion, project.name, false, workspaceConfig)}
85296
85296
 
85297
85297
 
85298
85298
  ${existingVersionToUpdate.body}`, contents);
@@ -85533,7 +85533,7 @@ async function releaseVersion(config, args) {
85533
85533
  });
85534
85534
  const { projects } = _projectgraphjs.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
85535
85535
  const nxJson = _nxjsonjs.readNxJson.call(void 0, );
85536
- const workspaceRoot3 = _nullishCoalesce(_optionalChain([config, 'optionalAccess', _229 => _229.workspaceRoot]), () => ( _chunkLFH4CIZMcjs.findWorkspaceRoot.call(void 0, )));
85536
+ const workspaceRoot3 = _nullishCoalesce(_optionalChain([config, 'optionalAccess', _225 => _225.workspaceRoot]), () => ( _chunkLFH4CIZMcjs.findWorkspaceRoot.call(void 0, )));
85537
85537
  if (args.verbose) {
85538
85538
  process.env.NX_VERBOSE_LOGGING = "true";
85539
85539
  }
@@ -85541,7 +85541,7 @@ async function releaseVersion(config, args) {
85541
85541
  if (configError) {
85542
85542
  return await _configjs.handleNxReleaseConfigError.call(void 0, configError);
85543
85543
  }
85544
- if ((args.gitCommit === void 0 || args.gitTag === void 0 || args.stageChanges === void 0) && _optionalChain([nxJson, 'access', _230 => _230.release, 'optionalAccess', _231 => _231.git])) {
85544
+ if ((args.gitCommit === void 0 || args.gitTag === void 0 || args.stageChanges === void 0) && _optionalChain([nxJson, 'access', _226 => _226.release, 'optionalAccess', _227 => _227.git])) {
85545
85545
  await _resolvenxjsonerrormessagejs.resolveNxJsonConfigErrorMessage.call(void 0, [
85546
85546
  "release",
85547
85547
  "git"
@@ -85556,10 +85556,10 @@ async function releaseVersion(config, args) {
85556
85556
  }
85557
85557
  const tree = new (0, _treejs.FsTree)(workspaceRoot3, true);
85558
85558
  const versionData = {};
85559
- const commitMessage = args.gitCommitMessage || _optionalChain([nxReleaseConfig, 'optionalAccess', _232 => _232.version, 'access', _233 => _233.git, 'access', _234 => _234.commitMessage]);
85559
+ const commitMessage = args.gitCommitMessage || _optionalChain([nxReleaseConfig, 'optionalAccess', _228 => _228.version, 'access', _229 => _229.git, 'access', _230 => _230.commitMessage]);
85560
85560
  const additionalChangedFiles = /* @__PURE__ */ new Set();
85561
85561
  const generatorCallbacks = [];
85562
- if (_optionalChain([args, 'access', _235 => _235.projects, 'optionalAccess', _236 => _236.length])) {
85562
+ if (_optionalChain([args, 'access', _231 => _231.projects, 'optionalAccess', _232 => _232.length])) {
85563
85563
  _chunkLFH4CIZMcjs.writeInfo.call(void 0, "Run versioning for all remaining release groups and filtered projects within them", config);
85564
85564
  for (const releaseGroup of releaseGroups) {
85565
85565
  const releaseGroupName = releaseGroup.name;
@@ -85599,7 +85599,7 @@ async function releaseVersion(config, args) {
85599
85599
  });
85600
85600
  }
85601
85601
  }
85602
- const gitTagValues2 = _nullishCoalesce(args.gitTag, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess', _237 => _237.version, 'access', _238 => _238.git, 'access', _239 => _239.tag]))) ? _sharedjs.createGitTagValues.call(void 0, releaseGroups, releaseGroupToFilteredProjects, versionData) : [];
85602
+ const gitTagValues2 = _nullishCoalesce(args.gitTag, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess', _233 => _233.version, 'access', _234 => _234.git, 'access', _235 => _235.tag]))) ? _sharedjs.createGitTagValues.call(void 0, releaseGroups, releaseGroupToFilteredProjects, versionData) : [];
85603
85603
  _sharedjs.handleDuplicateGitTags.call(void 0, gitTagValues2);
85604
85604
  printAndFlushChanges2(config, tree, !!args.dryRun);
85605
85605
  for (const generatorCallback of generatorCallbacks) {
@@ -85616,15 +85616,15 @@ async function releaseVersion(config, args) {
85616
85616
  projectsVersionData: versionData
85617
85617
  };
85618
85618
  }
85619
- if (_nullishCoalesce(args.gitCommit, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess', _240 => _240.version, 'access', _241 => _241.git, 'access', _242 => _242.commit])))) {
85619
+ if (_nullishCoalesce(args.gitCommit, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess', _236 => _236.version, 'access', _237 => _237.git, 'access', _238 => _238.commit])))) {
85620
85620
  await _sharedjs.commitChanges.call(void 0, {
85621
85621
  changedFiles: changedFiles2,
85622
85622
  isDryRun: !!args.dryRun,
85623
85623
  isVerbose: !!args.verbose,
85624
85624
  gitCommitMessages: _sharedjs.createCommitMessageValues.call(void 0, releaseGroups, releaseGroupToFilteredProjects, versionData, commitMessage),
85625
- gitCommitArgs: args.gitCommitArgs || _optionalChain([nxReleaseConfig, 'optionalAccess', _243 => _243.version, 'access', _244 => _244.git, 'access', _245 => _245.commitArgs])
85625
+ gitCommitArgs: args.gitCommitArgs || _optionalChain([nxReleaseConfig, 'optionalAccess', _239 => _239.version, 'access', _240 => _240.git, 'access', _241 => _241.commitArgs])
85626
85626
  });
85627
- } else if (_nullishCoalesce(args.stageChanges, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess', _246 => _246.version, 'access', _247 => _247.git, 'access', _248 => _248.stageChanges])))) {
85627
+ } else if (_nullishCoalesce(args.stageChanges, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess', _242 => _242.version, 'access', _243 => _243.git, 'access', _244 => _244.stageChanges])))) {
85628
85628
  _chunkLFH4CIZMcjs.writeInfo.call(void 0, "Staging changed files with git", config);
85629
85629
  await _gitjs.gitAdd.call(void 0, {
85630
85630
  changedFiles: changedFiles2,
@@ -85632,13 +85632,13 @@ async function releaseVersion(config, args) {
85632
85632
  verbose: args.verbose
85633
85633
  });
85634
85634
  }
85635
- if (_nullishCoalesce(args.gitTag, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess', _249 => _249.version, 'access', _250 => _250.git, 'access', _251 => _251.tag])))) {
85635
+ if (_nullishCoalesce(args.gitTag, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess', _245 => _245.version, 'access', _246 => _246.git, 'access', _247 => _247.tag])))) {
85636
85636
  _chunkLFH4CIZMcjs.writeInfo.call(void 0, "Tagging commit with git", config);
85637
85637
  for (const tag of gitTagValues2) {
85638
85638
  await _gitjs.gitTag.call(void 0, {
85639
85639
  tag,
85640
- message: args.gitTagMessage || _optionalChain([nxReleaseConfig, 'optionalAccess', _252 => _252.version, 'access', _253 => _253.git, 'access', _254 => _254.tagMessage]),
85641
- additionalArgs: args.gitTagArgs || _optionalChain([nxReleaseConfig, 'optionalAccess', _255 => _255.version, 'access', _256 => _256.git, 'access', _257 => _257.tagArgs]),
85640
+ message: args.gitTagMessage || _optionalChain([nxReleaseConfig, 'optionalAccess', _248 => _248.version, 'access', _249 => _249.git, 'access', _250 => _250.tagMessage]),
85641
+ additionalArgs: args.gitTagArgs || _optionalChain([nxReleaseConfig, 'optionalAccess', _251 => _251.version, 'access', _252 => _252.git, 'access', _253 => _253.tagArgs]),
85642
85642
  dryRun: args.dryRun,
85643
85643
  verbose: args.verbose
85644
85644
  });
@@ -85685,7 +85685,7 @@ async function releaseVersion(config, args) {
85685
85685
  });
85686
85686
  }
85687
85687
  }
85688
- const gitTagValues = _nullishCoalesce(args.gitTag, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess', _258 => _258.version, 'access', _259 => _259.git, 'access', _260 => _260.tag]))) ? _sharedjs.createGitTagValues.call(void 0, releaseGroups, releaseGroupToFilteredProjects, versionData) : [];
85688
+ const gitTagValues = _nullishCoalesce(args.gitTag, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess', _254 => _254.version, 'access', _255 => _255.git, 'access', _256 => _256.tag]))) ? _sharedjs.createGitTagValues.call(void 0, releaseGroups, releaseGroupToFilteredProjects, versionData) : [];
85689
85689
  _sharedjs.handleDuplicateGitTags.call(void 0, gitTagValues);
85690
85690
  printAndFlushChanges2(config, tree, !!args.dryRun);
85691
85691
  for (const generatorCallback of generatorCallbacks) {
@@ -85694,10 +85694,10 @@ async function releaseVersion(config, args) {
85694
85694
  let workspaceVersion = void 0;
85695
85695
  if (releaseGroups.length === 1) {
85696
85696
  const releaseGroup = releaseGroups[0];
85697
- if (_optionalChain([releaseGroup, 'optionalAccess', _261 => _261.projectsRelationship]) === "fixed") {
85697
+ if (_optionalChain([releaseGroup, 'optionalAccess', _257 => _257.projectsRelationship]) === "fixed") {
85698
85698
  const releaseGroupProjectNames = Array.from(_nullishCoalesce(releaseGroupToFilteredProjects.get(releaseGroup), () => ( [])));
85699
85699
  if (releaseGroupProjectNames.length > 0 && releaseGroupProjectNames[0]) {
85700
- workspaceVersion = _optionalChain([versionData, 'access', _262 => _262[releaseGroupProjectNames[0]], 'optionalAccess', _263 => _263.newVersion]);
85700
+ workspaceVersion = _optionalChain([versionData, 'access', _258 => _258[releaseGroupProjectNames[0]], 'optionalAccess', _259 => _259.newVersion]);
85701
85701
  }
85702
85702
  }
85703
85703
  }
@@ -85711,15 +85711,15 @@ async function releaseVersion(config, args) {
85711
85711
  projectsVersionData: versionData
85712
85712
  };
85713
85713
  }
85714
- if (_nullishCoalesce(args.gitCommit, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess', _264 => _264.version, 'access', _265 => _265.git, 'access', _266 => _266.commit])))) {
85714
+ if (_nullishCoalesce(args.gitCommit, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess', _260 => _260.version, 'access', _261 => _261.git, 'access', _262 => _262.commit])))) {
85715
85715
  await _sharedjs.commitChanges.call(void 0, {
85716
85716
  changedFiles,
85717
85717
  isDryRun: !!args.dryRun,
85718
85718
  isVerbose: !!args.verbose,
85719
85719
  gitCommitMessages: _sharedjs.createCommitMessageValues.call(void 0, releaseGroups, releaseGroupToFilteredProjects, versionData, commitMessage),
85720
- gitCommitArgs: args.gitCommitArgs || _optionalChain([nxReleaseConfig, 'optionalAccess', _267 => _267.version, 'access', _268 => _268.git, 'access', _269 => _269.commitArgs])
85720
+ gitCommitArgs: args.gitCommitArgs || _optionalChain([nxReleaseConfig, 'optionalAccess', _263 => _263.version, 'access', _264 => _264.git, 'access', _265 => _265.commitArgs])
85721
85721
  });
85722
- } else if (_nullishCoalesce(args.stageChanges, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess', _270 => _270.version, 'access', _271 => _271.git, 'access', _272 => _272.stageChanges])))) {
85722
+ } else if (_nullishCoalesce(args.stageChanges, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess', _266 => _266.version, 'access', _267 => _267.git, 'access', _268 => _268.stageChanges])))) {
85723
85723
  _chunkLFH4CIZMcjs.writeInfo.call(void 0, "Staging changed files with git", config);
85724
85724
  await _gitjs.gitAdd.call(void 0, {
85725
85725
  changedFiles,
@@ -85727,13 +85727,13 @@ async function releaseVersion(config, args) {
85727
85727
  verbose: args.verbose
85728
85728
  });
85729
85729
  }
85730
- if (_nullishCoalesce(args.gitTag, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess', _273 => _273.version, 'access', _274 => _274.git, 'access', _275 => _275.tag])))) {
85730
+ if (_nullishCoalesce(args.gitTag, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess', _269 => _269.version, 'access', _270 => _270.git, 'access', _271 => _271.tag])))) {
85731
85731
  _chunkLFH4CIZMcjs.writeInfo.call(void 0, "Tagging commit with git", config);
85732
85732
  for (const tag of gitTagValues) {
85733
85733
  await _gitjs.gitTag.call(void 0, {
85734
85734
  tag,
85735
- message: args.gitTagMessage || _optionalChain([nxReleaseConfig, 'optionalAccess', _276 => _276.version, 'access', _277 => _277.git, 'access', _278 => _278.tagMessage]),
85736
- additionalArgs: args.gitTagArgs || _optionalChain([nxReleaseConfig, 'optionalAccess', _279 => _279.version, 'access', _280 => _280.git, 'access', _281 => _281.tagArgs]),
85735
+ message: args.gitTagMessage || _optionalChain([nxReleaseConfig, 'optionalAccess', _272 => _272.version, 'access', _273 => _273.git, 'access', _274 => _274.tagMessage]),
85736
+ additionalArgs: args.gitTagArgs || _optionalChain([nxReleaseConfig, 'optionalAccess', _275 => _275.version, 'access', _276 => _276.git, 'access', _277 => _277.tagArgs]),
85737
85737
  dryRun: args.dryRun,
85738
85738
  verbose: args.verbose
85739
85739
  });
@@ -85756,7 +85756,7 @@ async function releaseVersion(config, args) {
85756
85756
  }
85757
85757
  _chunkKK4YC43Scjs.__name.call(void 0, releaseVersion, "releaseVersion");
85758
85758
  async function runVersionOnProjects(config, projectGraph, nxJson, args, tree, generatorData, projectNames, releaseGroup, versionData) {
85759
- const workspaceRoot3 = _nullishCoalesce(_optionalChain([config, 'optionalAccess', _282 => _282.workspaceRoot]), () => ( _chunkLFH4CIZMcjs.findWorkspaceRoot.call(void 0, )));
85759
+ const workspaceRoot3 = _nullishCoalesce(_optionalChain([config, 'optionalAccess', _278 => _278.workspaceRoot]), () => ( _chunkLFH4CIZMcjs.findWorkspaceRoot.call(void 0, )));
85760
85760
  const generatorOptions = {
85761
85761
  // Always ensure a string to avoid generator schema validation errors
85762
85762
  specifier: _nullishCoalesce(args.specifier, () => ( "")),
@@ -85784,11 +85784,11 @@ function printAndFlushChanges2(config, tree, isDryRun) {
85784
85784
  for (const f of changes) {
85785
85785
  if (f.type === "CREATE") {
85786
85786
  _chunkLFH4CIZMcjs.writeInfo.call(void 0, `CREATE ${f.path}${isDryRun ? " [dry-run]" : ""}`, config);
85787
- _printchangesjs.printDiff.call(void 0, "", _optionalChain([f, 'access', _283 => _283.content, 'optionalAccess', _284 => _284.toString, 'call', _285 => _285()]) || "");
85787
+ _printchangesjs.printDiff.call(void 0, "", _optionalChain([f, 'access', _279 => _279.content, 'optionalAccess', _280 => _280.toString, 'call', _281 => _281()]) || "");
85788
85788
  } else if (f.type === "UPDATE") {
85789
85789
  _chunkLFH4CIZMcjs.writeInfo.call(void 0, `UPDATE ${f.path}${isDryRun ? " [dry-run]" : ""}`, config);
85790
85790
  const currentContentsOnDisk = _fs.readFileSync.call(void 0, (0, import_devkit.joinPathFragments)(tree.root, f.path)).toString();
85791
- _printchangesjs.printDiff.call(void 0, currentContentsOnDisk, _optionalChain([f, 'access', _286 => _286.content, 'optionalAccess', _287 => _287.toString, 'call', _288 => _288()]) || "");
85791
+ _printchangesjs.printDiff.call(void 0, currentContentsOnDisk, _optionalChain([f, 'access', _282 => _282.content, 'optionalAccess', _283 => _283.toString, 'call', _284 => _284()]) || "");
85792
85792
  } else if (f.type === "DELETE") {
85793
85793
  throw new Error("Unexpected DELETE change, please report this as an issue");
85794
85794
  }
@@ -85867,9 +85867,9 @@ var runRelease = /* @__PURE__ */ _chunkKK4YC43Scjs.__name.call(void 0, async (co
85867
85867
  - From: ${from}
85868
85868
  - To: ${to}
85869
85869
  `, config);
85870
- if (_optionalChain([nxJson, 'access', _289 => _289.release, 'optionalAccess', _290 => _290.groups])) {
85870
+ if (_optionalChain([nxJson, 'access', _285 => _285.release, 'optionalAccess', _286 => _286.groups])) {
85871
85871
  nxJson.release.groups = Object.keys(nxJson.release.groups).reduce((ret, groupName) => {
85872
- const groupConfig = _optionalChain([nxJson, 'access', _291 => _291.release, 'optionalAccess', _292 => _292.groups, 'optionalAccess', _293 => _293[groupName]]);
85872
+ const groupConfig = _optionalChain([nxJson, 'access', _287 => _287.release, 'optionalAccess', _288 => _288.groups, 'optionalAccess', _289 => _289[groupName]]);
85873
85873
  ret[groupName] = _chunkP2CHIYIKcjs.defu.call(void 0, groupConfig, DEFAULT_RELEASE_GROUP_CONFIG);
85874
85874
  return ret;
85875
85875
  }, {});
@@ -85892,7 +85892,7 @@ var runRelease = /* @__PURE__ */ _chunkKK4YC43Scjs.__name.call(void 0, async (co
85892
85892
  });
85893
85893
  await releaseChangelog({
85894
85894
  ...options,
85895
- version: _optionalChain([nxReleaseConfig, 'optionalAccess', _294 => _294.projectsRelationship]) !== "fixed" ? void 0 : workspaceVersion,
85895
+ version: _optionalChain([nxReleaseConfig, 'optionalAccess', _290 => _290.projectsRelationship]) !== "fixed" ? void 0 : workspaceVersion,
85896
85896
  versionData: projectsVersionData,
85897
85897
  dryRun: false,
85898
85898
  verbose: _chunkLFH4CIZMcjs.isVerbose.call(void 0, config.logLevel),
@@ -85905,7 +85905,7 @@ var runRelease = /* @__PURE__ */ _chunkKK4YC43Scjs.__name.call(void 0, async (co
85905
85905
  if (options.skipPublish) {
85906
85906
  _chunkLFH4CIZMcjs.writeWarning.call(void 0, "Skipping publishing packages since `skipPublish` was provided as `true` in the release options.", config);
85907
85907
  } else {
85908
- const changedProjects = Object.keys(projectsVersionData).filter((key) => _optionalChain([projectsVersionData, 'access', _295 => _295[key], 'optionalAccess', _296 => _296.newVersion]));
85908
+ const changedProjects = Object.keys(projectsVersionData).filter((key) => _optionalChain([projectsVersionData, 'access', _291 => _291[key], 'optionalAccess', _292 => _292.newVersion]));
85909
85909
  if (changedProjects.length > 0) {
85910
85910
  _chunkLFH4CIZMcjs.writeInfo.call(void 0, `Publishing release for ${changedProjects.length} ${changedProjects.length === 1 ? "project" : "projects"}:
85911
85911
  ${changedProjects.map((changedProject) => ` - ${changedProject}`).join("\n")}
@@ -85915,12 +85915,12 @@ ${changedProjects.map((changedProject) => ` - ${changedProject}`).join("\n")}
85915
85915
  dryRun: !!options.dryRun,
85916
85916
  verbose: _chunkLFH4CIZMcjs.isVerbose.call(void 0, config.logLevel)
85917
85917
  });
85918
- const failedProjects = Object.keys(result2).filter((key) => _optionalChain([result2, 'access', _297 => _297[key], 'optionalAccess', _298 => _298.code]) && _optionalChain([result2, 'access', _299 => _299[key], 'optionalAccess', _300 => _300.code]) > 0);
85918
+ const failedProjects = Object.keys(result2).filter((key) => _optionalChain([result2, 'access', _293 => _293[key], 'optionalAccess', _294 => _294.code]) && _optionalChain([result2, 'access', _295 => _295[key], 'optionalAccess', _296 => _296.code]) > 0);
85919
85919
  if (failedProjects.length > 0) {
85920
85920
  throw new Error(`The Storm release process was not completed successfully! One or more errors occured while running the \`nx-release-publish\` executor tasks.
85921
85921
 
85922
85922
  Please review the workflow details for the following project(s):
85923
- ${failedProjects.map((failedProject) => ` - ${failedProject} (Error Code: ${_optionalChain([result2, 'access', _301 => _301[failedProject], 'optionalAccess', _302 => _302.code])})`).join("\n")}
85923
+ ${failedProjects.map((failedProject) => ` - ${failedProject} (Error Code: ${_optionalChain([result2, 'access', _297 => _297[failedProject], 'optionalAccess', _298 => _298.code])})`).join("\n")}
85924
85924
  `);
85925
85925
  }
85926
85926
  } else {
package/bin/git.js CHANGED
@@ -80913,11 +80913,16 @@ import { workspaceRoot } from "nx/src/utils/workspace-root";
80913
80913
 
80914
80914
  // src/utilities/generate-changelog-title.ts
80915
80915
  init_esm_shims();
80916
- function generateChangelogTitle(version, project, workspaceConfig) {
80916
+ function generateChangelogTitle(version, project, excludeDate = false, workspaceConfig) {
80917
80917
  if (!workspaceConfig?.repository || !project) {
80918
80918
  return version;
80919
80919
  }
80920
- return `[${version}](${workspaceConfig.repository}/releases/tag/${project}%40${version})`;
80920
+ let maybeDateStr = "";
80921
+ if (excludeDate !== false) {
80922
+ const dateStr = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
80923
+ maybeDateStr = ` (${dateStr})`;
80924
+ }
80925
+ return `[${version}](${workspaceConfig.repository}/releases/tag/${project}%40${version})${maybeDateStr}`;
80921
80926
  }
80922
80927
  __name(generateChangelogTitle, "generateChangelogTitle");
80923
80928
 
@@ -84453,12 +84458,7 @@ var StormChangelogRenderer = class extends DefaultChangelogRenderer {
84453
84458
  }
84454
84459
  renderVersionTitle() {
84455
84460
  const isMajorVersion = `${(0, import_semver.major)(this.changelogEntryVersion)}.0.0` === this.changelogEntryVersion.replace(/^v/, "");
84456
- let maybeDateStr = "";
84457
- if (this.changelogRenderOptions.versionTitleDate) {
84458
- const dateStr = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
84459
- maybeDateStr = ` (${dateStr})`;
84460
- }
84461
- return isMajorVersion ? this.workspaceConfig?.repository ? `# ${generateChangelogTitle(this.changelogEntryVersion, this.project, this.workspaceConfig)}${maybeDateStr}` : `# ${this.changelogEntryVersion}${maybeDateStr}` : this.workspaceConfig?.repository ? `## ${generateChangelogTitle(this.changelogEntryVersion, this.project, this.workspaceConfig)}${maybeDateStr}` : `## ${this.changelogEntryVersion}${maybeDateStr}`;
84461
+ return isMajorVersion ? `# ${generateChangelogTitle(this.changelogEntryVersion, this.project, false, this.workspaceConfig)}` : `## ${generateChangelogTitle(this.changelogEntryVersion, this.project, false, this.workspaceConfig)}`;
84462
84462
  }
84463
84463
  renderBreakingChanges() {
84464
84464
  const uniqueBreakingChanges = Array.from(new Set(this.breakingChanges));
@@ -85190,7 +85190,7 @@ async function generateChangelogForWorkspace({ tree, args, projectGraph, nxRelea
85190
85190
  );
85191
85191
  writeFileSync3(changelogPath, contents);
85192
85192
  await launchEditor(changelogPath);
85193
- contents = readFileSync4(changelogPath, "utf-8");
85193
+ contents = readFileSync4(changelogPath, "utf8");
85194
85194
  }
85195
85195
  if (interpolatedTreePath) {
85196
85196
  let rootChangelogContents = tree.exists(interpolatedTreePath) ? tree.read(interpolatedTreePath)?.toString() : "";
@@ -85198,7 +85198,7 @@ async function generateChangelogForWorkspace({ tree, args, projectGraph, nxRelea
85198
85198
  const changelogReleases = parseChangelogMarkdown(rootChangelogContents).releases;
85199
85199
  const existingVersionToUpdate = changelogReleases.find((r) => r.version === releaseVersion2.rawVersion);
85200
85200
  if (existingVersionToUpdate) {
85201
- rootChangelogContents = rootChangelogContents.replace(`## ${generateChangelogTitle(releaseVersion2.rawVersion, null, workspaceConfig)}
85201
+ rootChangelogContents = rootChangelogContents.replace(`## ${generateChangelogTitle(releaseVersion2.rawVersion, null, false, workspaceConfig)}
85202
85202
 
85203
85203
 
85204
85204
  ${existingVersionToUpdate.body}`, contents);
@@ -85291,7 +85291,7 @@ async function generateChangelogForProjects({ tree, args, changes, projectsVersi
85291
85291
  const changelogReleases = parseChangelogMarkdown(changelogContents).releases;
85292
85292
  const existingVersionToUpdate = changelogReleases.find((r) => r.version === releaseVersion2.rawVersion);
85293
85293
  if (existingVersionToUpdate) {
85294
- changelogContents = changelogContents.replace(`## ${generateChangelogTitle(releaseVersion2.rawVersion, project.name, workspaceConfig)}
85294
+ changelogContents = changelogContents.replace(`## ${generateChangelogTitle(releaseVersion2.rawVersion, project.name, false, workspaceConfig)}
85295
85295
 
85296
85296
 
85297
85297
  ${existingVersionToUpdate.body}`, contents);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/git-tools",
3
- "version": "2.97.0",
3
+ "version": "2.97.1",
4
4
  "type": "module",
5
5
  "description": "Tools for managing Git repositories within a Nx workspace.",
6
6
  "repository": {