@storm-software/git-tools 2.131.88 → 2.131.90
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 -1
- package/bin/git.cjs +13 -18
- package/bin/git.cjs.map +1 -1
- package/bin/git.js +19 -24
- package/bin/git.js.map +1 -1
- package/dist/{chunk-RM46ZAMS.js → chunk-BALS7LKN.js} +1 -2
- package/dist/{chunk-JTYUZWJF.cjs → chunk-FSWYRWN4.cjs} +1 -2
- package/dist/index.cjs +18 -18
- package/dist/index.d.cts +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.js +1 -1
- package/dist/release/config.cjs +18 -18
- package/dist/release/config.d.cts +1 -2
- package/dist/release/config.d.ts +1 -2
- package/dist/release/config.js +1 -1
- package/package.json +10 -10
package/bin/git.js
CHANGED
|
@@ -25,7 +25,7 @@ import shellescape from 'any-shell-escape';
|
|
|
25
25
|
import chalk2 from 'chalk';
|
|
26
26
|
import fs, { readFile as readFile$1, writeFile } from 'node:fs/promises';
|
|
27
27
|
import createBasePreset from 'conventional-changelog-conventionalcommits';
|
|
28
|
-
import {
|
|
28
|
+
import { createProjectGraphAsync, readProjectsConfigurationFromProjectGraph, readCachedProjectGraph } from 'nx/src/project-graph/project-graph';
|
|
29
29
|
import { existsSync as existsSync$1 } from 'fs';
|
|
30
30
|
import { readFile } from 'fs/promises';
|
|
31
31
|
import childProcess, { execSync } from 'node:child_process';
|
|
@@ -35,28 +35,25 @@ import util from 'node:util';
|
|
|
35
35
|
import { existsSync, readFileSync, rmSync, readdirSync, writeFileSync, statSync, promises } from 'node:fs';
|
|
36
36
|
import wrap from 'word-wrap';
|
|
37
37
|
import Path, { join, extname } from 'node:path';
|
|
38
|
-
import { createProjectGraphAsync, readProjectsConfigurationFromProjectGraph } from 'nx/src/project-graph/project-graph.js';
|
|
39
38
|
import { resolveConfig, format } from 'prettier';
|
|
40
39
|
import { parse as parse$1, Syntax } from '@textlint/markdown-to-ast';
|
|
41
40
|
import anchor from 'anchor-markdown-header';
|
|
42
41
|
import { Parser } from 'htmlparser2';
|
|
43
42
|
import _ from 'underscore';
|
|
44
43
|
import updateSection from 'update-section';
|
|
45
|
-
import { createProjectGraphAsync as createProjectGraphAsync$
|
|
44
|
+
import { createProjectGraphAsync as createProjectGraphAsync$1, readProjectsConfigurationFromProjectGraph as readProjectsConfigurationFromProjectGraph$1, readCachedProjectGraph as readCachedProjectGraph$1, output, joinPathFragments } from '@nx/devkit';
|
|
46
45
|
import axios from 'axios';
|
|
47
46
|
import { homedir } from 'node:os';
|
|
48
47
|
import { defaultCreateReleaseProvider, GithubRemoteReleaseClient } from 'nx/src/command-line/release/utils/remote-release-clients/github';
|
|
49
48
|
import { parse } from 'yaml';
|
|
50
|
-
import { printAndFlushChanges
|
|
49
|
+
import { printAndFlushChanges } from 'nx/src/command-line/release/utils/print-changes';
|
|
51
50
|
import { createGitTagValues, handleDuplicateGitTags, createCommitMessageValues, isPrerelease, shouldPreferDockerVersionForReleaseGroup, ReleaseVersion, noDiffInChangelogMessage, shouldSkipVersionActions } from 'nx/src/command-line/release/utils/shared';
|
|
52
|
-
import { interpolate
|
|
53
|
-
import { execCommand } from 'nx/src/command-line/release/utils/exec-command
|
|
51
|
+
import { interpolate } from 'nx/src/tasks-runner/utils';
|
|
52
|
+
import { execCommand } from 'nx/src/command-line/release/utils/exec-command';
|
|
54
53
|
import { getCommitHash, getFirstGitCommit, gitPush, gitAdd, parseCommits, getGitDiff, sanitizeProjectNameForGitTag, extractTagAndVersion } from 'nx/src/command-line/release/utils/git';
|
|
55
|
-
import { interpolate } from 'nx/src/tasks-runner/utils.js';
|
|
56
54
|
import semver, { prerelease, coerce, gte, valid, gt, major } from 'semver';
|
|
57
55
|
import { ReleaseClient } from 'nx/release';
|
|
58
56
|
import { readRawVersionPlans, setResolvedVersionPlansOnGroups } from 'nx/src/command-line/release/config/version-plans';
|
|
59
|
-
import { printAndFlushChanges } from 'nx/src/command-line/release/utils/print-changes.js';
|
|
60
57
|
import { validateResolvedVersionPlansAgainstFilter } from 'nx/src/command-line/release/utils/version-plan-utils';
|
|
61
58
|
import { FsTree } from 'nx/src/generators/tree';
|
|
62
59
|
import { createFileMapUsingProjectGraph } from 'nx/src/project-graph/file-map-utils';
|
|
@@ -70,15 +67,13 @@ import { RepoGitTags } from 'nx/src/command-line/release/utils/repository-git-ta
|
|
|
70
67
|
import { ProjectLogger } from 'nx/src/command-line/release/version/project-logger';
|
|
71
68
|
import { resolveCurrentVersion } from 'nx/src/command-line/release/version/resolve-current-version';
|
|
72
69
|
import { topologicalSort } from 'nx/src/command-line/release/version/topological-sort';
|
|
73
|
-
import {
|
|
70
|
+
import { NOOP_VERSION_ACTIONS, resolveVersionActionsForProject } from 'nx/src/command-line/release/version/version-actions';
|
|
74
71
|
import { filterAffected } from 'nx/src/project-graph/affected/affected-project-graph';
|
|
75
72
|
import { calculateFileChanges } from 'nx/src/project-graph/file-utils';
|
|
76
73
|
import gte2 from 'semver/functions/gte';
|
|
77
|
-
import { IMPLICIT_DEFAULT_RELEASE_GROUP as IMPLICIT_DEFAULT_RELEASE_GROUP$1 } from 'nx/src/command-line/release/config/config.js';
|
|
78
74
|
import { deriveSpecifierFromConventionalCommits } from 'nx/src/command-line/release/version/derive-specifier-from-conventional-commits';
|
|
79
75
|
import { deriveSpecifierFromVersionPlan } from 'nx/src/command-line/release/version/deriver-specifier-from-version-plans';
|
|
80
76
|
import { ReleaseGroupProcessor } from 'nx/src/command-line/release/version/release-group-processor';
|
|
81
|
-
import { NOOP_VERSION_ACTIONS } from 'nx/src/command-line/release/version/version-actions.js';
|
|
82
77
|
|
|
83
78
|
function parseCargoToml(cargoString) {
|
|
84
79
|
if (!cargoString) {
|
|
@@ -372,7 +367,7 @@ async function getNxScopes(context) {
|
|
|
372
367
|
try {
|
|
373
368
|
projectGraph = readCachedProjectGraph();
|
|
374
369
|
} catch {
|
|
375
|
-
await createProjectGraphAsync
|
|
370
|
+
await createProjectGraphAsync();
|
|
376
371
|
projectGraph = readCachedProjectGraph();
|
|
377
372
|
}
|
|
378
373
|
if (!projectGraph) {
|
|
@@ -380,7 +375,7 @@ async function getNxScopes(context) {
|
|
|
380
375
|
"The commit process failed because the project graph is not available. Please run the build command again."
|
|
381
376
|
);
|
|
382
377
|
}
|
|
383
|
-
const projectConfigs = readProjectsConfigurationFromProjectGraph
|
|
378
|
+
const projectConfigs = readProjectsConfigurationFromProjectGraph(projectGraph);
|
|
384
379
|
const result = Object.entries(projectConfigs.projects || {}).map(([name, project]) => ({
|
|
385
380
|
name,
|
|
386
381
|
...project
|
|
@@ -1234,7 +1229,7 @@ async function createState(workspaceConfig, configPath) {
|
|
|
1234
1229
|
try {
|
|
1235
1230
|
projectGraph = readCachedProjectGraph();
|
|
1236
1231
|
} catch {
|
|
1237
|
-
await createProjectGraphAsync
|
|
1232
|
+
await createProjectGraphAsync();
|
|
1238
1233
|
projectGraph = readCachedProjectGraph();
|
|
1239
1234
|
}
|
|
1240
1235
|
if (!projectGraph) {
|
|
@@ -1242,7 +1237,7 @@ async function createState(workspaceConfig, configPath) {
|
|
|
1242
1237
|
"Failed to load the project graph. Please run `nx reset`, then run the `storm-git commit` command again."
|
|
1243
1238
|
);
|
|
1244
1239
|
}
|
|
1245
|
-
const projectConfigurations = readProjectsConfigurationFromProjectGraph
|
|
1240
|
+
const projectConfigurations = readProjectsConfigurationFromProjectGraph(projectGraph);
|
|
1246
1241
|
if (!projectConfigurations?.projects?.[scope]) {
|
|
1247
1242
|
throw new Error(
|
|
1248
1243
|
`Failed to load the project configuration for project ${scope}. Please run \`nx reset\`, then run the \`storm-git commit\` command again.`
|
|
@@ -2555,7 +2550,7 @@ async function generateChangelogForProjects({
|
|
|
2555
2550
|
for (const project of projects) {
|
|
2556
2551
|
let interpolatedTreePath = config5.file || "";
|
|
2557
2552
|
if (interpolatedTreePath) {
|
|
2558
|
-
interpolatedTreePath = interpolate
|
|
2553
|
+
interpolatedTreePath = interpolate(interpolatedTreePath, {
|
|
2559
2554
|
projectName: project.name,
|
|
2560
2555
|
projectRoot: project.data.root,
|
|
2561
2556
|
workspaceRoot: ""
|
|
@@ -2583,7 +2578,7 @@ async function generateChangelogForProjects({
|
|
|
2583
2578
|
changes,
|
|
2584
2579
|
changelogEntryVersion: releaseVersion.rawVersion,
|
|
2585
2580
|
project: project.name,
|
|
2586
|
-
entryWhenNoChanges: typeof config5.entryWhenNoChanges === "string" ? interpolate
|
|
2581
|
+
entryWhenNoChanges: typeof config5.entryWhenNoChanges === "string" ? interpolate(config5.entryWhenNoChanges, {
|
|
2587
2582
|
projectName: project.name,
|
|
2588
2583
|
projectRoot: project.data.root,
|
|
2589
2584
|
workspaceRoot: ""
|
|
@@ -2638,7 +2633,7 @@ async function generateChangelogForProjects({
|
|
|
2638
2633
|
workspaceConfig
|
|
2639
2634
|
);
|
|
2640
2635
|
tree.write(filePath, content);
|
|
2641
|
-
printAndFlushChanges
|
|
2636
|
+
printAndFlushChanges(
|
|
2642
2637
|
tree,
|
|
2643
2638
|
!!args.dryRun,
|
|
2644
2639
|
3,
|
|
@@ -3877,7 +3872,7 @@ var ReleaseGraph = class _ReleaseGraph {
|
|
|
3877
3872
|
project
|
|
3878
3873
|
);
|
|
3879
3874
|
if (shouldSkip) {
|
|
3880
|
-
versionActionsToUse = new NOOP_VERSION_ACTIONS
|
|
3875
|
+
versionActionsToUse = new NOOP_VERSION_ACTIONS(
|
|
3881
3876
|
releaseGroup,
|
|
3882
3877
|
projectGraphNode,
|
|
3883
3878
|
finalConfigForProject
|
|
@@ -4997,7 +4992,7 @@ var StormReleaseGroupProcessor = class _StormReleaseGroupProcessor extends Relea
|
|
|
4997
4992
|
}
|
|
4998
4993
|
}
|
|
4999
4994
|
} else {
|
|
5000
|
-
const releaseGroupText = releaseGroupName !== IMPLICIT_DEFAULT_RELEASE_GROUP
|
|
4995
|
+
const releaseGroupText = releaseGroupName !== IMPLICIT_DEFAULT_RELEASE_GROUP ? ` in release group "${releaseGroupName}" ` : " ";
|
|
5001
4996
|
projectLogger.buffer(
|
|
5002
4997
|
`\u23E9 Skipping dependent updates as "updateDependents"${releaseGroupText}is not "auto"`
|
|
5003
4998
|
);
|
|
@@ -5101,7 +5096,7 @@ var StormReleaseClient = class _StormReleaseClient extends ReleaseClient {
|
|
|
5101
5096
|
if (!workspaceConfig) {
|
|
5102
5097
|
workspaceConfig = await getWorkspaceConfig();
|
|
5103
5098
|
}
|
|
5104
|
-
const projectGraph = await createProjectGraphAsync$
|
|
5099
|
+
const projectGraph = await createProjectGraphAsync$1({
|
|
5105
5100
|
exitOnError: true,
|
|
5106
5101
|
resetDaemonClient: true
|
|
5107
5102
|
});
|
|
@@ -5167,7 +5162,7 @@ ${formatConfigLog(config5)}`,
|
|
|
5167
5162
|
this.releaseConfig = releaseConfig;
|
|
5168
5163
|
this.workspaceConfig = workspaceConfig;
|
|
5169
5164
|
this.tree = new FsTree(workspaceConfig.workspaceRoot, false);
|
|
5170
|
-
this.projectConfigurations = readProjectsConfigurationFromProjectGraph$
|
|
5165
|
+
this.projectConfigurations = readProjectsConfigurationFromProjectGraph$1(projectGraph);
|
|
5171
5166
|
}
|
|
5172
5167
|
releaseChangelog = async (options) => {
|
|
5173
5168
|
const to = options.to || "HEAD";
|
|
@@ -5505,7 +5500,7 @@ ${Object.keys(allProjectChangelogs).map((p) => ` - ${p}`).join("\n")}
|
|
|
5505
5500
|
};
|
|
5506
5501
|
releaseVersion = async (options) => {
|
|
5507
5502
|
const verbose = options.verbose || isVerbose(this.workspaceConfig.logLevel);
|
|
5508
|
-
this.projectGraph = await createProjectGraphAsync$
|
|
5503
|
+
this.projectGraph = await createProjectGraphAsync$1({
|
|
5509
5504
|
exitOnError: true,
|
|
5510
5505
|
resetDaemonClient: true
|
|
5511
5506
|
});
|
|
@@ -5928,7 +5923,7 @@ async function updatePackageManifests(projectsVersionData, config5) {
|
|
|
5928
5923
|
try {
|
|
5929
5924
|
projectGraph = readCachedProjectGraph$1();
|
|
5930
5925
|
} catch {
|
|
5931
|
-
await createProjectGraphAsync$
|
|
5926
|
+
await createProjectGraphAsync$1();
|
|
5932
5927
|
projectGraph = readCachedProjectGraph$1();
|
|
5933
5928
|
}
|
|
5934
5929
|
if (projectGraph) {
|