@storm-software/git-tools 2.115.12 → 2.115.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -2
- package/bin/git.cjs +44 -21
- package/bin/git.js +44 -21
- package/package.json +4 -4
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
|
-
[](https://prettier.io/) [](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://fumadocs.vercel.app/) 
|
|
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,
|
|
@@ -3086,27 +3120,16 @@ function createAPI(overrideReleaseConfig) {
|
|
|
3086
3120
|
);
|
|
3087
3121
|
}
|
|
3088
3122
|
const commitMessage = args.gitCommitMessage || nxReleaseConfig.changelog?.git?.commitMessage;
|
|
3089
|
-
const actualProjectsVersionData = Object.fromEntries(
|
|
3090
|
-
Object.entries(projectsVersionData).filter(
|
|
3091
|
-
([, data]) => data && semver.valid(data.newVersion)
|
|
3092
|
-
)
|
|
3093
|
-
);
|
|
3094
|
-
chunkXH6F7XTV_cjs.writeInfo(
|
|
3095
|
-
`Preparing to release the following projects:
|
|
3096
|
-
${Object.entries(actualProjectsVersionData).map(
|
|
3097
|
-
([project, versionData]) => `- ${project}: ${versionData.currentVersion ? `${versionData.currentVersion} -> ${versionData.newVersion}` : versionData.newVersion}`
|
|
3098
|
-
).join("\n")}`
|
|
3099
|
-
);
|
|
3100
3123
|
const commitMessageValues = shared.createCommitMessageValues(
|
|
3101
3124
|
releaseGroups,
|
|
3102
3125
|
releaseGroupToFilteredProjects,
|
|
3103
|
-
|
|
3126
|
+
projectsVersionData,
|
|
3104
3127
|
commitMessage
|
|
3105
3128
|
);
|
|
3106
|
-
const gitTagValues = args.gitTag ?? nxReleaseConfig.changelog?.git.tag ?
|
|
3129
|
+
const gitTagValues = args.gitTag ?? nxReleaseConfig.changelog?.git.tag ? createGitTagValues(
|
|
3107
3130
|
releaseGroups,
|
|
3108
3131
|
releaseGroupToFilteredProjects,
|
|
3109
|
-
|
|
3132
|
+
projectsVersionData
|
|
3110
3133
|
) : [];
|
|
3111
3134
|
shared.handleDuplicateGitTags(gitTagValues);
|
|
3112
3135
|
const postGitTasks = [];
|
|
@@ -3256,20 +3279,20 @@ ${contents}`);
|
|
|
3256
3279
|
continue;
|
|
3257
3280
|
}
|
|
3258
3281
|
for (const project of releaseGroup.projects) {
|
|
3259
|
-
if (!
|
|
3282
|
+
if (!projectsVersionData[project]?.newVersion) {
|
|
3260
3283
|
continue;
|
|
3261
3284
|
}
|
|
3262
|
-
const dependentProjects = (
|
|
3285
|
+
const dependentProjects = (projectsVersionData[project].dependentProjects || []).map((dep) => {
|
|
3263
3286
|
return {
|
|
3264
3287
|
dependencyName: dep.source,
|
|
3265
|
-
newVersion:
|
|
3288
|
+
newVersion: projectsVersionData[dep.source]?.newVersion
|
|
3266
3289
|
};
|
|
3267
3290
|
}).filter((b) => b.newVersion !== null);
|
|
3268
3291
|
for (const dependent of dependentProjects) {
|
|
3269
3292
|
const additionalDependencyBumpsForProject = (projectToAdditionalDependencyBumps.has(dependent.dependencyName) ? projectToAdditionalDependencyBumps.get(dependent.dependencyName) : []) ?? [];
|
|
3270
3293
|
additionalDependencyBumpsForProject.push({
|
|
3271
3294
|
dependencyName: project,
|
|
3272
|
-
newVersion:
|
|
3295
|
+
newVersion: projectsVersionData[project].newVersion
|
|
3273
3296
|
});
|
|
3274
3297
|
projectToAdditionalDependencyBumps.set(
|
|
3275
3298
|
dependent.dependencyName,
|
|
@@ -3290,7 +3313,7 @@ ${contents}`);
|
|
|
3290
3313
|
(project) => {
|
|
3291
3314
|
return [
|
|
3292
3315
|
project,
|
|
3293
|
-
...
|
|
3316
|
+
...projectsVersionData[project]?.dependentProjects.map(
|
|
3294
3317
|
(dep) => dep.source
|
|
3295
3318
|
) || []
|
|
3296
3319
|
];
|
|
@@ -3386,7 +3409,7 @@ ${contents}`);
|
|
|
3386
3409
|
tree: tree$1,
|
|
3387
3410
|
args,
|
|
3388
3411
|
changes,
|
|
3389
|
-
projectsVersionData
|
|
3412
|
+
projectsVersionData,
|
|
3390
3413
|
releaseGroup,
|
|
3391
3414
|
projects: [project],
|
|
3392
3415
|
nxReleaseConfig,
|
|
@@ -3515,7 +3538,7 @@ ${contents}`);
|
|
|
3515
3538
|
tree: tree$1,
|
|
3516
3539
|
args,
|
|
3517
3540
|
changes,
|
|
3518
|
-
projectsVersionData
|
|
3541
|
+
projectsVersionData,
|
|
3519
3542
|
releaseGroup,
|
|
3520
3543
|
projects: projectNodes,
|
|
3521
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,
|
|
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,
|
|
@@ -3069,27 +3103,16 @@ function createAPI(overrideReleaseConfig) {
|
|
|
3069
3103
|
);
|
|
3070
3104
|
}
|
|
3071
3105
|
const commitMessage = args.gitCommitMessage || nxReleaseConfig.changelog?.git?.commitMessage;
|
|
3072
|
-
const actualProjectsVersionData = Object.fromEntries(
|
|
3073
|
-
Object.entries(projectsVersionData).filter(
|
|
3074
|
-
([, data]) => data && valid(data.newVersion)
|
|
3075
|
-
)
|
|
3076
|
-
);
|
|
3077
|
-
writeInfo(
|
|
3078
|
-
`Preparing to release the following projects:
|
|
3079
|
-
${Object.entries(actualProjectsVersionData).map(
|
|
3080
|
-
([project, versionData]) => `- ${project}: ${versionData.currentVersion ? `${versionData.currentVersion} -> ${versionData.newVersion}` : versionData.newVersion}`
|
|
3081
|
-
).join("\n")}`
|
|
3082
|
-
);
|
|
3083
3106
|
const commitMessageValues = createCommitMessageValues(
|
|
3084
3107
|
releaseGroups,
|
|
3085
3108
|
releaseGroupToFilteredProjects,
|
|
3086
|
-
|
|
3109
|
+
projectsVersionData,
|
|
3087
3110
|
commitMessage
|
|
3088
3111
|
);
|
|
3089
3112
|
const gitTagValues = args.gitTag ?? nxReleaseConfig.changelog?.git.tag ? createGitTagValues(
|
|
3090
3113
|
releaseGroups,
|
|
3091
3114
|
releaseGroupToFilteredProjects,
|
|
3092
|
-
|
|
3115
|
+
projectsVersionData
|
|
3093
3116
|
) : [];
|
|
3094
3117
|
handleDuplicateGitTags(gitTagValues);
|
|
3095
3118
|
const postGitTasks = [];
|
|
@@ -3239,20 +3262,20 @@ ${contents}`);
|
|
|
3239
3262
|
continue;
|
|
3240
3263
|
}
|
|
3241
3264
|
for (const project of releaseGroup.projects) {
|
|
3242
|
-
if (!
|
|
3265
|
+
if (!projectsVersionData[project]?.newVersion) {
|
|
3243
3266
|
continue;
|
|
3244
3267
|
}
|
|
3245
|
-
const dependentProjects = (
|
|
3268
|
+
const dependentProjects = (projectsVersionData[project].dependentProjects || []).map((dep) => {
|
|
3246
3269
|
return {
|
|
3247
3270
|
dependencyName: dep.source,
|
|
3248
|
-
newVersion:
|
|
3271
|
+
newVersion: projectsVersionData[dep.source]?.newVersion
|
|
3249
3272
|
};
|
|
3250
3273
|
}).filter((b) => b.newVersion !== null);
|
|
3251
3274
|
for (const dependent of dependentProjects) {
|
|
3252
3275
|
const additionalDependencyBumpsForProject = (projectToAdditionalDependencyBumps.has(dependent.dependencyName) ? projectToAdditionalDependencyBumps.get(dependent.dependencyName) : []) ?? [];
|
|
3253
3276
|
additionalDependencyBumpsForProject.push({
|
|
3254
3277
|
dependencyName: project,
|
|
3255
|
-
newVersion:
|
|
3278
|
+
newVersion: projectsVersionData[project].newVersion
|
|
3256
3279
|
});
|
|
3257
3280
|
projectToAdditionalDependencyBumps.set(
|
|
3258
3281
|
dependent.dependencyName,
|
|
@@ -3273,7 +3296,7 @@ ${contents}`);
|
|
|
3273
3296
|
(project) => {
|
|
3274
3297
|
return [
|
|
3275
3298
|
project,
|
|
3276
|
-
...
|
|
3299
|
+
...projectsVersionData[project]?.dependentProjects.map(
|
|
3277
3300
|
(dep) => dep.source
|
|
3278
3301
|
) || []
|
|
3279
3302
|
];
|
|
@@ -3369,7 +3392,7 @@ ${contents}`);
|
|
|
3369
3392
|
tree,
|
|
3370
3393
|
args,
|
|
3371
3394
|
changes,
|
|
3372
|
-
projectsVersionData
|
|
3395
|
+
projectsVersionData,
|
|
3373
3396
|
releaseGroup,
|
|
3374
3397
|
projects: [project],
|
|
3375
3398
|
nxReleaseConfig,
|
|
@@ -3498,7 +3521,7 @@ ${contents}`);
|
|
|
3498
3521
|
tree,
|
|
3499
3522
|
args,
|
|
3500
3523
|
changes,
|
|
3501
|
-
projectsVersionData
|
|
3524
|
+
projectsVersionData,
|
|
3502
3525
|
releaseGroup,
|
|
3503
3526
|
projects: projectNodes,
|
|
3504
3527
|
nxReleaseConfig,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/git-tools",
|
|
3
|
-
"version": "2.115.
|
|
3
|
+
"version": "2.115.14",
|
|
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.
|
|
225
|
-
"@storm-software/config-tools": "^1.180.
|
|
224
|
+
"@storm-software/config": "^1.128.12",
|
|
225
|
+
"@storm-software/config-tools": "^1.180.14",
|
|
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": "
|
|
254
|
+
"gitHead": "cdc5cfdb7984452707038e0ea688963fe49f9adf"
|
|
255
255
|
}
|