@storm-software/git-tools 2.111.25 → 2.111.26
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 +354 -286
- package/bin/git.js +316 -248
- package/package.json +1 -1
package/bin/git.cjs
CHANGED
|
@@ -71861,10 +71861,7 @@ var runCommit = async (commitizenFile = "@storm-software/git-tools/commit/config
|
|
|
71861
71861
|
|
|
71862
71862
|
`);
|
|
71863
71863
|
await runCommitLint(config, { message: message2 });
|
|
71864
|
-
const commandItems = ["git", "commit"];
|
|
71865
|
-
if (!process.env.CI && !process.env.STORM_CI) {
|
|
71866
|
-
commandItems.push("-S");
|
|
71867
|
-
}
|
|
71864
|
+
const commandItems = ["git", "commit", "-S"];
|
|
71868
71865
|
commandItems.push(...["--file", commitMsgFile]);
|
|
71869
71866
|
const command = (0, import_any_shell_escape.default)(commandItems);
|
|
71870
71867
|
if (dryRun) {
|
|
@@ -77687,7 +77684,6 @@ var _launcheditor = require('nx/src/command-line/release/utils/launch-editor');
|
|
|
77687
77684
|
var _printchanges = require('nx/src/command-line/release/utils/print-changes');
|
|
77688
77685
|
var _printconfig = require('nx/src/command-line/release/utils/print-config');
|
|
77689
77686
|
var _github = require('nx/src/command-line/release/utils/remote-release-clients/github');
|
|
77690
|
-
var _remotereleaseclient = require('nx/src/command-line/release/utils/remote-release-clients/remote-release-client');
|
|
77691
77687
|
var _resolvenxjsonerrormessage = require('nx/src/command-line/release/utils/resolve-nx-json-error-message');
|
|
77692
77688
|
|
|
77693
77689
|
|
|
@@ -77695,7 +77691,6 @@ var _resolvenxjsonerrormessage = require('nx/src/command-line/release/utils/reso
|
|
|
77695
77691
|
|
|
77696
77692
|
|
|
77697
77693
|
|
|
77698
|
-
|
|
77699
77694
|
var _shared = require('nx/src/command-line/release/utils/shared');
|
|
77700
77695
|
|
|
77701
77696
|
|
|
@@ -77794,6 +77789,7 @@ function parseChangelogMarkdown(contents) {
|
|
|
77794
77789
|
// src/utilities/git-utils.ts
|
|
77795
77790
|
_chunkIG6EXAQUcjs.init_cjs_shims.call(void 0, );
|
|
77796
77791
|
var _execcommandjs = require('nx/src/command-line/release/utils/exec-command.js');
|
|
77792
|
+
|
|
77797
77793
|
async function gitTag({
|
|
77798
77794
|
tag,
|
|
77799
77795
|
message: message2,
|
|
@@ -77836,6 +77832,76 @@ async function gitTag({
|
|
|
77836
77832
|
${err}`);
|
|
77837
77833
|
}
|
|
77838
77834
|
}
|
|
77835
|
+
async function gitCommit({
|
|
77836
|
+
messages,
|
|
77837
|
+
additionalArgs,
|
|
77838
|
+
dryRun,
|
|
77839
|
+
verbose,
|
|
77840
|
+
logFn
|
|
77841
|
+
}) {
|
|
77842
|
+
logFn = logFn || console.log;
|
|
77843
|
+
const commandArgs = ["commit", "-S"];
|
|
77844
|
+
for (const message2 of messages) {
|
|
77845
|
+
commandArgs.push("--message", message2);
|
|
77846
|
+
}
|
|
77847
|
+
if (additionalArgs) {
|
|
77848
|
+
if (Array.isArray(additionalArgs)) {
|
|
77849
|
+
commandArgs.push(...additionalArgs);
|
|
77850
|
+
} else {
|
|
77851
|
+
commandArgs.push(...additionalArgs.split(" "));
|
|
77852
|
+
}
|
|
77853
|
+
}
|
|
77854
|
+
if (verbose) {
|
|
77855
|
+
logFn(
|
|
77856
|
+
dryRun ? `Would commit all previously staged files in git with the following command, but --dry-run was set:` : `Committing files in git with the following command:`
|
|
77857
|
+
);
|
|
77858
|
+
logFn(`git ${commandArgs.join(" ")}`);
|
|
77859
|
+
}
|
|
77860
|
+
if (dryRun) {
|
|
77861
|
+
return;
|
|
77862
|
+
}
|
|
77863
|
+
let hasStagedFiles = false;
|
|
77864
|
+
try {
|
|
77865
|
+
await _execcommandjs.execCommand.call(void 0, "git", ["diff-index", "--quiet", "HEAD", "--cached"]);
|
|
77866
|
+
} catch (e16) {
|
|
77867
|
+
hasStagedFiles = true;
|
|
77868
|
+
}
|
|
77869
|
+
if (!hasStagedFiles) {
|
|
77870
|
+
logFn("\nNo staged files found. Skipping commit.");
|
|
77871
|
+
return;
|
|
77872
|
+
}
|
|
77873
|
+
return _execcommandjs.execCommand.call(void 0, "git", commandArgs);
|
|
77874
|
+
}
|
|
77875
|
+
async function commitChanges({
|
|
77876
|
+
changedFiles,
|
|
77877
|
+
deletedFiles,
|
|
77878
|
+
isDryRun,
|
|
77879
|
+
isVerbose: isVerbose2,
|
|
77880
|
+
gitCommitMessages,
|
|
77881
|
+
gitCommitArgs,
|
|
77882
|
+
logFn
|
|
77883
|
+
}) {
|
|
77884
|
+
logFn = logFn || console.log;
|
|
77885
|
+
if (!_optionalChain([changedFiles, 'optionalAccess', _189 => _189.length]) && !_optionalChain([deletedFiles, 'optionalAccess', _190 => _190.length])) {
|
|
77886
|
+
throw new Error("Error: No changed files to commit");
|
|
77887
|
+
}
|
|
77888
|
+
logFn(`Committing changes with git`);
|
|
77889
|
+
await _git.gitAdd.call(void 0, {
|
|
77890
|
+
changedFiles,
|
|
77891
|
+
deletedFiles,
|
|
77892
|
+
dryRun: isDryRun,
|
|
77893
|
+
verbose: isVerbose2
|
|
77894
|
+
});
|
|
77895
|
+
if (isVerbose2) {
|
|
77896
|
+
console.log("");
|
|
77897
|
+
}
|
|
77898
|
+
await gitCommit({
|
|
77899
|
+
messages: gitCommitMessages || [],
|
|
77900
|
+
additionalArgs: gitCommitArgs,
|
|
77901
|
+
dryRun: isDryRun,
|
|
77902
|
+
verbose: isVerbose2
|
|
77903
|
+
});
|
|
77904
|
+
}
|
|
77839
77905
|
|
|
77840
77906
|
// src/release/changelog-renderer.ts
|
|
77841
77907
|
_chunkIG6EXAQUcjs.init_cjs_shims.call(void 0, );
|
|
@@ -81239,6 +81305,195 @@ var {
|
|
|
81239
81305
|
var import_semver = _chunkIG6EXAQUcjs.__toESM.call(void 0, require_semver4(), 1);
|
|
81240
81306
|
var _changelogrenderer = require('nx/release/changelog-renderer'); var _changelogrenderer2 = _interopRequireDefault(_changelogrenderer);
|
|
81241
81307
|
var _conventionalcommits = require('nx/src/command-line/release/config/conventional-commits');
|
|
81308
|
+
var StormChangelogRenderer = (_class16 = class extends _changelogrenderer2.default {
|
|
81309
|
+
/**
|
|
81310
|
+
* The Storm workspace configuration object, which is loaded from the storm-workspace.json file.
|
|
81311
|
+
*/
|
|
81312
|
+
__init43() {this.workspaceConfig = null}
|
|
81313
|
+
/**
|
|
81314
|
+
* The configuration object for the ChangelogRenderer, which includes the changes, version, project, and other options.
|
|
81315
|
+
*/
|
|
81316
|
+
|
|
81317
|
+
/**
|
|
81318
|
+
* A ChangelogRenderer class takes in the determined changes and other relevant metadata and returns a string, or a Promise of a string of changelog contents (usually markdown).
|
|
81319
|
+
*
|
|
81320
|
+
* @param config - The configuration object for the ChangelogRenderer
|
|
81321
|
+
*/
|
|
81322
|
+
constructor(config) {
|
|
81323
|
+
super(config);_class16.prototype.__init43.call(this);;
|
|
81324
|
+
this.config = {
|
|
81325
|
+
...config,
|
|
81326
|
+
repoData: config.remoteReleaseClient.getRemoteRepoData()
|
|
81327
|
+
};
|
|
81328
|
+
}
|
|
81329
|
+
async render() {
|
|
81330
|
+
this.workspaceConfig = await _chunkXE275LJTcjs.getWorkspaceConfig.call(void 0, );
|
|
81331
|
+
return await super.render();
|
|
81332
|
+
}
|
|
81333
|
+
preprocessChanges() {
|
|
81334
|
+
this.relevantChanges = [...this.changes];
|
|
81335
|
+
this.breakingChanges = [];
|
|
81336
|
+
this.additionalChangesForAuthorsSection = [];
|
|
81337
|
+
for (let i = this.relevantChanges.length - 1; i >= 0; i--) {
|
|
81338
|
+
const change = this.relevantChanges[i];
|
|
81339
|
+
if (change && change.type === "revert" && change.revertedHashes) {
|
|
81340
|
+
for (const revertedHash of change.revertedHashes) {
|
|
81341
|
+
const revertedCommitIndex = this.relevantChanges.findIndex(
|
|
81342
|
+
(c) => c.shortHash && revertedHash.startsWith(c.shortHash)
|
|
81343
|
+
);
|
|
81344
|
+
if (revertedCommitIndex !== -1) {
|
|
81345
|
+
this.relevantChanges.splice(revertedCommitIndex, 1);
|
|
81346
|
+
this.relevantChanges.splice(i, 1);
|
|
81347
|
+
i--;
|
|
81348
|
+
break;
|
|
81349
|
+
}
|
|
81350
|
+
}
|
|
81351
|
+
}
|
|
81352
|
+
}
|
|
81353
|
+
if (this.isVersionPlans) {
|
|
81354
|
+
this.conventionalCommitsConfig = {
|
|
81355
|
+
types: {
|
|
81356
|
+
feat: _conventionalcommits.DEFAULT_CONVENTIONAL_COMMITS_CONFIG.types.feat,
|
|
81357
|
+
fix: _conventionalcommits.DEFAULT_CONVENTIONAL_COMMITS_CONFIG.types.fix
|
|
81358
|
+
}
|
|
81359
|
+
};
|
|
81360
|
+
for (let i = this.relevantChanges.length - 1; i >= 0; i--) {
|
|
81361
|
+
if (_optionalChain([this, 'access', _191 => _191.relevantChanges, 'access', _192 => _192[i], 'optionalAccess', _193 => _193.isBreaking])) {
|
|
81362
|
+
const change = this.relevantChanges[i];
|
|
81363
|
+
if (change) {
|
|
81364
|
+
this.additionalChangesForAuthorsSection.push(change);
|
|
81365
|
+
const line = this.formatChange(change);
|
|
81366
|
+
this.breakingChanges.push(line);
|
|
81367
|
+
this.relevantChanges.splice(i, 1);
|
|
81368
|
+
}
|
|
81369
|
+
}
|
|
81370
|
+
}
|
|
81371
|
+
} else {
|
|
81372
|
+
for (const change of this.relevantChanges) {
|
|
81373
|
+
if (change.isBreaking) {
|
|
81374
|
+
const breakingChangeExplanation = change.body ? this.extractBreakingChangeExplanation(change.body) : "";
|
|
81375
|
+
this.breakingChanges.push(
|
|
81376
|
+
breakingChangeExplanation ? `- ${change.scope ? `**${change.scope.trim()}:** ` : ""}${breakingChangeExplanation}` : this.formatChange(change)
|
|
81377
|
+
);
|
|
81378
|
+
}
|
|
81379
|
+
}
|
|
81380
|
+
}
|
|
81381
|
+
}
|
|
81382
|
+
/**
|
|
81383
|
+
* Determines if the changelog entry should be rendered as empty. This is the case when there are no relevant changes, breaking changes, or dependency bumps.
|
|
81384
|
+
*/
|
|
81385
|
+
// protected override shouldRenderEmptyEntry(): boolean {
|
|
81386
|
+
// return true;
|
|
81387
|
+
// }
|
|
81388
|
+
renderVersionTitle() {
|
|
81389
|
+
const isMajorVersion = `${(0, import_semver.major)(this.changelogEntryVersion)}.0.0` === this.changelogEntryVersion.replace(/^v/, "");
|
|
81390
|
+
return isMajorVersion ? `# ${generateChangelogTitle(this.changelogEntryVersion, this.project, this.workspaceConfig)}` : `## ${generateChangelogTitle(this.changelogEntryVersion, this.project, this.workspaceConfig)}`;
|
|
81391
|
+
}
|
|
81392
|
+
renderBreakingChanges() {
|
|
81393
|
+
return [
|
|
81394
|
+
"### Breaking Changes",
|
|
81395
|
+
"",
|
|
81396
|
+
...Array.from(new Set(this.breakingChanges))
|
|
81397
|
+
];
|
|
81398
|
+
}
|
|
81399
|
+
renderDependencyBumps() {
|
|
81400
|
+
const markdownLines = ["", "### Updated Dependencies", ""];
|
|
81401
|
+
_optionalChain([this, 'access', _194 => _194.dependencyBumps, 'optionalAccess', _195 => _195.forEach, 'call', _196 => _196(({ dependencyName, newVersion }) => {
|
|
81402
|
+
markdownLines.push(`- Updated ${dependencyName} to ${newVersion}`);
|
|
81403
|
+
})]);
|
|
81404
|
+
return markdownLines;
|
|
81405
|
+
}
|
|
81406
|
+
async renderAuthors() {
|
|
81407
|
+
const markdownLines = [];
|
|
81408
|
+
const _authors = /* @__PURE__ */ new Map();
|
|
81409
|
+
for (const change of [
|
|
81410
|
+
...this.relevantChanges,
|
|
81411
|
+
...this.additionalChangesForAuthorsSection
|
|
81412
|
+
]) {
|
|
81413
|
+
if (!change.authors) {
|
|
81414
|
+
continue;
|
|
81415
|
+
}
|
|
81416
|
+
for (const author of change.authors) {
|
|
81417
|
+
const name = this.formatName(author.name);
|
|
81418
|
+
if (!name || name.includes("[bot]") || name === _optionalChain([this, 'access', _197 => _197.workspaceConfig, 'optionalAccess', _198 => _198.bot, 'access', _199 => _199.name])) {
|
|
81419
|
+
continue;
|
|
81420
|
+
}
|
|
81421
|
+
if (_authors.has(name)) {
|
|
81422
|
+
const entry = _authors.get(name);
|
|
81423
|
+
_optionalChain([entry, 'optionalAccess', _200 => _200.email, 'access', _201 => _201.add, 'call', _202 => _202(author.email)]);
|
|
81424
|
+
} else {
|
|
81425
|
+
_authors.set(name, { email: /* @__PURE__ */ new Set([author.email]) });
|
|
81426
|
+
}
|
|
81427
|
+
}
|
|
81428
|
+
}
|
|
81429
|
+
if (this.config.repoData && this.changelogRenderOptions.mapAuthorsToGitHubUsernames) {
|
|
81430
|
+
await Promise.all(
|
|
81431
|
+
[..._authors.keys()].map(async (authorName) => {
|
|
81432
|
+
const meta = _authors.get(authorName);
|
|
81433
|
+
if (!meta) {
|
|
81434
|
+
return;
|
|
81435
|
+
}
|
|
81436
|
+
for (const email of meta.email) {
|
|
81437
|
+
if (email.endsWith("@users.noreply.github.com")) {
|
|
81438
|
+
const match = email.match(
|
|
81439
|
+
/^(\d+\+)?([^@]+)@users\.noreply\.github\.com$/
|
|
81440
|
+
);
|
|
81441
|
+
if (match && match[2]) {
|
|
81442
|
+
meta.github = match[2];
|
|
81443
|
+
break;
|
|
81444
|
+
}
|
|
81445
|
+
}
|
|
81446
|
+
const { data } = await axios_default.get(`https://ungh.cc/users/find/${email}`).catch(() => ({ data: { user: null } }));
|
|
81447
|
+
if (_optionalChain([data, 'optionalAccess', _203 => _203.user])) {
|
|
81448
|
+
meta.github = data.user.username;
|
|
81449
|
+
break;
|
|
81450
|
+
}
|
|
81451
|
+
}
|
|
81452
|
+
})
|
|
81453
|
+
);
|
|
81454
|
+
}
|
|
81455
|
+
const authors = [..._authors.entries()].map((e) => ({
|
|
81456
|
+
name: e[0],
|
|
81457
|
+
...e[1]
|
|
81458
|
+
}));
|
|
81459
|
+
if (authors.length > 0) {
|
|
81460
|
+
markdownLines.push(
|
|
81461
|
+
"",
|
|
81462
|
+
"### \u2764\uFE0F Thank You",
|
|
81463
|
+
"",
|
|
81464
|
+
...authors.sort((a, b) => a.name.localeCompare(b.name)).map((i) => {
|
|
81465
|
+
const github = i.github ? ` @${i.github}` : "";
|
|
81466
|
+
return `- ${i.name}${github}`;
|
|
81467
|
+
})
|
|
81468
|
+
);
|
|
81469
|
+
}
|
|
81470
|
+
return markdownLines;
|
|
81471
|
+
}
|
|
81472
|
+
formatChange(change) {
|
|
81473
|
+
let description = change.description || "";
|
|
81474
|
+
let extraLines = [];
|
|
81475
|
+
let extraLinesStr = "";
|
|
81476
|
+
if (description.includes("\n")) {
|
|
81477
|
+
const lines2 = description.split("\n");
|
|
81478
|
+
if (lines2.length > 1) {
|
|
81479
|
+
description = lines2[0];
|
|
81480
|
+
extraLines = lines2.slice(1);
|
|
81481
|
+
}
|
|
81482
|
+
const indentation = " ";
|
|
81483
|
+
extraLinesStr = extraLines.filter((l) => l.trim().length > 0).map((l) => `${indentation}${l}`).join("\n");
|
|
81484
|
+
}
|
|
81485
|
+
let changeLine = "- " + (!this.isVersionPlans && change.scope ? `**${change.scope.trim()}:** ` : "") + description;
|
|
81486
|
+
if (this.config.repoData && change.githubReferences) {
|
|
81487
|
+
changeLine += this.remoteReleaseClient.formatReferences(
|
|
81488
|
+
change.githubReferences
|
|
81489
|
+
);
|
|
81490
|
+
}
|
|
81491
|
+
if (extraLinesStr) {
|
|
81492
|
+
changeLine += "\n\n" + extraLinesStr;
|
|
81493
|
+
}
|
|
81494
|
+
return changeLine;
|
|
81495
|
+
}
|
|
81496
|
+
}, _class16);
|
|
81242
81497
|
|
|
81243
81498
|
// src/release/github.ts
|
|
81244
81499
|
_chunkIG6EXAQUcjs.init_cjs_shims.call(void 0, );
|
|
@@ -81253,6 +81508,9 @@ var import_enquirer = _chunkIG6EXAQUcjs.__toESM.call(void 0, require_enquirer(),
|
|
|
81253
81508
|
|
|
81254
81509
|
|
|
81255
81510
|
|
|
81511
|
+
|
|
81512
|
+
|
|
81513
|
+
|
|
81256
81514
|
function getGitHubRepoData(remoteName = "origin", createReleaseConfig) {
|
|
81257
81515
|
try {
|
|
81258
81516
|
const remoteUrl = _child_process.execSync.call(void 0, `git remote get-url ${remoteName}`, {
|
|
@@ -81282,7 +81540,11 @@ function getGitHubRepoData(remoteName = "origin", createReleaseConfig) {
|
|
|
81282
81540
|
);
|
|
81283
81541
|
}
|
|
81284
81542
|
} catch (error) {
|
|
81285
|
-
|
|
81543
|
+
import_devkit.output.error({
|
|
81544
|
+
title: `Failed to get GitHub repo data`,
|
|
81545
|
+
bodyLines: [error.message]
|
|
81546
|
+
});
|
|
81547
|
+
return void 0;
|
|
81286
81548
|
}
|
|
81287
81549
|
}
|
|
81288
81550
|
async function createOrUpdateGithubRelease(createReleaseConfig, releaseVersion, changelogContents, latestCommit, { dryRun }) {
|
|
@@ -81296,12 +81558,12 @@ async function createOrUpdateGithubRelease(createReleaseConfig, releaseVersion,
|
|
|
81296
81558
|
});
|
|
81297
81559
|
process.exit(1);
|
|
81298
81560
|
}
|
|
81299
|
-
const
|
|
81561
|
+
const tokenData = await resolveTokenData(githubRepoData.hostname);
|
|
81300
81562
|
const githubRequestConfig = {
|
|
81301
81563
|
repo: githubRepoData.slug,
|
|
81302
81564
|
hostname: githubRepoData.hostname,
|
|
81303
81565
|
apiBaseUrl: githubRepoData.apiBaseUrl,
|
|
81304
|
-
token
|
|
81566
|
+
token: _optionalChain([tokenData, 'optionalAccess', _204 => _204.token]) || null
|
|
81305
81567
|
};
|
|
81306
81568
|
let existingGithubReleaseForVersion;
|
|
81307
81569
|
try {
|
|
@@ -81310,7 +81572,7 @@ async function createOrUpdateGithubRelease(createReleaseConfig, releaseVersion,
|
|
|
81310
81572
|
releaseVersion.gitTag
|
|
81311
81573
|
);
|
|
81312
81574
|
} catch (err) {
|
|
81313
|
-
if (_optionalChain([err, 'access',
|
|
81575
|
+
if (_optionalChain([err, 'access', _205 => _205.response, 'optionalAccess', _206 => _206.status]) === 401) {
|
|
81314
81576
|
import_devkit.output.error({
|
|
81315
81577
|
title: `Unable to resolve data via the GitHub API. You can use any of the following options to resolve this:`,
|
|
81316
81578
|
bodyLines: [
|
|
@@ -81320,7 +81582,7 @@ async function createOrUpdateGithubRelease(createReleaseConfig, releaseVersion,
|
|
|
81320
81582
|
});
|
|
81321
81583
|
process.exit(1);
|
|
81322
81584
|
}
|
|
81323
|
-
if (_optionalChain([err, 'access',
|
|
81585
|
+
if (_optionalChain([err, 'access', _207 => _207.response, 'optionalAccess', _208 => _208.status]) === 404) {
|
|
81324
81586
|
} else {
|
|
81325
81587
|
throw err;
|
|
81326
81588
|
}
|
|
@@ -81337,7 +81599,7 @@ async function createOrUpdateGithubRelease(createReleaseConfig, releaseVersion,
|
|
|
81337
81599
|
}
|
|
81338
81600
|
console.log("");
|
|
81339
81601
|
_printchanges.printDiff.call(void 0,
|
|
81340
|
-
_optionalChain([existingGithubReleaseForVersion, 'optionalAccess',
|
|
81602
|
+
_optionalChain([existingGithubReleaseForVersion, 'optionalAccess', _209 => _209.body]) ? existingGithubReleaseForVersion.body : "",
|
|
81341
81603
|
changelogContents,
|
|
81342
81604
|
3,
|
|
81343
81605
|
_shared.noDiffInChangelogMessage
|
|
@@ -81364,7 +81626,7 @@ async function createOrUpdateGithubReleaseInternal(githubRequestConfig, release,
|
|
|
81364
81626
|
if (result2.status === "manual") {
|
|
81365
81627
|
if (result2.error) {
|
|
81366
81628
|
process.exitCode = 1;
|
|
81367
|
-
if (_optionalChain([result2, 'access',
|
|
81629
|
+
if (_optionalChain([result2, 'access', _210 => _210.error, 'access', _211 => _211.response, 'optionalAccess', _212 => _212.data])) {
|
|
81368
81630
|
import_devkit.output.error({
|
|
81369
81631
|
title: `A GitHub API Error occurred when creating/updating the release`,
|
|
81370
81632
|
bodyLines: [
|
|
@@ -81438,7 +81700,7 @@ async function promptForContinueInGitHub() {
|
|
|
81438
81700
|
}
|
|
81439
81701
|
]);
|
|
81440
81702
|
return reply.open === "Yes";
|
|
81441
|
-
} catch (
|
|
81703
|
+
} catch (e17) {
|
|
81442
81704
|
process.stdout.write("\x1B[?25h");
|
|
81443
81705
|
process.exit(1);
|
|
81444
81706
|
}
|
|
@@ -81475,13 +81737,13 @@ async function syncGithubRelease(githubRequestConfig, release, existingGithubRel
|
|
|
81475
81737
|
};
|
|
81476
81738
|
}
|
|
81477
81739
|
}
|
|
81478
|
-
async function
|
|
81479
|
-
const tokenFromEnv = process.env.GITHUB_TOKEN || process.env.GH_TOKEN;
|
|
81740
|
+
async function resolveTokenData(hostname) {
|
|
81741
|
+
const tokenFromEnv = process.env.STORM_BOT_GITHUB_TOKEN || process.env.GITHUB_TOKEN || process.env.GH_TOKEN;
|
|
81480
81742
|
if (tokenFromEnv) {
|
|
81481
|
-
return tokenFromEnv;
|
|
81743
|
+
return { token: tokenFromEnv, headerName: "Authorization" };
|
|
81482
81744
|
}
|
|
81483
|
-
const ghCLIPath =
|
|
81484
|
-
process.env.XDG_CONFIG_HOME ||
|
|
81745
|
+
const ghCLIPath = (0, import_devkit.joinPathFragments)(
|
|
81746
|
+
process.env.XDG_CONFIG_HOME || (0, import_devkit.joinPathFragments)(_os.homedir.call(void 0, ), ".config"),
|
|
81485
81747
|
"gh",
|
|
81486
81748
|
"hosts.yml"
|
|
81487
81749
|
);
|
|
@@ -81494,11 +81756,12 @@ async function resolveGithubToken(hostname) {
|
|
|
81494
81756
|
return ghCLIConfig[hostname].oauth_token;
|
|
81495
81757
|
}
|
|
81496
81758
|
if (ghCLIConfig[hostname].user && ghCLIConfig[hostname].git_protocol === "ssh") {
|
|
81497
|
-
|
|
81759
|
+
const token = _child_process.execSync.call(void 0, `gh auth token`, {
|
|
81498
81760
|
encoding: "utf8",
|
|
81499
81761
|
stdio: "pipe",
|
|
81500
81762
|
windowsHide: false
|
|
81501
81763
|
}).trim();
|
|
81764
|
+
return { token, headerName: "Authorization" };
|
|
81502
81765
|
}
|
|
81503
81766
|
}
|
|
81504
81767
|
}
|
|
@@ -81507,7 +81770,9 @@ async function resolveGithubToken(hostname) {
|
|
|
81507
81770
|
`Warning: It was not possible to automatically resolve a GitHub token from your environment for hostname ${hostname}. If you set the GITHUB_TOKEN or GH_TOKEN environment variable, that will be used for GitHub API requests.`
|
|
81508
81771
|
);
|
|
81509
81772
|
}
|
|
81510
|
-
|
|
81773
|
+
throw new Error(
|
|
81774
|
+
`Unable to resolve a GitHub token for hostname ${hostname}. Please set the GITHUB_TOKEN or GH_TOKEN environment variable, or ensure you have an active session via the official gh CLI tool (https://cli.github.com).`
|
|
81775
|
+
);
|
|
81511
81776
|
}
|
|
81512
81777
|
async function getGithubReleaseByTag(config, tag) {
|
|
81513
81778
|
return await makeGithubRequest(
|
|
@@ -81549,210 +81814,24 @@ function githubNewReleaseURL(config, release) {
|
|
|
81549
81814
|
}
|
|
81550
81815
|
return url2;
|
|
81551
81816
|
}
|
|
81552
|
-
|
|
81553
|
-
|
|
81554
|
-
|
|
81555
|
-
|
|
81556
|
-
|
|
81557
|
-
|
|
81558
|
-
}
|
|
81559
|
-
function formatReferences(references, repoData) {
|
|
81560
|
-
const pr = references.filter((ref) => ref.type === "pull-request");
|
|
81561
|
-
const issue = references.filter((ref) => ref.type === "issue");
|
|
81562
|
-
if (pr.length > 0 || issue.length > 0) {
|
|
81563
|
-
return " (" + [...pr, ...issue].map((ref) => formatReference(ref, repoData)).join(", ") + ")";
|
|
81564
|
-
}
|
|
81565
|
-
if (references.length > 0) {
|
|
81566
|
-
return " (" + formatReference(references[0], repoData) + ")";
|
|
81817
|
+
async function createGithubRemoteReleaseClient(remoteName = "origin") {
|
|
81818
|
+
const repoData = getGitHubRepoData(remoteName, "github");
|
|
81819
|
+
if (!repoData) {
|
|
81820
|
+
throw new Error(
|
|
81821
|
+
`Unable to create a remote release client because the GitHub repo slug could not be determined. Please ensure you have a valid GitHub remote configured.`
|
|
81822
|
+
);
|
|
81567
81823
|
}
|
|
81568
|
-
return
|
|
81824
|
+
return new (0, _github.GithubRemoteReleaseClient)(
|
|
81825
|
+
repoData,
|
|
81826
|
+
{
|
|
81827
|
+
provider: "github",
|
|
81828
|
+
hostname: repoData.hostname,
|
|
81829
|
+
apiBaseUrl: repoData.apiBaseUrl
|
|
81830
|
+
},
|
|
81831
|
+
await resolveTokenData(repoData.hostname)
|
|
81832
|
+
);
|
|
81569
81833
|
}
|
|
81570
81834
|
|
|
81571
|
-
// src/release/changelog-renderer.ts
|
|
81572
|
-
var StormChangelogRenderer = (_class16 = class extends _changelogrenderer2.default {
|
|
81573
|
-
/**
|
|
81574
|
-
* A ChangelogRenderer class takes in the determined changes and other relevant metadata and returns a string, or a Promise of a string of changelog contents (usually markdown).
|
|
81575
|
-
*
|
|
81576
|
-
* @param config - The configuration object for the ChangelogRenderer
|
|
81577
|
-
*/
|
|
81578
|
-
constructor(config) {
|
|
81579
|
-
super(config);_class16.prototype.__init43.call(this);;
|
|
81580
|
-
this.config = config;
|
|
81581
|
-
}
|
|
81582
|
-
/**
|
|
81583
|
-
* The Storm workspace configuration object, which is loaded from the storm-workspace.json file.
|
|
81584
|
-
*/
|
|
81585
|
-
__init43() {this.workspaceConfig = null}
|
|
81586
|
-
async render() {
|
|
81587
|
-
this.workspaceConfig = await _chunkXE275LJTcjs.getWorkspaceConfig.call(void 0, );
|
|
81588
|
-
return await super.render();
|
|
81589
|
-
}
|
|
81590
|
-
preprocessChanges() {
|
|
81591
|
-
this.relevantChanges = [...this.changes];
|
|
81592
|
-
this.breakingChanges = [];
|
|
81593
|
-
this.additionalChangesForAuthorsSection = [];
|
|
81594
|
-
for (let i = this.relevantChanges.length - 1; i >= 0; i--) {
|
|
81595
|
-
const change = this.relevantChanges[i];
|
|
81596
|
-
if (change && change.type === "revert" && change.revertedHashes) {
|
|
81597
|
-
for (const revertedHash of change.revertedHashes) {
|
|
81598
|
-
const revertedCommitIndex = this.relevantChanges.findIndex(
|
|
81599
|
-
(c) => c.shortHash && revertedHash.startsWith(c.shortHash)
|
|
81600
|
-
);
|
|
81601
|
-
if (revertedCommitIndex !== -1) {
|
|
81602
|
-
this.relevantChanges.splice(revertedCommitIndex, 1);
|
|
81603
|
-
this.relevantChanges.splice(i, 1);
|
|
81604
|
-
i--;
|
|
81605
|
-
break;
|
|
81606
|
-
}
|
|
81607
|
-
}
|
|
81608
|
-
}
|
|
81609
|
-
}
|
|
81610
|
-
if (this.isVersionPlans) {
|
|
81611
|
-
this.conventionalCommitsConfig = {
|
|
81612
|
-
types: {
|
|
81613
|
-
feat: _conventionalcommits.DEFAULT_CONVENTIONAL_COMMITS_CONFIG.types.feat,
|
|
81614
|
-
fix: _conventionalcommits.DEFAULT_CONVENTIONAL_COMMITS_CONFIG.types.fix
|
|
81615
|
-
}
|
|
81616
|
-
};
|
|
81617
|
-
for (let i = this.relevantChanges.length - 1; i >= 0; i--) {
|
|
81618
|
-
if (_optionalChain([this, 'access', _197 => _197.relevantChanges, 'access', _198 => _198[i], 'optionalAccess', _199 => _199.isBreaking])) {
|
|
81619
|
-
const change = this.relevantChanges[i];
|
|
81620
|
-
if (change) {
|
|
81621
|
-
this.additionalChangesForAuthorsSection.push(change);
|
|
81622
|
-
const line = this.formatChange(change);
|
|
81623
|
-
this.breakingChanges.push(line);
|
|
81624
|
-
this.relevantChanges.splice(i, 1);
|
|
81625
|
-
}
|
|
81626
|
-
}
|
|
81627
|
-
}
|
|
81628
|
-
} else {
|
|
81629
|
-
for (const change of this.relevantChanges) {
|
|
81630
|
-
if (change.isBreaking) {
|
|
81631
|
-
const breakingChangeExplanation = change.body ? this.extractBreakingChangeExplanation(change.body) : "";
|
|
81632
|
-
this.breakingChanges.push(
|
|
81633
|
-
breakingChangeExplanation ? `- ${change.scope ? `**${change.scope.trim()}:** ` : ""}${breakingChangeExplanation}` : this.formatChange(change)
|
|
81634
|
-
);
|
|
81635
|
-
}
|
|
81636
|
-
}
|
|
81637
|
-
}
|
|
81638
|
-
}
|
|
81639
|
-
/**
|
|
81640
|
-
* Determines if the changelog entry should be rendered as empty. This is the case when there are no relevant changes, breaking changes, or dependency bumps.
|
|
81641
|
-
*/
|
|
81642
|
-
// protected override shouldRenderEmptyEntry(): boolean {
|
|
81643
|
-
// return true;
|
|
81644
|
-
// }
|
|
81645
|
-
renderVersionTitle() {
|
|
81646
|
-
const isMajorVersion = `${(0, import_semver.major)(this.changelogEntryVersion)}.0.0` === this.changelogEntryVersion.replace(/^v/, "");
|
|
81647
|
-
return isMajorVersion ? `# ${generateChangelogTitle(this.changelogEntryVersion, this.project, this.workspaceConfig)}` : `## ${generateChangelogTitle(this.changelogEntryVersion, this.project, this.workspaceConfig)}`;
|
|
81648
|
-
}
|
|
81649
|
-
renderBreakingChanges() {
|
|
81650
|
-
return [
|
|
81651
|
-
"### Breaking Changes",
|
|
81652
|
-
"",
|
|
81653
|
-
...Array.from(new Set(this.breakingChanges))
|
|
81654
|
-
];
|
|
81655
|
-
}
|
|
81656
|
-
renderDependencyBumps() {
|
|
81657
|
-
const markdownLines = ["", "### Updated Dependencies", ""];
|
|
81658
|
-
_optionalChain([this, 'access', _200 => _200.dependencyBumps, 'optionalAccess', _201 => _201.forEach, 'call', _202 => _202(({ dependencyName, newVersion }) => {
|
|
81659
|
-
markdownLines.push(`- Updated ${dependencyName} to ${newVersion}`);
|
|
81660
|
-
})]);
|
|
81661
|
-
return markdownLines;
|
|
81662
|
-
}
|
|
81663
|
-
async renderAuthors() {
|
|
81664
|
-
const markdownLines = [];
|
|
81665
|
-
const _authors = /* @__PURE__ */ new Map();
|
|
81666
|
-
for (const change of [
|
|
81667
|
-
...this.relevantChanges,
|
|
81668
|
-
...this.additionalChangesForAuthorsSection
|
|
81669
|
-
]) {
|
|
81670
|
-
if (!change.authors) {
|
|
81671
|
-
continue;
|
|
81672
|
-
}
|
|
81673
|
-
for (const author of change.authors) {
|
|
81674
|
-
const name = this.formatName(author.name);
|
|
81675
|
-
if (!name || name.includes("[bot]") || name === _optionalChain([this, 'access', _203 => _203.workspaceConfig, 'optionalAccess', _204 => _204.bot, 'access', _205 => _205.name])) {
|
|
81676
|
-
continue;
|
|
81677
|
-
}
|
|
81678
|
-
if (_authors.has(name)) {
|
|
81679
|
-
const entry = _authors.get(name);
|
|
81680
|
-
_optionalChain([entry, 'optionalAccess', _206 => _206.email, 'access', _207 => _207.add, 'call', _208 => _208(author.email)]);
|
|
81681
|
-
} else {
|
|
81682
|
-
_authors.set(name, { email: /* @__PURE__ */ new Set([author.email]) });
|
|
81683
|
-
}
|
|
81684
|
-
}
|
|
81685
|
-
}
|
|
81686
|
-
if (this.config.repoData && this.changelogRenderOptions.mapAuthorsToGitHubUsernames) {
|
|
81687
|
-
await Promise.all(
|
|
81688
|
-
[..._authors.keys()].map(async (authorName) => {
|
|
81689
|
-
const meta = _authors.get(authorName);
|
|
81690
|
-
if (!meta) {
|
|
81691
|
-
return;
|
|
81692
|
-
}
|
|
81693
|
-
for (const email of meta.email) {
|
|
81694
|
-
if (email.endsWith("@users.noreply.github.com")) {
|
|
81695
|
-
const match = email.match(
|
|
81696
|
-
/^(\d+\+)?([^@]+)@users\.noreply\.github\.com$/
|
|
81697
|
-
);
|
|
81698
|
-
if (match && match[2]) {
|
|
81699
|
-
meta.github = match[2];
|
|
81700
|
-
break;
|
|
81701
|
-
}
|
|
81702
|
-
}
|
|
81703
|
-
const { data } = await axios_default.get(`https://ungh.cc/users/find/${email}`).catch(() => ({ data: { user: null } }));
|
|
81704
|
-
if (_optionalChain([data, 'optionalAccess', _209 => _209.user])) {
|
|
81705
|
-
meta.github = data.user.username;
|
|
81706
|
-
break;
|
|
81707
|
-
}
|
|
81708
|
-
}
|
|
81709
|
-
})
|
|
81710
|
-
);
|
|
81711
|
-
}
|
|
81712
|
-
const authors = [..._authors.entries()].map((e) => ({
|
|
81713
|
-
name: e[0],
|
|
81714
|
-
...e[1]
|
|
81715
|
-
}));
|
|
81716
|
-
if (authors.length > 0) {
|
|
81717
|
-
markdownLines.push(
|
|
81718
|
-
"",
|
|
81719
|
-
"### \u2764\uFE0F Thank You",
|
|
81720
|
-
"",
|
|
81721
|
-
...authors.sort((a, b) => a.name.localeCompare(b.name)).map((i) => {
|
|
81722
|
-
const github = i.github ? ` @${i.github}` : "";
|
|
81723
|
-
return `- ${i.name}${github}`;
|
|
81724
|
-
})
|
|
81725
|
-
);
|
|
81726
|
-
}
|
|
81727
|
-
return markdownLines;
|
|
81728
|
-
}
|
|
81729
|
-
formatChange(change) {
|
|
81730
|
-
let description = change.description || "";
|
|
81731
|
-
let extraLines = [];
|
|
81732
|
-
let extraLinesStr = "";
|
|
81733
|
-
if (description.includes("\n")) {
|
|
81734
|
-
const lines2 = description.split("\n");
|
|
81735
|
-
if (lines2.length > 1) {
|
|
81736
|
-
description = lines2[0];
|
|
81737
|
-
extraLines = lines2.slice(1);
|
|
81738
|
-
}
|
|
81739
|
-
const indentation = " ";
|
|
81740
|
-
extraLinesStr = extraLines.filter((l) => l.trim().length > 0).map((l) => `${indentation}${l}`).join("\n");
|
|
81741
|
-
}
|
|
81742
|
-
let changeLine = "- " + (!this.isVersionPlans && change.scope ? `**${change.scope.trim()}:** ` : "") + description;
|
|
81743
|
-
if (this.config.repoData && this.changelogRenderOptions.commitReferences && change.githubReferences) {
|
|
81744
|
-
changeLine += formatReferences(
|
|
81745
|
-
change.githubReferences,
|
|
81746
|
-
this.config.repoData
|
|
81747
|
-
);
|
|
81748
|
-
}
|
|
81749
|
-
if (extraLinesStr) {
|
|
81750
|
-
changeLine += "\n\n" + extraLinesStr;
|
|
81751
|
-
}
|
|
81752
|
-
return changeLine;
|
|
81753
|
-
}
|
|
81754
|
-
}, _class16);
|
|
81755
|
-
|
|
81756
81835
|
// src/release/changelog.ts
|
|
81757
81836
|
function createAPI(overrideReleaseConfig) {
|
|
81758
81837
|
return async function releaseChangelog(args) {
|
|
@@ -81817,7 +81896,7 @@ function createAPI(overrideReleaseConfig) {
|
|
|
81817
81896
|
if (args.deleteVersionPlans === void 0) {
|
|
81818
81897
|
args.deleteVersionPlans = true;
|
|
81819
81898
|
}
|
|
81820
|
-
const changelogGenerationEnabled = !!_optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
81899
|
+
const changelogGenerationEnabled = !!_optionalChain([nxReleaseConfig, 'optionalAccess', _213 => _213.changelog, 'optionalAccess', _214 => _214.workspaceChangelog]) || _optionalChain([nxReleaseConfig, 'optionalAccess', _215 => _215.groups]) && Object.values(_optionalChain([nxReleaseConfig, 'optionalAccess', _216 => _216.groups])).some((g) => g.changelog);
|
|
81821
81900
|
if (!changelogGenerationEnabled) {
|
|
81822
81901
|
_output.output.warn({
|
|
81823
81902
|
title: `Changelogs are disabled. No changelog entries will be generated`,
|
|
@@ -81828,7 +81907,7 @@ function createAPI(overrideReleaseConfig) {
|
|
|
81828
81907
|
return {};
|
|
81829
81908
|
}
|
|
81830
81909
|
const tree = new (0, _tree.FsTree)(_workspaceroot.workspaceRoot, !!args.verbose);
|
|
81831
|
-
const useAutomaticFromRef = _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
81910
|
+
const useAutomaticFromRef = _optionalChain([nxReleaseConfig, 'optionalAccess', _217 => _217.changelog, 'optionalAccess', _218 => _218.automaticFromRef]) || args.firstRelease;
|
|
81832
81911
|
const { workspaceChangelogVersion, projectsVersionData } = resolveChangelogVersions(
|
|
81833
81912
|
args,
|
|
81834
81913
|
releaseGroups,
|
|
@@ -81837,20 +81916,20 @@ function createAPI(overrideReleaseConfig) {
|
|
|
81837
81916
|
const to = args.to || "HEAD";
|
|
81838
81917
|
const toSHA = await _git.getCommitHash.call(void 0, to);
|
|
81839
81918
|
const headSHA = to === "HEAD" ? toSHA : await _git.getCommitHash.call(void 0, "HEAD");
|
|
81840
|
-
const autoCommitEnabled = _nullishCoalesce(args.gitCommit, () => ( _optionalChain([nxReleaseConfig, 'access',
|
|
81919
|
+
const autoCommitEnabled = _nullishCoalesce(args.gitCommit, () => ( _optionalChain([nxReleaseConfig, 'access', _219 => _219.changelog, 'optionalAccess', _220 => _220.git, 'access', _221 => _221.commit])));
|
|
81841
81920
|
if (autoCommitEnabled && headSHA !== toSHA) {
|
|
81842
81921
|
throw new Error(
|
|
81843
81922
|
`You are attempting to recreate the changelog for an old release (Head: "${headSHA}", To: "${toSHA}", From: "${args.from}"), but you have enabled auto-commit mode. Please disable auto-commit mode by updating your nx.json, or passing --git-commit=false`
|
|
81844
81923
|
);
|
|
81845
81924
|
}
|
|
81846
|
-
const commitMessage = args.gitCommitMessage || _optionalChain([nxReleaseConfig, 'access',
|
|
81925
|
+
const commitMessage = args.gitCommitMessage || _optionalChain([nxReleaseConfig, 'access', _222 => _222.changelog, 'optionalAccess', _223 => _223.git, 'optionalAccess', _224 => _224.commitMessage]);
|
|
81847
81926
|
const commitMessageValues = _shared.createCommitMessageValues.call(void 0,
|
|
81848
81927
|
releaseGroups,
|
|
81849
81928
|
releaseGroupToFilteredProjects,
|
|
81850
81929
|
projectsVersionData,
|
|
81851
81930
|
commitMessage
|
|
81852
81931
|
);
|
|
81853
|
-
const gitTagValues = _nullishCoalesce(args.gitTag, () => ( _optionalChain([nxReleaseConfig, 'access',
|
|
81932
|
+
const gitTagValues = _nullishCoalesce(args.gitTag, () => ( _optionalChain([nxReleaseConfig, 'access', _225 => _225.changelog, 'optionalAccess', _226 => _226.git, 'access', _227 => _227.tag]))) ? _shared.createGitTagValues.call(void 0,
|
|
81854
81933
|
releaseGroups,
|
|
81855
81934
|
releaseGroupToFilteredProjects,
|
|
81856
81935
|
projectsVersionData
|
|
@@ -81911,7 +81990,7 @@ function createAPI(overrideReleaseConfig) {
|
|
|
81911
81990
|
nxReleaseConfig.releaseTagPattern,
|
|
81912
81991
|
{},
|
|
81913
81992
|
nxReleaseConfig.releaseTagPatternCheckAllBranchesWhen
|
|
81914
|
-
)), 'optionalAccess', async
|
|
81993
|
+
)), 'optionalAccess', async _228 => _228.tag]);
|
|
81915
81994
|
if (!workspaceChangelogFromRef) {
|
|
81916
81995
|
if (useAutomaticFromRef) {
|
|
81917
81996
|
workspaceChangelogFromRef = await _git.getFirstGitCommit.call(void 0, );
|
|
@@ -81965,7 +82044,7 @@ function createAPI(overrideReleaseConfig) {
|
|
|
81965
82044
|
)
|
|
81966
82045
|
});
|
|
81967
82046
|
if (workspaceChangelog && shouldCreateGitHubRelease(
|
|
81968
|
-
_optionalChain([nxReleaseConfig, 'access',
|
|
82047
|
+
_optionalChain([nxReleaseConfig, 'access', _229 => _229.changelog, 'optionalAccess', _230 => _230.workspaceChangelog]),
|
|
81969
82048
|
args.createRelease
|
|
81970
82049
|
)) {
|
|
81971
82050
|
postGitTasks.push(async (latestCommit) => {
|
|
@@ -81979,7 +82058,7 @@ function createAPI(overrideReleaseConfig) {
|
|
|
81979
82058
|
|
|
81980
82059
|
${contents}`);
|
|
81981
82060
|
await createOrUpdateGithubRelease(
|
|
81982
|
-
_optionalChain([nxReleaseConfig, 'access',
|
|
82061
|
+
_optionalChain([nxReleaseConfig, 'access', _231 => _231.changelog, 'optionalAccess', _232 => _232.workspaceChangelog]) ? _optionalChain([nxReleaseConfig, 'access', _233 => _233.changelog, 'optionalAccess', _234 => _234.workspaceChangelog, 'access', _235 => _235.createRelease]) : _github.defaultCreateReleaseProvider,
|
|
81983
82062
|
workspaceChangelog.releaseVersion,
|
|
81984
82063
|
contents,
|
|
81985
82064
|
latestCommit,
|
|
@@ -81997,13 +82076,13 @@ ${contents}`);
|
|
|
81997
82076
|
continue;
|
|
81998
82077
|
}
|
|
81999
82078
|
for (const project of releaseGroup.projects) {
|
|
82000
|
-
if (!_optionalChain([projectsVersionData, 'access',
|
|
82079
|
+
if (!_optionalChain([projectsVersionData, 'access', _236 => _236[project], 'optionalAccess', _237 => _237.newVersion])) {
|
|
82001
82080
|
continue;
|
|
82002
82081
|
}
|
|
82003
82082
|
const dependentProjects = (projectsVersionData[project].dependentProjects || []).map((dep) => {
|
|
82004
82083
|
return {
|
|
82005
82084
|
dependencyName: dep.source,
|
|
82006
|
-
newVersion: _optionalChain([projectsVersionData, 'access',
|
|
82085
|
+
newVersion: _optionalChain([projectsVersionData, 'access', _238 => _238[dep.source], 'optionalAccess', _239 => _239.newVersion])
|
|
82007
82086
|
};
|
|
82008
82087
|
}).filter((b) => b.newVersion !== null);
|
|
82009
82088
|
for (const dependent of dependentProjects) {
|
|
@@ -82025,13 +82104,13 @@ ${contents}`);
|
|
|
82025
82104
|
if (config === false) {
|
|
82026
82105
|
continue;
|
|
82027
82106
|
}
|
|
82028
|
-
const projects = _optionalChain([args, 'access',
|
|
82107
|
+
const projects = _optionalChain([args, 'access', _240 => _240.projects, 'optionalAccess', _241 => _241.length]) ? (
|
|
82029
82108
|
// If the user has passed a list of projects, we need to use the filtered list of projects within the release group, plus any dependents
|
|
82030
82109
|
Array.from(releaseGroupToFilteredProjects.get(releaseGroup)).flatMap(
|
|
82031
82110
|
(project) => {
|
|
82032
82111
|
return [
|
|
82033
82112
|
project,
|
|
82034
|
-
..._optionalChain([projectsVersionData, 'access',
|
|
82113
|
+
..._optionalChain([projectsVersionData, 'access', _242 => _242[project], 'optionalAccess', _243 => _243.dependentProjects, 'access', _244 => _244.map, 'call', _245 => _245(
|
|
82035
82114
|
(dep) => dep.source
|
|
82036
82115
|
)]) || []
|
|
82037
82116
|
];
|
|
@@ -82076,14 +82155,14 @@ ${contents}`);
|
|
|
82076
82155
|
releaseGroupName: releaseGroup.name
|
|
82077
82156
|
},
|
|
82078
82157
|
releaseGroup.releaseTagPatternCheckAllBranchesWhen
|
|
82079
|
-
)), 'optionalAccess', async
|
|
82158
|
+
)), 'optionalAccess', async _246 => _246.tag]);
|
|
82080
82159
|
if (!fromRef && useAutomaticFromRef) {
|
|
82081
82160
|
const firstCommit = await _git.getFirstGitCommit.call(void 0, );
|
|
82082
82161
|
const allCommits = await getCommits(firstCommit, toSHA);
|
|
82083
82162
|
const commitsForProject = allCommits.filter(
|
|
82084
82163
|
(c) => c.affectedFiles.find((f) => f.startsWith(project.data.root))
|
|
82085
82164
|
);
|
|
82086
|
-
fromRef = _optionalChain([commitsForProject, 'access',
|
|
82165
|
+
fromRef = _optionalChain([commitsForProject, 'access', _247 => _247[0], 'optionalAccess', _248 => _248.shortHash]);
|
|
82087
82166
|
if (args.verbose) {
|
|
82088
82167
|
console.log(
|
|
82089
82168
|
`Determined --from ref for ${project.name} from the first commit in which it exists: ${fromRef}`
|
|
@@ -82111,7 +82190,7 @@ ${contents}`);
|
|
|
82111
82190
|
body: c.body,
|
|
82112
82191
|
isBreaking: c.isBreaking,
|
|
82113
82192
|
githubReferences: c.references,
|
|
82114
|
-
// TODO
|
|
82193
|
+
// TODO: Implement support for Co-authored-by and adding multiple authors
|
|
82115
82194
|
authors: [c.author],
|
|
82116
82195
|
shortHash: c.shortHash,
|
|
82117
82196
|
revertedHashes: c.revertedHashes,
|
|
@@ -82211,7 +82290,7 @@ ${contents}`);
|
|
|
82211
82290
|
releaseGroup.releaseTagPattern,
|
|
82212
82291
|
{},
|
|
82213
82292
|
releaseGroup.releaseTagPatternCheckAllBranchesWhen
|
|
82214
|
-
)), 'optionalAccess', async
|
|
82293
|
+
)), 'optionalAccess', async _249 => _249.tag]);
|
|
82215
82294
|
if (!fromRef) {
|
|
82216
82295
|
if (useAutomaticFromRef) {
|
|
82217
82296
|
fromRef = await _git.getFirstGitCommit.call(void 0, );
|
|
@@ -82240,7 +82319,7 @@ ${contents}`);
|
|
|
82240
82319
|
body: c.body,
|
|
82241
82320
|
isBreaking: c.isBreaking,
|
|
82242
82321
|
githubReferences: c.references,
|
|
82243
|
-
// TODO
|
|
82322
|
+
// TODO: Implement support for Co-authored-by and adding multiple authors
|
|
82244
82323
|
authors: [c.author],
|
|
82245
82324
|
shortHash: c.shortHash,
|
|
82246
82325
|
revertedHashes: c.revertedHashes,
|
|
@@ -82400,17 +82479,17 @@ async function applyChangesAndExit(args, nxReleaseConfig, tree, toSHA, postGitTa
|
|
|
82400
82479
|
});
|
|
82401
82480
|
deletedFiles = Array.from(planFiles);
|
|
82402
82481
|
}
|
|
82403
|
-
if (_nullishCoalesce(args.gitCommit, () => ( _optionalChain([nxReleaseConfig, 'access',
|
|
82404
|
-
await
|
|
82482
|
+
if (_nullishCoalesce(args.gitCommit, () => ( _optionalChain([nxReleaseConfig, 'access', _250 => _250.changelog, 'optionalAccess', _251 => _251.git, 'access', _252 => _252.commit])))) {
|
|
82483
|
+
await commitChanges({
|
|
82405
82484
|
changedFiles,
|
|
82406
82485
|
deletedFiles,
|
|
82407
82486
|
isDryRun: !!args.dryRun,
|
|
82408
82487
|
isVerbose: !!args.verbose,
|
|
82409
82488
|
gitCommitMessages: commitMessageValues,
|
|
82410
|
-
gitCommitArgs: args.gitCommitArgs
|
|
82489
|
+
gitCommitArgs: _nullishCoalesce(args.gitCommitArgs, () => ( _optionalChain([nxReleaseConfig, 'access', _253 => _253.changelog, 'optionalAccess', _254 => _254.git, 'access', _255 => _255.commitArgs])))
|
|
82411
82490
|
});
|
|
82412
82491
|
latestCommit = await _git.getCommitHash.call(void 0, "HEAD");
|
|
82413
|
-
} else if ((_nullishCoalesce(args.stageChanges, () => ( _optionalChain([nxReleaseConfig, 'access',
|
|
82492
|
+
} else if ((_nullishCoalesce(args.stageChanges, () => ( _optionalChain([nxReleaseConfig, 'access', _256 => _256.changelog, 'optionalAccess', _257 => _257.git, 'access', _258 => _258.stageChanges])))) && changes.length) {
|
|
82414
82493
|
_output.output.logSingleLine(`Staging changed files with git`);
|
|
82415
82494
|
await _git.gitAdd.call(void 0, {
|
|
82416
82495
|
changedFiles,
|
|
@@ -82419,25 +82498,24 @@ async function applyChangesAndExit(args, nxReleaseConfig, tree, toSHA, postGitTa
|
|
|
82419
82498
|
verbose: args.verbose
|
|
82420
82499
|
});
|
|
82421
82500
|
}
|
|
82422
|
-
if (_nullishCoalesce(args.gitTag, () => ( _optionalChain([nxReleaseConfig, 'access',
|
|
82501
|
+
if (_nullishCoalesce(args.gitTag, () => ( _optionalChain([nxReleaseConfig, 'access', _259 => _259.changelog, 'optionalAccess', _260 => _260.git, 'access', _261 => _261.tag])))) {
|
|
82423
82502
|
_output.output.logSingleLine(`Tagging commit with git`);
|
|
82424
82503
|
for (const tag of gitTagValues) {
|
|
82425
82504
|
await gitTag({
|
|
82426
82505
|
tag,
|
|
82427
|
-
message: args.gitTagMessage || _optionalChain([nxReleaseConfig, 'access',
|
|
82428
|
-
additionalArgs: args.gitTagArgs || _optionalChain([nxReleaseConfig, 'access',
|
|
82506
|
+
message: args.gitTagMessage || _optionalChain([nxReleaseConfig, 'access', _262 => _262.changelog, 'optionalAccess', _263 => _263.git, 'access', _264 => _264.tagMessage]),
|
|
82507
|
+
additionalArgs: args.gitTagArgs || _optionalChain([nxReleaseConfig, 'access', _265 => _265.changelog, 'optionalAccess', _266 => _266.git, 'access', _267 => _267.tagArgs]),
|
|
82429
82508
|
dryRun: args.dryRun,
|
|
82430
82509
|
verbose: args.verbose
|
|
82431
82510
|
});
|
|
82432
82511
|
}
|
|
82433
82512
|
}
|
|
82434
|
-
if (_nullishCoalesce(args.gitPush, () => ( _optionalChain([nxReleaseConfig, 'access',
|
|
82513
|
+
if (_nullishCoalesce(args.gitPush, () => ( _optionalChain([nxReleaseConfig, 'access', _268 => _268.changelog, 'optionalAccess', _269 => _269.git, 'access', _270 => _270.push])))) {
|
|
82435
82514
|
_output.output.logSingleLine(`Pushing to git remote "${args.gitRemote}"`);
|
|
82436
82515
|
await _git.gitPush.call(void 0, {
|
|
82437
82516
|
gitRemote: args.gitRemote,
|
|
82438
82517
|
dryRun: args.dryRun,
|
|
82439
82518
|
verbose: args.verbose
|
|
82440
|
-
// additionalArgs: ["--signed=if-asked"]
|
|
82441
82519
|
});
|
|
82442
82520
|
}
|
|
82443
82521
|
for (const postGitTask of postGitTasks) {
|
|
@@ -82458,7 +82536,7 @@ async function generateChangelogForWorkspace({
|
|
|
82458
82536
|
`Unable to determine the Storm workspace config. Please ensure that your storm-workspace.json file is present and valid.`
|
|
82459
82537
|
);
|
|
82460
82538
|
}
|
|
82461
|
-
const config = _optionalChain([nxReleaseConfig, 'access',
|
|
82539
|
+
const config = _optionalChain([nxReleaseConfig, 'access', _271 => _271.changelog, 'optionalAccess', _272 => _272.workspaceChangelog]);
|
|
82462
82540
|
if (config === false) {
|
|
82463
82541
|
return;
|
|
82464
82542
|
}
|
|
@@ -82480,7 +82558,7 @@ async function generateChangelogForWorkspace({
|
|
|
82480
82558
|
});
|
|
82481
82559
|
return;
|
|
82482
82560
|
}
|
|
82483
|
-
if (_optionalChain([Object, 'access',
|
|
82561
|
+
if (_optionalChain([Object, 'access', _273 => _273.values, 'call', _274 => _274(_nullishCoalesce(nxReleaseConfig.groups, () => ( {}))), 'access', _275 => _275[0], 'optionalAccess', _276 => _276.projectsRelationship]) === "independent") {
|
|
82484
82562
|
_output.output.warn({
|
|
82485
82563
|
title: `Workspace changelog is enabled, but you have configured an independent projects relationship. This is not supported, so workspace changelog will be disabled.`,
|
|
82486
82564
|
bodyLines: [
|
|
@@ -82516,17 +82594,12 @@ async function generateChangelogForWorkspace({
|
|
|
82516
82594
|
)}`
|
|
82517
82595
|
});
|
|
82518
82596
|
}
|
|
82519
|
-
const
|
|
82520
|
-
const remoteReleaseClient = await _remotereleaseclient.createRemoteReleaseClient.call(void 0,
|
|
82521
|
-
config.createRelease,
|
|
82522
|
-
gitRemote
|
|
82523
|
-
);
|
|
82597
|
+
const remoteReleaseClient = await createGithubRemoteReleaseClient(gitRemote);
|
|
82524
82598
|
const changelogRenderer = new StormChangelogRenderer({
|
|
82525
82599
|
changes,
|
|
82526
82600
|
changelogEntryVersion: releaseVersion.rawVersion,
|
|
82527
82601
|
project: null,
|
|
82528
82602
|
isVersionPlans: false,
|
|
82529
|
-
repoData: githubRepoData,
|
|
82530
82603
|
entryWhenNoChanges: config.entryWhenNoChanges,
|
|
82531
82604
|
changelogRenderOptions: config.renderOptions,
|
|
82532
82605
|
conventionalCommitsConfig: nxReleaseConfig.conventionalCommits,
|
|
@@ -82551,7 +82624,7 @@ async function generateChangelogForWorkspace({
|
|
|
82551
82624
|
releaseVersion,
|
|
82552
82625
|
interpolatedTreePath,
|
|
82553
82626
|
contents,
|
|
82554
|
-
tree.exists(interpolatedTreePath) ? _optionalChain([tree, 'access',
|
|
82627
|
+
tree.exists(interpolatedTreePath) ? _optionalChain([tree, 'access', _277 => _277.read, 'call', _278 => _278(interpolatedTreePath), 'optionalAccess', _279 => _279.toString, 'call', _280 => _280()]) : "",
|
|
82555
82628
|
null,
|
|
82556
82629
|
workspaceConfig
|
|
82557
82630
|
)
|
|
@@ -82596,11 +82669,12 @@ async function generateChangelogForProjects({
|
|
|
82596
82669
|
workspaceRoot: ""
|
|
82597
82670
|
});
|
|
82598
82671
|
}
|
|
82599
|
-
|
|
82672
|
+
const newVersion = _optionalChain([projectsVersionData, 'access', _281 => _281[project.name], 'optionalAccess', _282 => _282.newVersion]);
|
|
82673
|
+
if (!newVersion) {
|
|
82600
82674
|
continue;
|
|
82601
82675
|
}
|
|
82602
82676
|
const releaseVersion = new (0, _shared.ReleaseVersion)({
|
|
82603
|
-
version:
|
|
82677
|
+
version: newVersion,
|
|
82604
82678
|
releaseTagPattern: releaseGroup.releaseTagPattern,
|
|
82605
82679
|
projectName: project.name
|
|
82606
82680
|
});
|
|
@@ -82611,19 +82685,11 @@ async function generateChangelogForProjects({
|
|
|
82611
82685
|
releaseVersion.gitTag
|
|
82612
82686
|
)}`
|
|
82613
82687
|
});
|
|
82614
|
-
const
|
|
82615
|
-
gitRemote,
|
|
82616
|
-
config.createRelease
|
|
82617
|
-
);
|
|
82618
|
-
const remoteReleaseClient = await _remotereleaseclient.createRemoteReleaseClient.call(void 0,
|
|
82619
|
-
config.createRelease,
|
|
82620
|
-
gitRemote
|
|
82621
|
-
);
|
|
82688
|
+
const remoteReleaseClient = await createGithubRemoteReleaseClient(gitRemote);
|
|
82622
82689
|
const changelogRenderer = new StormChangelogRenderer({
|
|
82623
82690
|
changes,
|
|
82624
82691
|
changelogEntryVersion: releaseVersion.rawVersion,
|
|
82625
82692
|
project: project.name,
|
|
82626
|
-
repoData: githubRepoData,
|
|
82627
82693
|
entryWhenNoChanges: typeof config.entryWhenNoChanges === "string" ? _utils.interpolate.call(void 0, config.entryWhenNoChanges, {
|
|
82628
82694
|
projectName: project.name,
|
|
82629
82695
|
projectRoot: project.data.root,
|
|
@@ -82659,7 +82725,7 @@ ${contents}`.trim()
|
|
|
82659
82725
|
releaseVersion,
|
|
82660
82726
|
interpolatedTreePath,
|
|
82661
82727
|
contents,
|
|
82662
|
-
tree.exists(interpolatedTreePath) ? _optionalChain([tree, 'access',
|
|
82728
|
+
tree.exists(interpolatedTreePath) ? _optionalChain([tree, 'access', _283 => _283.read, 'call', _284 => _284(interpolatedTreePath), 'optionalAccess', _285 => _285.toString, 'call', _286 => _286()]) : "",
|
|
82663
82729
|
project.name,
|
|
82664
82730
|
workspaceConfig
|
|
82665
82731
|
)
|
|
@@ -82683,11 +82749,11 @@ ${contents}`.trim()
|
|
|
82683
82749
|
return projectChangelogs;
|
|
82684
82750
|
}
|
|
82685
82751
|
function checkChangelogFilesEnabled(nxReleaseConfig) {
|
|
82686
|
-
if (_optionalChain([nxReleaseConfig, 'access',
|
|
82752
|
+
if (_optionalChain([nxReleaseConfig, 'access', _287 => _287.changelog, 'optionalAccess', _288 => _288.workspaceChangelog]) && _optionalChain([nxReleaseConfig, 'access', _289 => _289.changelog, 'optionalAccess', _290 => _290.workspaceChangelog, 'access', _291 => _291.file])) {
|
|
82687
82753
|
return true;
|
|
82688
82754
|
}
|
|
82689
82755
|
return Object.values(_nullishCoalesce(nxReleaseConfig.groups, () => ( {}))).some(
|
|
82690
|
-
(releaseGroup) => typeof _optionalChain([releaseGroup, 'optionalAccess',
|
|
82756
|
+
(releaseGroup) => typeof _optionalChain([releaseGroup, 'optionalAccess', _292 => _292.changelog]) === "boolean" && releaseGroup.changelog || _optionalChain([releaseGroup, 'optionalAccess', _293 => _293.changelog, 'optionalAccess', _294 => _294.file])
|
|
82691
82757
|
);
|
|
82692
82758
|
}
|
|
82693
82759
|
async function getCommits(fromSHA, toSHA) {
|
|
@@ -82781,7 +82847,7 @@ function formatGithubReleaseNotes(releaseVersion, content, projectName, workspac
|
|
|
82781
82847
|
if (!workspaceConfig) {
|
|
82782
82848
|
return content;
|
|
82783
82849
|
}
|
|
82784
|
-
return `![${_optionalChain([_titlecase.titleCase.call(void 0, workspaceConfig.organization), 'optionalAccess',
|
|
82850
|
+
return `![${_optionalChain([_titlecase.titleCase.call(void 0, workspaceConfig.organization), 'optionalAccess', _295 => _295.replaceAll, 'call', _296 => _296(" ", "-")])}](${workspaceConfig.release.banner})
|
|
82785
82851
|
${workspaceConfig.release.header || ""}
|
|
82786
82852
|
|
|
82787
82853
|
# ${projectName ? `${_titlecase.titleCase.call(void 0, projectName)} ` : ""}v${releaseVersion.rawVersion}
|
|
@@ -82790,7 +82856,7 @@ We at [${_titlecase.titleCase.call(void 0, workspaceConfig.organization)}](${wor
|
|
|
82790
82856
|
|
|
82791
82857
|
These changes are released under the ${workspaceConfig.license.includes("license") ? workspaceConfig.license : `${workspaceConfig.license} license`}. You can find more details on [our licensing page](${workspaceConfig.licensing}). You can find guides, API references, and other documentation around this release (and much more) on [our documentation site](${workspaceConfig.docs}).
|
|
82792
82858
|
|
|
82793
|
-
If you have any questions or comments, feel free to reach out to the team on [Discord](${workspaceConfig.account.discord}) or [our contact page](${workspaceConfig.contact}). Please help us spread the word by giving [this repository](https://github.com/${workspaceConfig.organization}/${workspaceConfig.name}) a star \u2B50 on GitHub or [posting on X (Twitter)](https://x.com/intent/tweet?text=Check%20out%20the%20latest%20@${workspaceConfig.account.twitter}%20release%20${projectName ? `${_optionalChain([_titlecase.titleCase.call(void 0, projectName), 'optionalAccess',
|
|
82859
|
+
If you have any questions or comments, feel free to reach out to the team on [Discord](${workspaceConfig.account.discord}) or [our contact page](${workspaceConfig.contact}). Please help us spread the word by giving [this repository](https://github.com/${workspaceConfig.organization}/${workspaceConfig.name}) a star \u2B50 on GitHub or [posting on X (Twitter)](https://x.com/intent/tweet?text=Check%20out%20the%20latest%20@${workspaceConfig.account.twitter}%20release%20${projectName ? `${_optionalChain([_titlecase.titleCase.call(void 0, projectName), 'optionalAccess', _297 => _297.replaceAll, 'call', _298 => _298(" ", "%20")])}%20` : ""}v${releaseVersion.rawVersion}%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/${workspaceConfig.organization}/${workspaceConfig.name}/releases/tag/${releaseVersion.gitTag}) about this release!
|
|
82794
82860
|
|
|
82795
82861
|
## Release Notes
|
|
82796
82862
|
|
|
@@ -82871,10 +82937,12 @@ var DEFAULT_RELEASE_CONFIG = {
|
|
|
82871
82937
|
|
|
82872
82938
|
// src/release/run.ts
|
|
82873
82939
|
var runRelease = async (config, options) => {
|
|
82874
|
-
|
|
82875
|
-
|
|
82876
|
-
process.env.
|
|
82877
|
-
process.env.
|
|
82940
|
+
const name = config.bot.name;
|
|
82941
|
+
const email = config.bot.email ? config.bot.email : config.bot.name ? `${config.bot.name}@users.noreply.github.com` : "bot@stormsoftware.com";
|
|
82942
|
+
process.env.GIT_AUTHOR_NAME = name;
|
|
82943
|
+
process.env.GIT_AUTHOR_EMAIL = email;
|
|
82944
|
+
process.env.GIT_COMMITTER_NAME = name;
|
|
82945
|
+
process.env.GIT_COMMITTER_EMAIL = email;
|
|
82878
82946
|
process.env.NODE_AUTH_TOKEN = process.env.NPM_TOKEN;
|
|
82879
82947
|
process.env.NPM_AUTH_TOKEN = process.env.NPM_TOKEN;
|
|
82880
82948
|
process.env.NPM_CONFIG_PROVENANCE = "true";
|
|
@@ -82890,10 +82958,10 @@ var runRelease = async (config, options) => {
|
|
|
82890
82958
|
`,
|
|
82891
82959
|
config
|
|
82892
82960
|
);
|
|
82893
|
-
if (_optionalChain([nxJson, 'access',
|
|
82961
|
+
if (_optionalChain([nxJson, 'access', _299 => _299.release, 'optionalAccess', _300 => _300.groups])) {
|
|
82894
82962
|
nxJson.release.groups = Object.keys(nxJson.release.groups).reduce(
|
|
82895
82963
|
(ret, groupName) => {
|
|
82896
|
-
const groupConfig = _optionalChain([nxJson, 'access',
|
|
82964
|
+
const groupConfig = _optionalChain([nxJson, 'access', _301 => _301.release, 'optionalAccess', _302 => _302.groups, 'optionalAccess', _303 => _303[groupName]]);
|
|
82897
82965
|
ret[groupName] = _chunkFMYKTN2Zcjs.defu.call(void 0, groupConfig, DEFAULT_RELEASE_GROUP_CONFIG);
|
|
82898
82966
|
return ret;
|
|
82899
82967
|
},
|
|
@@ -82923,7 +82991,7 @@ var runRelease = async (config, options) => {
|
|
|
82923
82991
|
});
|
|
82924
82992
|
await releaseChangelog({
|
|
82925
82993
|
...options,
|
|
82926
|
-
version: _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
82994
|
+
version: _optionalChain([nxReleaseConfig, 'optionalAccess', _304 => _304.projectsRelationship]) !== "fixed" ? void 0 : workspaceVersion,
|
|
82927
82995
|
versionData: projectsVersionData,
|
|
82928
82996
|
dryRun: false,
|
|
82929
82997
|
verbose: _chunkXE275LJTcjs.isVerbose.call(void 0, config.logLevel),
|
|
@@ -82940,7 +83008,7 @@ var runRelease = async (config, options) => {
|
|
|
82940
83008
|
);
|
|
82941
83009
|
} else {
|
|
82942
83010
|
const changedProjects = Object.keys(projectsVersionData).filter(
|
|
82943
|
-
(key) => _optionalChain([projectsVersionData, 'access',
|
|
83011
|
+
(key) => _optionalChain([projectsVersionData, 'access', _305 => _305[key], 'optionalAccess', _306 => _306.newVersion])
|
|
82944
83012
|
);
|
|
82945
83013
|
if (changedProjects.length > 0) {
|
|
82946
83014
|
_chunkXE275LJTcjs.writeInfo.call(void 0,
|
|
@@ -82956,14 +83024,14 @@ ${changedProjects.map((changedProject) => ` - ${changedProject}`).join("\n")}
|
|
|
82956
83024
|
verbose: _chunkXE275LJTcjs.isVerbose.call(void 0, config.logLevel)
|
|
82957
83025
|
});
|
|
82958
83026
|
const failedProjects = Object.keys(result2).filter(
|
|
82959
|
-
(key) => _optionalChain([result2, 'access',
|
|
83027
|
+
(key) => _optionalChain([result2, 'access', _307 => _307[key], 'optionalAccess', _308 => _308.code]) && _optionalChain([result2, 'access', _309 => _309[key], 'optionalAccess', _310 => _310.code]) > 0
|
|
82960
83028
|
);
|
|
82961
83029
|
if (failedProjects.length > 0) {
|
|
82962
83030
|
throw new Error(
|
|
82963
83031
|
`The Storm release process was not completed successfully! One or more errors occured while running the \`nx-release-publish\` executor tasks.
|
|
82964
83032
|
|
|
82965
83033
|
Please review the workflow details for the following project(s):
|
|
82966
|
-
${failedProjects.map((failedProject) => ` - ${failedProject} (Error Code: ${_optionalChain([result2, 'access',
|
|
83034
|
+
${failedProjects.map((failedProject) => ` - ${failedProject} (Error Code: ${_optionalChain([result2, 'access', _311 => _311[failedProject], 'optionalAccess', _312 => _312.code])})`).join("\n")}
|
|
82967
83035
|
`
|
|
82968
83036
|
);
|
|
82969
83037
|
}
|
|
@@ -82977,7 +83045,7 @@ async function updatePackageManifests(projectsVersionData, config) {
|
|
|
82977
83045
|
let projectGraph;
|
|
82978
83046
|
try {
|
|
82979
83047
|
projectGraph = (0, import_devkit2.readCachedProjectGraph)();
|
|
82980
|
-
} catch (
|
|
83048
|
+
} catch (e18) {
|
|
82981
83049
|
await (0, import_devkit2.createProjectGraphAsync)();
|
|
82982
83050
|
projectGraph = (0, import_devkit2.readCachedProjectGraph)();
|
|
82983
83051
|
}
|
|
@@ -82985,7 +83053,7 @@ async function updatePackageManifests(projectsVersionData, config) {
|
|
|
82985
83053
|
await Promise.all(
|
|
82986
83054
|
Object.keys(projectsVersionData).map(async (node) => {
|
|
82987
83055
|
const projectNode = projectGraph.nodes[node];
|
|
82988
|
-
if (!_optionalChain([projectNode, 'optionalAccess',
|
|
83056
|
+
if (!_optionalChain([projectNode, 'optionalAccess', _313 => _313.data, 'access', _314 => _314.root])) {
|
|
82989
83057
|
_chunkXE275LJTcjs.writeWarning.call(void 0,
|
|
82990
83058
|
`Project node ${node} not found in the project graph. Skipping manifest update.`,
|
|
82991
83059
|
config
|
|
@@ -82993,7 +83061,7 @@ async function updatePackageManifests(projectsVersionData, config) {
|
|
|
82993
83061
|
return;
|
|
82994
83062
|
}
|
|
82995
83063
|
const versionData = projectsVersionData[node];
|
|
82996
|
-
if (_optionalChain([projectNode, 'optionalAccess',
|
|
83064
|
+
if (_optionalChain([projectNode, 'optionalAccess', _315 => _315.data, 'access', _316 => _316.root]) && versionData && versionData.newVersion !== null) {
|
|
82997
83065
|
_chunkXE275LJTcjs.writeTrace.call(void 0,
|
|
82998
83066
|
`Writing version ${versionData.newVersion} update to manifest file for ${node}
|
|
82999
83067
|
`,
|