@storm-software/git-tools 2.115.11 → 2.115.13

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.115.9-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.115.12-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 -->
@@ -40,7 +40,6 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
40
40
 
41
41
  <!-- START doctoc -->
42
42
  <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
43
-
44
43
  ## Table of Contents
45
44
 
46
45
  - [Storm Git Tools](#storm-git-tools)
package/bin/git.cjs CHANGED
@@ -2326,6 +2326,40 @@ function parseChangelogMarkdown(contents) {
2326
2326
  releases
2327
2327
  };
2328
2328
  }
2329
+ function createGitTagValues(releaseGroups, releaseGroupToFilteredProjects, versionData) {
2330
+ const tags = [];
2331
+ for (const releaseGroup of releaseGroups) {
2332
+ const releaseGroupProjectNames = Array.from(
2333
+ releaseGroupToFilteredProjects.get(releaseGroup) ?? []
2334
+ );
2335
+ if (releaseGroup.projectsRelationship === "independent") {
2336
+ for (const project of releaseGroupProjectNames) {
2337
+ const projectVersionData = versionData[project];
2338
+ if (projectVersionData?.newVersion) {
2339
+ tags.push(
2340
+ utils.interpolate(releaseGroup.releaseTagPattern, {
2341
+ version: projectVersionData.newVersion,
2342
+ projectName: project
2343
+ })
2344
+ );
2345
+ }
2346
+ }
2347
+ continue;
2348
+ }
2349
+ if (releaseGroupProjectNames.length > 0 && releaseGroupProjectNames[0]) {
2350
+ const projectVersionData = versionData[releaseGroupProjectNames[0]];
2351
+ if (projectVersionData?.newVersion) {
2352
+ tags.push(
2353
+ utils.interpolate(releaseGroup.releaseTagPattern, {
2354
+ version: projectVersionData.newVersion,
2355
+ releaseGroupName: releaseGroup.name
2356
+ })
2357
+ );
2358
+ }
2359
+ }
2360
+ }
2361
+ return tags;
2362
+ }
2329
2363
  async function gitTag({
2330
2364
  tag,
2331
2365
  message,
@@ -3092,13 +3126,10 @@ function createAPI(overrideReleaseConfig) {
3092
3126
  projectsVersionData,
3093
3127
  commitMessage
3094
3128
  );
3095
- const actualProjectsVersionData = Object.fromEntries(
3096
- Object.entries(projectsVersionData).filter(([, data]) => data?.newVersion)
3097
- );
3098
- const gitTagValues = args.gitTag ?? nxReleaseConfig.changelog?.git.tag ? shared.createGitTagValues(
3129
+ const gitTagValues = args.gitTag ?? nxReleaseConfig.changelog?.git.tag ? createGitTagValues(
3099
3130
  releaseGroups,
3100
3131
  releaseGroupToFilteredProjects,
3101
- actualProjectsVersionData
3132
+ projectsVersionData
3102
3133
  ) : [];
3103
3134
  shared.handleDuplicateGitTags(gitTagValues);
3104
3135
  const postGitTasks = [];
@@ -3248,20 +3279,20 @@ ${contents}`);
3248
3279
  continue;
3249
3280
  }
3250
3281
  for (const project of releaseGroup.projects) {
3251
- if (!actualProjectsVersionData[project]?.newVersion) {
3282
+ if (!projectsVersionData[project]?.newVersion) {
3252
3283
  continue;
3253
3284
  }
3254
- const dependentProjects = (actualProjectsVersionData[project].dependentProjects || []).map((dep) => {
3285
+ const dependentProjects = (projectsVersionData[project].dependentProjects || []).map((dep) => {
3255
3286
  return {
3256
3287
  dependencyName: dep.source,
3257
- newVersion: actualProjectsVersionData[dep.source]?.newVersion
3288
+ newVersion: projectsVersionData[dep.source]?.newVersion
3258
3289
  };
3259
3290
  }).filter((b) => b.newVersion !== null);
3260
3291
  for (const dependent of dependentProjects) {
3261
3292
  const additionalDependencyBumpsForProject = (projectToAdditionalDependencyBumps.has(dependent.dependencyName) ? projectToAdditionalDependencyBumps.get(dependent.dependencyName) : []) ?? [];
3262
3293
  additionalDependencyBumpsForProject.push({
3263
3294
  dependencyName: project,
3264
- newVersion: actualProjectsVersionData[project].newVersion
3295
+ newVersion: projectsVersionData[project].newVersion
3265
3296
  });
3266
3297
  projectToAdditionalDependencyBumps.set(
3267
3298
  dependent.dependencyName,
@@ -3282,7 +3313,7 @@ ${contents}`);
3282
3313
  (project) => {
3283
3314
  return [
3284
3315
  project,
3285
- ...actualProjectsVersionData[project]?.dependentProjects.map(
3316
+ ...projectsVersionData[project]?.dependentProjects.map(
3286
3317
  (dep) => dep.source
3287
3318
  ) || []
3288
3319
  ];
@@ -3378,7 +3409,7 @@ ${contents}`);
3378
3409
  tree: tree$1,
3379
3410
  args,
3380
3411
  changes,
3381
- projectsVersionData: actualProjectsVersionData,
3412
+ projectsVersionData,
3382
3413
  releaseGroup,
3383
3414
  projects: [project],
3384
3415
  nxReleaseConfig,
@@ -3507,7 +3538,7 @@ ${contents}`);
3507
3538
  tree: tree$1,
3508
3539
  args,
3509
3540
  changes,
3510
- projectsVersionData: actualProjectsVersionData,
3541
+ projectsVersionData,
3511
3542
  releaseGroup,
3512
3543
  projects: projectNodes,
3513
3544
  nxReleaseConfig,
package/bin/git.js CHANGED
@@ -38,7 +38,7 @@ import { printAndFlushChanges, printDiff } from 'nx/src/command-line/release/uti
38
38
  import { printConfigAndExit } from 'nx/src/command-line/release/utils/print-config';
39
39
  import { defaultCreateReleaseProvider, GithubRemoteReleaseClient } from 'nx/src/command-line/release/utils/remote-release-clients/github';
40
40
  import { resolveNxJsonConfigErrorMessage } from 'nx/src/command-line/release/utils/resolve-nx-json-error-message';
41
- import { createCommitMessageValues, createGitTagValues, handleDuplicateGitTags, ReleaseVersion, noDiffInChangelogMessage } from 'nx/src/command-line/release/utils/shared';
41
+ import { createCommitMessageValues, handleDuplicateGitTags, ReleaseVersion, noDiffInChangelogMessage } from 'nx/src/command-line/release/utils/shared';
42
42
  import { readNxJson as readNxJson$1 } from 'nx/src/config/nx-json';
43
43
  import { FsTree } from 'nx/src/generators/tree';
44
44
  import { createProjectFileMapUsingProjectGraph, createFileMapUsingProjectGraph } from 'nx/src/project-graph/file-map-utils';
@@ -2309,6 +2309,40 @@ function parseChangelogMarkdown(contents) {
2309
2309
  releases
2310
2310
  };
2311
2311
  }
2312
+ function createGitTagValues(releaseGroups, releaseGroupToFilteredProjects, versionData) {
2313
+ const tags = [];
2314
+ for (const releaseGroup of releaseGroups) {
2315
+ const releaseGroupProjectNames = Array.from(
2316
+ releaseGroupToFilteredProjects.get(releaseGroup) ?? []
2317
+ );
2318
+ if (releaseGroup.projectsRelationship === "independent") {
2319
+ for (const project of releaseGroupProjectNames) {
2320
+ const projectVersionData = versionData[project];
2321
+ if (projectVersionData?.newVersion) {
2322
+ tags.push(
2323
+ interpolate(releaseGroup.releaseTagPattern, {
2324
+ version: projectVersionData.newVersion,
2325
+ projectName: project
2326
+ })
2327
+ );
2328
+ }
2329
+ }
2330
+ continue;
2331
+ }
2332
+ if (releaseGroupProjectNames.length > 0 && releaseGroupProjectNames[0]) {
2333
+ const projectVersionData = versionData[releaseGroupProjectNames[0]];
2334
+ if (projectVersionData?.newVersion) {
2335
+ tags.push(
2336
+ interpolate(releaseGroup.releaseTagPattern, {
2337
+ version: projectVersionData.newVersion,
2338
+ releaseGroupName: releaseGroup.name
2339
+ })
2340
+ );
2341
+ }
2342
+ }
2343
+ }
2344
+ return tags;
2345
+ }
2312
2346
  async function gitTag({
2313
2347
  tag,
2314
2348
  message,
@@ -3075,13 +3109,10 @@ function createAPI(overrideReleaseConfig) {
3075
3109
  projectsVersionData,
3076
3110
  commitMessage
3077
3111
  );
3078
- const actualProjectsVersionData = Object.fromEntries(
3079
- Object.entries(projectsVersionData).filter(([, data]) => data?.newVersion)
3080
- );
3081
3112
  const gitTagValues = args.gitTag ?? nxReleaseConfig.changelog?.git.tag ? createGitTagValues(
3082
3113
  releaseGroups,
3083
3114
  releaseGroupToFilteredProjects,
3084
- actualProjectsVersionData
3115
+ projectsVersionData
3085
3116
  ) : [];
3086
3117
  handleDuplicateGitTags(gitTagValues);
3087
3118
  const postGitTasks = [];
@@ -3231,20 +3262,20 @@ ${contents}`);
3231
3262
  continue;
3232
3263
  }
3233
3264
  for (const project of releaseGroup.projects) {
3234
- if (!actualProjectsVersionData[project]?.newVersion) {
3265
+ if (!projectsVersionData[project]?.newVersion) {
3235
3266
  continue;
3236
3267
  }
3237
- const dependentProjects = (actualProjectsVersionData[project].dependentProjects || []).map((dep) => {
3268
+ const dependentProjects = (projectsVersionData[project].dependentProjects || []).map((dep) => {
3238
3269
  return {
3239
3270
  dependencyName: dep.source,
3240
- newVersion: actualProjectsVersionData[dep.source]?.newVersion
3271
+ newVersion: projectsVersionData[dep.source]?.newVersion
3241
3272
  };
3242
3273
  }).filter((b) => b.newVersion !== null);
3243
3274
  for (const dependent of dependentProjects) {
3244
3275
  const additionalDependencyBumpsForProject = (projectToAdditionalDependencyBumps.has(dependent.dependencyName) ? projectToAdditionalDependencyBumps.get(dependent.dependencyName) : []) ?? [];
3245
3276
  additionalDependencyBumpsForProject.push({
3246
3277
  dependencyName: project,
3247
- newVersion: actualProjectsVersionData[project].newVersion
3278
+ newVersion: projectsVersionData[project].newVersion
3248
3279
  });
3249
3280
  projectToAdditionalDependencyBumps.set(
3250
3281
  dependent.dependencyName,
@@ -3265,7 +3296,7 @@ ${contents}`);
3265
3296
  (project) => {
3266
3297
  return [
3267
3298
  project,
3268
- ...actualProjectsVersionData[project]?.dependentProjects.map(
3299
+ ...projectsVersionData[project]?.dependentProjects.map(
3269
3300
  (dep) => dep.source
3270
3301
  ) || []
3271
3302
  ];
@@ -3361,7 +3392,7 @@ ${contents}`);
3361
3392
  tree,
3362
3393
  args,
3363
3394
  changes,
3364
- projectsVersionData: actualProjectsVersionData,
3395
+ projectsVersionData,
3365
3396
  releaseGroup,
3366
3397
  projects: [project],
3367
3398
  nxReleaseConfig,
@@ -3490,7 +3521,7 @@ ${contents}`);
3490
3521
  tree,
3491
3522
  args,
3492
3523
  changes,
3493
- projectsVersionData: actualProjectsVersionData,
3524
+ projectsVersionData,
3494
3525
  releaseGroup,
3495
3526
  projects: projectNodes,
3496
3527
  nxReleaseConfig,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/git-tools",
3
- "version": "2.115.11",
3
+ "version": "2.115.13",
4
4
  "type": "module",
5
5
  "description": "Tools for managing Git repositories within a Nx workspace.",
6
6
  "repository": {
@@ -221,8 +221,8 @@
221
221
  "@inquirer/prompts": "7.2.1",
222
222
  "@nx/devkit": "^21.4.1",
223
223
  "@nx/js": "^21.4.1",
224
- "@storm-software/config": "^1.128.10",
225
- "@storm-software/config-tools": "^1.180.11",
224
+ "@storm-software/config": "^1.128.12",
225
+ "@storm-software/config-tools": "^1.180.13",
226
226
  "@textlint/ast-node-types": "14.4.2",
227
227
  "@textlint/markdown-to-ast": "14.4.2",
228
228
  "anchor-markdown-header": "0.7.0",
@@ -251,5 +251,5 @@
251
251
  "tsup": "8.4.0"
252
252
  },
253
253
  "publishConfig": { "access": "public" },
254
- "gitHead": "10a92f5561a4a5a533eb7094083dabcf1046fbbe"
254
+ "gitHead": "99ce6b979dc4fb39d2c34edbebfb26b20dc3ba9d"
255
255
  }