@storm-software/git-tools 2.96.13 → 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.
- package/bin/{chunk-HQRC5X3M.js → chunk-7HYXXE5S.js} +3 -15
- package/bin/{chunk-X4ZORIOI.cjs → chunk-LFH4CIZM.cjs} +3 -15
- package/bin/git.cjs +128 -128
- package/bin/git.js +13 -13
- package/bin/post-checkout.cjs +9 -9
- package/bin/post-checkout.js +1 -1
- package/bin/post-commit.cjs +9 -9
- package/bin/post-commit.js +1 -1
- package/bin/post-merge.cjs +9 -9
- package/bin/post-merge.js +1 -1
- package/bin/pre-commit.cjs +9 -9
- package/bin/pre-commit.js +1 -1
- package/bin/pre-install.cjs +9 -9
- package/bin/pre-install.js +1 -1
- package/bin/pre-push.cjs +13 -13
- package/bin/pre-push.js +1 -1
- package/bin/prepare.cjs +7 -7
- package/bin/prepare.js +1 -1
- package/bin/version-warning.cjs +5 -5
- package/bin/version-warning.js +1 -1
- package/package.json +1 -1
package/bin/git.cjs
CHANGED
|
@@ -21,7 +21,7 @@ var _chunkFNIN2HF7cjs = require('./chunk-FNIN2HF7.cjs');
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var _chunkLFH4CIZMcjs = require('./chunk-LFH4CIZM.cjs');
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
var _chunkP2CHIYIKcjs = require('./chunk-P2CHIYIK.cjs');
|
|
@@ -3264,7 +3264,7 @@ var require_wrap_ansi = _chunkKK4YC43Scjs.__commonJS.call(void 0, {
|
|
|
3264
3264
|
_chunkKK4YC43Scjs.init_cjs_shims.call(void 0, );
|
|
3265
3265
|
var stringWidth = require_string_width();
|
|
3266
3266
|
var stripAnsi2 = require_strip_ansi();
|
|
3267
|
-
var ansiStyles2 =
|
|
3267
|
+
var ansiStyles2 = _chunkLFH4CIZMcjs.require_ansi_styles.call(void 0, );
|
|
3268
3268
|
var ESCAPES2 = /* @__PURE__ */ new Set([
|
|
3269
3269
|
"\x1B",
|
|
3270
3270
|
"\x9B"
|
|
@@ -15606,7 +15606,7 @@ var require_node = _chunkKK4YC43Scjs.__commonJS.call(void 0, {
|
|
|
15606
15606
|
1
|
|
15607
15607
|
];
|
|
15608
15608
|
try {
|
|
15609
|
-
const supportsColor2 =
|
|
15609
|
+
const supportsColor2 = _chunkLFH4CIZMcjs.require_supports_color.call(void 0, );
|
|
15610
15610
|
if (supportsColor2 && (supportsColor2.stderr || supportsColor2).level >= 2) {
|
|
15611
15611
|
exports.colors = [
|
|
15612
15612
|
20,
|
|
@@ -67098,12 +67098,12 @@ var getRuleFromScopeEnum = /* @__PURE__ */ _chunkKK4YC43Scjs.__name.call(void 0,
|
|
|
67098
67098
|
// src/commitlint/run.ts
|
|
67099
67099
|
var COMMIT_EDITMSG_PATH = ".git/COMMIT_EDITMSG";
|
|
67100
67100
|
var runCommitLint = /* @__PURE__ */ _chunkKK4YC43Scjs.__name.call(void 0, async (config, params) => {
|
|
67101
|
-
|
|
67101
|
+
_chunkLFH4CIZMcjs.writeInfo.call(void 0, "\u{1F4DD} Validating git commit message aligns with the Storm Software specification", config);
|
|
67102
67102
|
let commitMessage;
|
|
67103
67103
|
if (params.message && params.message !== COMMIT_EDITMSG_PATH) {
|
|
67104
67104
|
commitMessage = params.message;
|
|
67105
67105
|
} else {
|
|
67106
|
-
const commitFile =
|
|
67106
|
+
const commitFile = _chunkLFH4CIZMcjs.joinPaths.call(void 0, config.workspaceRoot, params.file || params.message || COMMIT_EDITMSG_PATH);
|
|
67107
67107
|
if (_fs.existsSync.call(void 0, commitFile)) {
|
|
67108
67108
|
commitMessage = await _asyncOptionalChain([(await _promises.readFile.call(void 0, commitFile, "utf8")), 'optionalAccess', async _81 => _81.trim, 'call', async _82 => _82()]);
|
|
67109
67109
|
}
|
|
@@ -67115,19 +67115,19 @@ var runCommitLint = /* @__PURE__ */ _chunkKK4YC43Scjs.__name.call(void 0, async
|
|
|
67115
67115
|
if (upstreamRemote) {
|
|
67116
67116
|
const upstreamRemoteIdentifier = _optionalChain([upstreamRemote, 'access', _83 => _83.split, 'call', _84 => _84(" "), 'access', _85 => _85[0], 'optionalAccess', _86 => _86.trim, 'call', _87 => _87()]);
|
|
67117
67117
|
if (!upstreamRemoteIdentifier) {
|
|
67118
|
-
|
|
67118
|
+
_chunkLFH4CIZMcjs.writeWarning.call(void 0, `No upstream remote found for ${config.name}.git. Skipping comparison.`, config);
|
|
67119
67119
|
return;
|
|
67120
67120
|
}
|
|
67121
|
-
|
|
67121
|
+
_chunkLFH4CIZMcjs.writeDebug.call(void 0, `Comparing against remote ${upstreamRemoteIdentifier}`);
|
|
67122
67122
|
const currentBranch = _child_process2.default.execSync("git branch --show-current").toString().trim();
|
|
67123
67123
|
gitLogCmd = gitLogCmd + ` ${currentBranch} ^${upstreamRemoteIdentifier}/main`;
|
|
67124
67124
|
} else {
|
|
67125
|
-
|
|
67125
|
+
_chunkLFH4CIZMcjs.writeWarning.call(void 0, `No upstream remote found for ${config.name}.git. Skipping comparison against upstream main.`, config);
|
|
67126
67126
|
return;
|
|
67127
67127
|
}
|
|
67128
67128
|
commitMessage = _child_process2.default.execSync(gitLogCmd).toString().trim();
|
|
67129
67129
|
if (!commitMessage) {
|
|
67130
|
-
|
|
67130
|
+
_chunkLFH4CIZMcjs.writeWarning.call(void 0, "No commits found. Skipping commit message validation.", config);
|
|
67131
67131
|
return;
|
|
67132
67132
|
}
|
|
67133
67133
|
}
|
|
@@ -67145,7 +67145,7 @@ var runCommitLint = /* @__PURE__ */ _chunkKK4YC43Scjs.__name.call(void 0, async
|
|
|
67145
67145
|
helpUrl: commitlintConfig.helpUrl
|
|
67146
67146
|
});
|
|
67147
67147
|
if (!matchCommit || report.errors.length || report.warnings.length) {
|
|
67148
|
-
|
|
67148
|
+
_chunkLFH4CIZMcjs.writeSuccess.call(void 0, `Commit was processing completed successfully!`, config);
|
|
67149
67149
|
} else {
|
|
67150
67150
|
let errorMessage = " Oh no! Your commit message: \n-------------------------------------------------------------------\n" + commitMessage + "\n-------------------------------------------------------------------\n\n Does not follow the commit message convention specified by Storm Software.";
|
|
67151
67151
|
errorMessage += "\ntype(scope): subject \n BLANK LINE \n body";
|
|
@@ -68339,7 +68339,7 @@ var createState = /* @__PURE__ */ _chunkKK4YC43Scjs.__name.call(void 0, async (c
|
|
|
68339
68339
|
answers: {}
|
|
68340
68340
|
};
|
|
68341
68341
|
} else {
|
|
68342
|
-
|
|
68342
|
+
_chunkLFH4CIZMcjs.writeInfo.call(void 0, `Using custom commit config file: ${commitizenFile}`, config);
|
|
68343
68343
|
let commitizenConfig = await Promise.resolve().then(() => _interopRequireWildcard(require(commitizenFile)));
|
|
68344
68344
|
if (_optionalChain([commitizenConfig, 'optionalAccess', _93 => _93.default])) {
|
|
68345
68345
|
commitizenConfig = _optionalChain([commitizenConfig, 'optionalAccess', _94 => _94.default]);
|
|
@@ -68380,7 +68380,7 @@ var createState = /* @__PURE__ */ _chunkKK4YC43Scjs.__name.call(void 0, async (c
|
|
|
68380
68380
|
}
|
|
68381
68381
|
if (project) {
|
|
68382
68382
|
let description = `${project.name} - ${project.root}`;
|
|
68383
|
-
const packageJsonPath =
|
|
68383
|
+
const packageJsonPath = _chunkLFH4CIZMcjs.joinPaths.call(void 0, project.root, "package.json");
|
|
68384
68384
|
if (await hfs.isFile(packageJsonPath)) {
|
|
68385
68385
|
const packageJson = await hfs.json(packageJsonPath);
|
|
68386
68386
|
description = packageJson.description || description;
|
|
@@ -68454,10 +68454,10 @@ ${closedIssueEmoji}${config.prompt.settings.closedIssueMessage}${issues}`;
|
|
|
68454
68454
|
|
|
68455
68455
|
// src/commit/run.ts
|
|
68456
68456
|
var runCommit = /* @__PURE__ */ _chunkKK4YC43Scjs.__name.call(void 0, async (commitizenFile = "@storm-software/git-tools/commit/config", dryRun = false) => {
|
|
68457
|
-
const config = await
|
|
68457
|
+
const config = await _chunkLFH4CIZMcjs.getConfig.call(void 0, );
|
|
68458
68458
|
const state = await createState(config, commitizenFile);
|
|
68459
68459
|
if (dryRun) {
|
|
68460
|
-
|
|
68460
|
+
_chunkLFH4CIZMcjs.writeInfo.call(void 0, "Running in dry mode.", config);
|
|
68461
68461
|
}
|
|
68462
68462
|
console.log(chalk_template_default`
|
|
68463
68463
|
{bold.#999999 ----------------------------------------}
|
|
@@ -68467,7 +68467,7 @@ var runCommit = /* @__PURE__ */ _chunkKK4YC43Scjs.__name.call(void 0, async (com
|
|
|
68467
68467
|
`);
|
|
68468
68468
|
state.answers = await askQuestions(state);
|
|
68469
68469
|
const message2 = formatCommitMessage(state);
|
|
68470
|
-
const commitMsgFile =
|
|
68470
|
+
const commitMsgFile = _chunkLFH4CIZMcjs.joinPaths.call(void 0, getGitDir(), "COMMIT_EDITMSG");
|
|
68471
68471
|
console.log(chalk_template_default`
|
|
68472
68472
|
{bold.#999999 ----------------------------------------}
|
|
68473
68473
|
|
|
@@ -68491,8 +68491,8 @@ var runCommit = /* @__PURE__ */ _chunkKK4YC43Scjs.__name.call(void 0, async (com
|
|
|
68491
68491
|
]);
|
|
68492
68492
|
const command = (0, import_any_shell_escape.default)(commandItems);
|
|
68493
68493
|
if (dryRun) {
|
|
68494
|
-
|
|
68495
|
-
|
|
68494
|
+
_chunkLFH4CIZMcjs.writeDebug.call(void 0, `Skipping execution [dry-run]: ${command.replace(commitMsgFile, ".git/COMMIT_EDITMSG")}`, config);
|
|
68495
|
+
_chunkLFH4CIZMcjs.writeDebug.call(void 0, `Message [dry-run]: ${message2}`, config);
|
|
68496
68496
|
} else {
|
|
68497
68497
|
await _promises2.default.writeFile(commitMsgFile, message2);
|
|
68498
68498
|
_chunkFNIN2HF7cjs.run.call(void 0, config, command);
|
|
@@ -80885,7 +80885,7 @@ var _nxjsonjs = require('nx/src/config/nx-json.js');
|
|
|
80885
80885
|
|
|
80886
80886
|
// src/release/changelog.ts
|
|
80887
80887
|
_chunkKK4YC43Scjs.init_cjs_shims.call(void 0, );
|
|
80888
|
-
var chalk2 = _chunkKK4YC43Scjs.__toESM.call(void 0,
|
|
80888
|
+
var chalk2 = _chunkKK4YC43Scjs.__toESM.call(void 0, _chunkLFH4CIZMcjs.require_source.call(void 0, ), 1);
|
|
80889
80889
|
var import_enquirer = _chunkKK4YC43Scjs.__toESM.call(void 0, require_enquirer(), 1);
|
|
80890
80890
|
var import_semver2 = _chunkKK4YC43Scjs.__toESM.call(void 0, require_semver2(), 1);
|
|
80891
80891
|
var import_tmp = _chunkKK4YC43Scjs.__toESM.call(void 0, require_tmp2(), 1);
|
|
@@ -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
|
-
|
|
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
|
|
|
@@ -84394,7 +84399,7 @@ var StormChangelogRenderer = (_class13 = class extends _changelogrenderer2.defau
|
|
|
84394
84399
|
super(config);_class13.prototype.__init27.call(this);;
|
|
84395
84400
|
}
|
|
84396
84401
|
async render() {
|
|
84397
|
-
this.workspaceConfig = await
|
|
84402
|
+
this.workspaceConfig = await _chunkLFH4CIZMcjs.getWorkspaceConfig.call(void 0, );
|
|
84398
84403
|
return super.render();
|
|
84399
84404
|
}
|
|
84400
84405
|
preprocessChanges() {
|
|
@@ -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
|
-
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
84531
|
+
if (_optionalChain([data, 'optionalAccess', _191 => _191.user])) {
|
|
84532
84532
|
meta.github = data.user.username;
|
|
84533
84533
|
break;
|
|
84534
84534
|
}
|
|
@@ -84576,7 +84576,7 @@ var StormChangelogRenderer = (_class13 = class extends _changelogrenderer2.defau
|
|
|
84576
84576
|
// src/release/changelog.ts
|
|
84577
84577
|
function createAPI(overrideReleaseConfig) {
|
|
84578
84578
|
return /* @__PURE__ */ _chunkKK4YC43Scjs.__name.call(void 0, async function releaseChangelog(args) {
|
|
84579
|
-
const workspaceConfig = await
|
|
84579
|
+
const workspaceConfig = await _chunkLFH4CIZMcjs.getWorkspaceConfig.call(void 0, );
|
|
84580
84580
|
const projectGraph = await _projectgraph.createProjectGraphAsync.call(void 0, {
|
|
84581
84581
|
exitOnError: true
|
|
84582
84582
|
});
|
|
@@ -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',
|
|
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',
|
|
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
|
|
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',
|
|
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',
|
|
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',
|
|
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
|
|
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',
|
|
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
|
|
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, );
|
|
@@ -85114,7 +85114,7 @@ async function applyChangesAndExit(args, nxReleaseConfig, tree, toSHA, postGitTa
|
|
|
85114
85114
|
}
|
|
85115
85115
|
_chunkKK4YC43Scjs.__name.call(void 0, applyChangesAndExit, "applyChangesAndExit");
|
|
85116
85116
|
async function generateChangelogForWorkspace({ tree, args, projectGraph, nxReleaseConfig, workspaceChangelogVersion, changes, commits }) {
|
|
85117
|
-
const workspaceConfig = await
|
|
85117
|
+
const workspaceConfig = await _chunkLFH4CIZMcjs.getWorkspaceConfig.call(void 0, );
|
|
85118
85118
|
if (!workspaceConfig) {
|
|
85119
85119
|
throw new Error(`Unable to determine the Storm workspace config. Please ensure that your storm-workspace.json file is present and valid.`);
|
|
85120
85120
|
}
|
|
@@ -85138,7 +85138,7 @@ async function generateChangelogForWorkspace({ tree, args, projectGraph, nxRelea
|
|
|
85138
85138
|
});
|
|
85139
85139
|
return;
|
|
85140
85140
|
}
|
|
85141
|
-
if (_optionalChain([Object, 'access',
|
|
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, "
|
|
85194
|
+
contents = _fs.readFileSync.call(void 0, changelogPath, "utf8");
|
|
85195
85195
|
}
|
|
85196
85196
|
if (interpolatedTreePath) {
|
|
85197
|
-
let rootChangelogContents = tree.exists(interpolatedTreePath) ? _optionalChain([tree, 'access',
|
|
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);
|
|
@@ -85221,7 +85221,7 @@ ${rootChangelogContents}`;
|
|
|
85221
85221
|
}
|
|
85222
85222
|
_chunkKK4YC43Scjs.__name.call(void 0, generateChangelogForWorkspace, "generateChangelogForWorkspace");
|
|
85223
85223
|
async function generateChangelogForProjects({ tree, args, changes, projectsVersionData, releaseGroup, projects, nxReleaseConfig, projectToAdditionalDependencyBumps }) {
|
|
85224
|
-
const workspaceConfig = await
|
|
85224
|
+
const workspaceConfig = await _chunkLFH4CIZMcjs.getWorkspaceConfig.call(void 0, );
|
|
85225
85225
|
if (!workspaceConfig) {
|
|
85226
85226
|
throw new Error(`Unable to determine the Storm workspace config. Please ensure that your storm-workspace.json file is present and valid.`);
|
|
85227
85227
|
}
|
|
@@ -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',
|
|
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',
|
|
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);
|
|
@@ -85442,7 +85442,7 @@ function formatGithubReleaseNotes(content, workspaceConfig) {
|
|
|
85442
85442
|
if (!workspaceConfig) {
|
|
85443
85443
|
return content;
|
|
85444
85444
|
}
|
|
85445
|
-
return `
|
|
85445
|
+
return `
|
|
85446
85446
|
${workspaceConfig.release.header || ""}
|
|
85447
85447
|
${content}
|
|
85448
85448
|
|
|
@@ -85527,13 +85527,13 @@ var _filemaputilsjs = require('nx/src/project-graph/file-map-utils.js');
|
|
|
85527
85527
|
var _paramsjs = require('nx/src/utils/params.js');
|
|
85528
85528
|
async function releaseVersion(config, args) {
|
|
85529
85529
|
try {
|
|
85530
|
-
|
|
85530
|
+
_chunkLFH4CIZMcjs.writeInfo.call(void 0, "Running release version command", config);
|
|
85531
85531
|
const projectGraph = await _projectgraphjs.createProjectGraphAsync.call(void 0, {
|
|
85532
85532
|
exitOnError: true
|
|
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',
|
|
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,29 +85541,29 @@ 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',
|
|
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"
|
|
85548
85548
|
]);
|
|
85549
85549
|
throw new Error(`The "release.git" property in nx.json may not be used with the "nx release version" subcommand or programmatic API. Instead, configure git options for subcommands directly with "release.version.git" and "release.changelog.git".`);
|
|
85550
85550
|
}
|
|
85551
|
-
|
|
85551
|
+
_chunkLFH4CIZMcjs.writeInfo.call(void 0, "Filtering projects and release groups", config);
|
|
85552
85552
|
const { error: filterError, releaseGroups, releaseGroupToFilteredProjects } = _filterreleasegroupsjs.filterReleaseGroups.call(void 0, projectGraph, nxReleaseConfig, args.projects, args.groups);
|
|
85553
85553
|
if (filterError) {
|
|
85554
|
-
|
|
85554
|
+
_chunkLFH4CIZMcjs.writeError.call(void 0, filterError.title, config);
|
|
85555
85555
|
throw new Error(filterError.title);
|
|
85556
85556
|
}
|
|
85557
85557
|
const tree = new (0, _treejs.FsTree)(workspaceRoot3, true);
|
|
85558
85558
|
const versionData = {};
|
|
85559
|
-
const commitMessage = args.gitCommitMessage || _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
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',
|
|
85563
|
-
|
|
85562
|
+
if (_optionalChain([args, 'access', _231 => _231.projects, 'optionalAccess', _232 => _232.length])) {
|
|
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;
|
|
85566
|
-
|
|
85566
|
+
_chunkLFH4CIZMcjs.writeInfo.call(void 0, `Running versioning for release group "${releaseGroupName}" and filtered projects within it`, config);
|
|
85567
85567
|
const releaseGroupProjectNames = Array.from(_nullishCoalesce(releaseGroupToFilteredProjects.get(releaseGroup), () => ( [])));
|
|
85568
85568
|
const projectBatches = _batchprojectsbygeneratorconfigjs.batchProjectsByGeneratorConfig.call(void 0,
|
|
85569
85569
|
projectGraph,
|
|
@@ -85572,7 +85572,7 @@ async function releaseVersion(config, args) {
|
|
|
85572
85572
|
releaseGroupProjectNames
|
|
85573
85573
|
);
|
|
85574
85574
|
for (const [generatorConfigString, projectNames] of projectBatches.entries()) {
|
|
85575
|
-
|
|
85575
|
+
_chunkLFH4CIZMcjs.writeInfo.call(void 0, `Running versioning for batch "${JSON.stringify(projectNames)}" for release-group "${releaseGroupName}"`, config);
|
|
85576
85576
|
const [generatorName, generatorOptions] = JSON.parse(generatorConfigString);
|
|
85577
85577
|
const generatorData = resolveGeneratorData({
|
|
85578
85578
|
...extractGeneratorCollectionAndName(`batch "${JSON.stringify(projectNames)}" for release-group "${releaseGroupName}"`, generatorName),
|
|
@@ -85599,7 +85599,7 @@ async function releaseVersion(config, args) {
|
|
|
85599
85599
|
});
|
|
85600
85600
|
}
|
|
85601
85601
|
}
|
|
85602
|
-
const gitTagValues2 = _nullishCoalesce(args.gitTag, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
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,29 +85616,29 @@ async function releaseVersion(config, args) {
|
|
|
85616
85616
|
projectsVersionData: versionData
|
|
85617
85617
|
};
|
|
85618
85618
|
}
|
|
85619
|
-
if (_nullishCoalesce(args.gitCommit, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
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',
|
|
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',
|
|
85628
|
-
|
|
85627
|
+
} else if (_nullishCoalesce(args.stageChanges, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess', _242 => _242.version, 'access', _243 => _243.git, 'access', _244 => _244.stageChanges])))) {
|
|
85628
|
+
_chunkLFH4CIZMcjs.writeInfo.call(void 0, "Staging changed files with git", config);
|
|
85629
85629
|
await _gitjs.gitAdd.call(void 0, {
|
|
85630
85630
|
changedFiles: changedFiles2,
|
|
85631
85631
|
dryRun: args.dryRun,
|
|
85632
85632
|
verbose: args.verbose
|
|
85633
85633
|
});
|
|
85634
85634
|
}
|
|
85635
|
-
if (_nullishCoalesce(args.gitTag, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85636
|
-
|
|
85635
|
+
if (_nullishCoalesce(args.gitTag, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess', _245 => _245.version, 'access', _246 => _246.git, 'access', _247 => _247.tag])))) {
|
|
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',
|
|
85641
|
-
additionalArgs: args.gitTagArgs || _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
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',
|
|
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',
|
|
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',
|
|
85700
|
+
workspaceVersion = _optionalChain([versionData, 'access', _258 => _258[releaseGroupProjectNames[0]], 'optionalAccess', _259 => _259.newVersion]);
|
|
85701
85701
|
}
|
|
85702
85702
|
}
|
|
85703
85703
|
}
|
|
@@ -85711,29 +85711,29 @@ async function releaseVersion(config, args) {
|
|
|
85711
85711
|
projectsVersionData: versionData
|
|
85712
85712
|
};
|
|
85713
85713
|
}
|
|
85714
|
-
if (_nullishCoalesce(args.gitCommit, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
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',
|
|
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',
|
|
85723
|
-
|
|
85722
|
+
} else if (_nullishCoalesce(args.stageChanges, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess', _266 => _266.version, 'access', _267 => _267.git, 'access', _268 => _268.stageChanges])))) {
|
|
85723
|
+
_chunkLFH4CIZMcjs.writeInfo.call(void 0, "Staging changed files with git", config);
|
|
85724
85724
|
await _gitjs.gitAdd.call(void 0, {
|
|
85725
85725
|
changedFiles,
|
|
85726
85726
|
dryRun: args.dryRun,
|
|
85727
85727
|
verbose: args.verbose
|
|
85728
85728
|
});
|
|
85729
85729
|
}
|
|
85730
|
-
if (_nullishCoalesce(args.gitTag, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85731
|
-
|
|
85730
|
+
if (_nullishCoalesce(args.gitTag, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess', _269 => _269.version, 'access', _270 => _270.git, 'access', _271 => _271.tag])))) {
|
|
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',
|
|
85736
|
-
additionalArgs: args.gitTagArgs || _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
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
|
});
|
|
@@ -85744,8 +85744,8 @@ async function releaseVersion(config, args) {
|
|
|
85744
85744
|
projectsVersionData: versionData
|
|
85745
85745
|
};
|
|
85746
85746
|
} catch (error) {
|
|
85747
|
-
|
|
85748
|
-
|
|
85747
|
+
_chunkLFH4CIZMcjs.writeFatal.call(void 0, "A fatal error occurred while determining the Storm Release Version - the process was forced to terminate", config);
|
|
85748
|
+
_chunkLFH4CIZMcjs.writeError.call(void 0, `An exception was thrown while determining the Storm Release Version
|
|
85749
85749
|
- Details: ${error.message}
|
|
85750
85750
|
- Stacktrace: ${error.stack}`, config);
|
|
85751
85751
|
throw new Error(`An exception was thrown in the Storm Release Version generator's process
|
|
@@ -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',
|
|
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, () => ( "")),
|
|
@@ -85775,7 +85775,7 @@ async function runVersionOnProjects(config, projectGraph, nxJson, args, tree, ge
|
|
|
85775
85775
|
throw new Error(`The version generator ${generatorData.collectionName}:${generatorData.normalizedGeneratorName} returned a function instead of an expected ReleaseVersionGeneratorResult`);
|
|
85776
85776
|
}
|
|
85777
85777
|
appendVersionData(versionData, versionResult.data);
|
|
85778
|
-
|
|
85778
|
+
_chunkLFH4CIZMcjs.writeDebug.call(void 0, `Updated version data: ${JSON.stringify(versionData, null, 2)}`, config);
|
|
85779
85779
|
return versionResult.callback;
|
|
85780
85780
|
}
|
|
85781
85781
|
_chunkKK4YC43Scjs.__name.call(void 0, runVersionOnProjects, "runVersionOnProjects");
|
|
@@ -85783,12 +85783,12 @@ function printAndFlushChanges2(config, tree, isDryRun) {
|
|
|
85783
85783
|
const changes = tree.listChanges();
|
|
85784
85784
|
for (const f of changes) {
|
|
85785
85785
|
if (f.type === "CREATE") {
|
|
85786
|
-
|
|
85787
|
-
_printchangesjs.printDiff.call(void 0, "", _optionalChain([f, 'access',
|
|
85786
|
+
_chunkLFH4CIZMcjs.writeInfo.call(void 0, `CREATE ${f.path}${isDryRun ? " [dry-run]" : ""}`, config);
|
|
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',
|
|
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
|
}
|
|
@@ -85858,31 +85858,31 @@ var runRelease = /* @__PURE__ */ _chunkKK4YC43Scjs.__name.call(void 0, async (co
|
|
|
85858
85858
|
process.env.NODE_AUTH_TOKEN = process.env.NPM_TOKEN;
|
|
85859
85859
|
process.env.NPM_AUTH_TOKEN = process.env.NPM_TOKEN;
|
|
85860
85860
|
process.env.NPM_CONFIG_PROVENANCE = "true";
|
|
85861
|
-
|
|
85861
|
+
_chunkLFH4CIZMcjs.writeDebug.call(void 0, "Creating workspace Project Graph data...", config);
|
|
85862
85862
|
const nxJson = _nxjsonjs.readNxJson.call(void 0, );
|
|
85863
|
-
|
|
85863
|
+
_chunkLFH4CIZMcjs.writeDebug.call(void 0, "Reading in the workspaces release configuration", config);
|
|
85864
85864
|
const to = options.head || process.env.NX_HEAD;
|
|
85865
85865
|
const from = options.base || process.env.NX_BASE;
|
|
85866
|
-
|
|
85866
|
+
_chunkLFH4CIZMcjs.writeDebug.call(void 0, `Using the following Git SHAs to determine the release content:
|
|
85867
85867
|
- From: ${from}
|
|
85868
85868
|
- To: ${to}
|
|
85869
85869
|
`, config);
|
|
85870
|
-
if (_optionalChain([nxJson, 'access',
|
|
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',
|
|
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
|
}, {});
|
|
85876
85876
|
}
|
|
85877
85877
|
const nxReleaseConfig = _chunkP2CHIYIKcjs.defu.call(void 0, nxJson.release, DEFAULT_RELEASE_CONFIG);
|
|
85878
|
-
|
|
85879
|
-
|
|
85878
|
+
_chunkLFH4CIZMcjs.writeInfo.call(void 0, "Using the following `nx.json` release configuration values", config);
|
|
85879
|
+
_chunkLFH4CIZMcjs.writeInfo.call(void 0, nxReleaseConfig, config);
|
|
85880
85880
|
const releaseChangelog = createAPI(nxReleaseConfig);
|
|
85881
85881
|
const releasePublish = _publishjs.createAPI.call(void 0, nxReleaseConfig);
|
|
85882
|
-
|
|
85882
|
+
_chunkLFH4CIZMcjs.writeDebug.call(void 0, "Determining the current release versions...", config);
|
|
85883
85883
|
const { workspaceVersion, projectsVersionData } = await releaseVersion(config, {
|
|
85884
85884
|
dryRun: false,
|
|
85885
|
-
verbose:
|
|
85885
|
+
verbose: _chunkLFH4CIZMcjs.isVerbose.call(void 0, config.logLevel),
|
|
85886
85886
|
preid: config.preid,
|
|
85887
85887
|
deleteVersionPlans: false,
|
|
85888
85888
|
stageChanges: true,
|
|
@@ -85892,50 +85892,50 @@ var runRelease = /* @__PURE__ */ _chunkKK4YC43Scjs.__name.call(void 0, async (co
|
|
|
85892
85892
|
});
|
|
85893
85893
|
await releaseChangelog({
|
|
85894
85894
|
...options,
|
|
85895
|
-
version: _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85895
|
+
version: _optionalChain([nxReleaseConfig, 'optionalAccess', _290 => _290.projectsRelationship]) !== "fixed" ? void 0 : workspaceVersion,
|
|
85896
85896
|
versionData: projectsVersionData,
|
|
85897
85897
|
dryRun: false,
|
|
85898
|
-
verbose:
|
|
85898
|
+
verbose: _chunkLFH4CIZMcjs.isVerbose.call(void 0, config.logLevel),
|
|
85899
85899
|
to,
|
|
85900
85900
|
from,
|
|
85901
85901
|
gitCommit: true,
|
|
85902
85902
|
gitCommitMessage: "release(monorepo): Publish workspace release updates"
|
|
85903
85903
|
});
|
|
85904
|
-
|
|
85904
|
+
_chunkLFH4CIZMcjs.writeDebug.call(void 0, "Tagging commit with git", config);
|
|
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',
|
|
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")}
|
|
85912
85912
|
`, config);
|
|
85913
85913
|
const result2 = await releasePublish({
|
|
85914
85914
|
...options,
|
|
85915
85915
|
dryRun: !!options.dryRun,
|
|
85916
|
-
verbose:
|
|
85916
|
+
verbose: _chunkLFH4CIZMcjs.isVerbose.call(void 0, config.logLevel)
|
|
85917
85917
|
});
|
|
85918
|
-
const failedProjects = Object.keys(result2).filter((key) => _optionalChain([result2, 'access',
|
|
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',
|
|
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 {
|
|
85927
|
-
|
|
85927
|
+
_chunkLFH4CIZMcjs.writeWarning.call(void 0, "Skipped publishing packages.", config);
|
|
85928
85928
|
}
|
|
85929
85929
|
}
|
|
85930
|
-
|
|
85930
|
+
_chunkLFH4CIZMcjs.writeSuccess.call(void 0, "Completed the Storm workspace release process!", config);
|
|
85931
85931
|
}, "runRelease");
|
|
85932
85932
|
|
|
85933
85933
|
// src/cli/index.ts
|
|
85934
85934
|
var _config = {};
|
|
85935
85935
|
function createProgram(config) {
|
|
85936
85936
|
_config = config;
|
|
85937
|
-
|
|
85938
|
-
const root2 =
|
|
85937
|
+
_chunkLFH4CIZMcjs.writeInfo.call(void 0, "\u26A1 Running Storm Git Tools", config);
|
|
85938
|
+
const root2 = _chunkLFH4CIZMcjs.findWorkspaceRootSafe.call(void 0, process.cwd());
|
|
85939
85939
|
process.env.STORM_WORKSPACE_ROOT ??= root2;
|
|
85940
85940
|
process.env.NX_WORKSPACE_ROOT_PATH ??= root2;
|
|
85941
85941
|
root2 && process.chdir(root2);
|
|
@@ -85963,14 +85963,14 @@ function createProgram(config) {
|
|
|
85963
85963
|
_chunkKK4YC43Scjs.__name.call(void 0, createProgram, "createProgram");
|
|
85964
85964
|
async function commitAction({ config = "@storm-software/git-tools/commit/config.js", dryRun = false }) {
|
|
85965
85965
|
try {
|
|
85966
|
-
|
|
85966
|
+
_chunkLFH4CIZMcjs.writeInfo.call(void 0, `\u26A1 Preparing to commit your changes. Please provide the requested details below...`, _config);
|
|
85967
85967
|
await runCommit(config, dryRun);
|
|
85968
|
-
|
|
85968
|
+
_chunkLFH4CIZMcjs.writeSuccess.call(void 0, `\u{1F389} Storm Commit processing completed successfully!
|
|
85969
85969
|
|
|
85970
85970
|
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}
|
|
85971
85971
|
`, _config);
|
|
85972
85972
|
} catch (error) {
|
|
85973
|
-
|
|
85973
|
+
_chunkLFH4CIZMcjs.writeFatal.call(void 0, `A fatal error occurred while running commit action:
|
|
85974
85974
|
|
|
85975
85975
|
${error.message}`, _config);
|
|
85976
85976
|
throw new Error(error.message, {
|
|
@@ -85981,11 +85981,11 @@ ${error.message}`, _config);
|
|
|
85981
85981
|
_chunkKK4YC43Scjs.__name.call(void 0, commitAction, "commitAction");
|
|
85982
85982
|
async function readmeAction(options) {
|
|
85983
85983
|
try {
|
|
85984
|
-
|
|
85984
|
+
_chunkLFH4CIZMcjs.writeInfo.call(void 0, "\u26A1 Formatting the workspace's README.md files", _config);
|
|
85985
85985
|
await runReadme(options);
|
|
85986
|
-
|
|
85986
|
+
_chunkLFH4CIZMcjs.writeSuccess.call(void 0, "Formatting of the workspace's README.md files is complete\n", _config);
|
|
85987
85987
|
} catch (error) {
|
|
85988
|
-
|
|
85988
|
+
_chunkLFH4CIZMcjs.writeFatal.call(void 0, `A fatal error occurred while running README format action:
|
|
85989
85989
|
|
|
85990
85990
|
${error.message}`);
|
|
85991
85991
|
throw new Error(error.message, {
|
|
@@ -85996,16 +85996,16 @@ ${error.message}`);
|
|
|
85996
85996
|
_chunkKK4YC43Scjs.__name.call(void 0, readmeAction, "readmeAction");
|
|
85997
85997
|
async function releaseAction({ project, base, head, dryRun }) {
|
|
85998
85998
|
try {
|
|
85999
|
-
|
|
85999
|
+
_chunkLFH4CIZMcjs.writeInfo.call(void 0, "\u26A1 Running the Storm Release and Publish process on the workspace", _config);
|
|
86000
86000
|
await runRelease(_config, {
|
|
86001
86001
|
dryRun,
|
|
86002
86002
|
project,
|
|
86003
86003
|
base,
|
|
86004
86004
|
head
|
|
86005
86005
|
});
|
|
86006
|
-
|
|
86006
|
+
_chunkLFH4CIZMcjs.writeSuccess.call(void 0, "Release completed successfully!\n", _config);
|
|
86007
86007
|
} catch (error) {
|
|
86008
|
-
|
|
86008
|
+
_chunkLFH4CIZMcjs.writeFatal.call(void 0, `A fatal error occurred while running release action:
|
|
86009
86009
|
|
|
86010
86010
|
${error.message} ${error.stack ? `
|
|
86011
86011
|
|
|
@@ -86019,15 +86019,15 @@ Stacktrace: ${error.stack}` : ""}`, _config);
|
|
|
86019
86019
|
_chunkKK4YC43Scjs.__name.call(void 0, releaseAction, "releaseAction");
|
|
86020
86020
|
async function commitLintAction({ config, message: message2, file }) {
|
|
86021
86021
|
try {
|
|
86022
|
-
|
|
86022
|
+
_chunkLFH4CIZMcjs.writeInfo.call(void 0, `\u26A1 Linting the ${_config.repository ? _config.repository : _config.namespace ? _config.namespace : _config.name ? _config.name : _config.organization ? _config.organization : "Storm-Software"} repository's commit messages.`, _config);
|
|
86023
86023
|
await runCommitLint(_config, {
|
|
86024
86024
|
config,
|
|
86025
86025
|
message: message2,
|
|
86026
86026
|
file
|
|
86027
86027
|
});
|
|
86028
|
-
|
|
86028
|
+
_chunkLFH4CIZMcjs.writeSuccess.call(void 0, "Linting the commit messages completed successfully!\n", _config);
|
|
86029
86029
|
} catch (error) {
|
|
86030
|
-
|
|
86030
|
+
_chunkLFH4CIZMcjs.writeFatal.call(void 0, `A fatal error occurred while linting the commit messages:
|
|
86031
86031
|
|
|
86032
86032
|
${error.message}`, _config);
|
|
86033
86033
|
throw new Error(error.message, {
|
|
@@ -86039,15 +86039,15 @@ _chunkKK4YC43Scjs.__name.call(void 0, commitLintAction, "commitLintAction");
|
|
|
86039
86039
|
|
|
86040
86040
|
// bin/git.ts
|
|
86041
86041
|
void (async () => {
|
|
86042
|
-
const config = await
|
|
86042
|
+
const config = await _chunkLFH4CIZMcjs.getConfig.call(void 0, );
|
|
86043
86043
|
try {
|
|
86044
|
-
|
|
86044
|
+
_chunkLFH4CIZMcjs.handleProcess.call(void 0, config);
|
|
86045
86045
|
const program2 = createProgram(config);
|
|
86046
86046
|
await program2.parseAsync(process.argv);
|
|
86047
|
-
|
|
86048
|
-
|
|
86047
|
+
_chunkLFH4CIZMcjs.writeSuccess.call(void 0, `\u{1F389} Git ${process.argv && process.argv.length >= 3 && process.argv[2] ? process.argv[2] : "tool"} processing completed successfully!`, config);
|
|
86048
|
+
_chunkLFH4CIZMcjs.exitWithSuccess.call(void 0, config);
|
|
86049
86049
|
} catch (error) {
|
|
86050
|
-
|
|
86050
|
+
_chunkLFH4CIZMcjs.exitWithError.call(void 0, config);
|
|
86051
86051
|
process.exit(1);
|
|
86052
86052
|
}
|
|
86053
86053
|
})();
|