@storm-software/git-tools 2.97.1 → 2.98.0
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/git.cjs +192 -151
- package/bin/git.js +145 -104
- package/package.json +1 -1
package/bin/git.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict"; function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } async function _asyncOptionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = await fn(value); } else if (op === 'call' || op === 'optionalCall') { value = await fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2; var _class3; var _class4; var _class5; var _class6; var _class7; var _class8; var _class9; var _class10; var _class11; var _class12; var _class13;
|
|
2
|
+
"use strict"; function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } async function _asyncOptionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = await fn(value); } else if (op === 'call' || op === 'optionalCall') { value = await fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2; var _class3; var _class4; var _class5; var _class6; var _class7; var _class8; var _class9; var _class10; var _class11; var _class12; var _class13;
|
|
3
3
|
|
|
4
4
|
var _chunkFNIN2HF7cjs = require('./chunk-FNIN2HF7.cjs');
|
|
5
5
|
|
|
@@ -3034,7 +3034,7 @@ var require_yoctocolors_cjs = _chunkKK4YC43Scjs.__commonJS.call(void 0, {
|
|
|
3034
3034
|
_chunkKK4YC43Scjs.init_cjs_shims.call(void 0, );
|
|
3035
3035
|
var tty2 = _chunkKK4YC43Scjs.__require.call(void 0, "tty");
|
|
3036
3036
|
var hasColors = _nullishCoalesce(_optionalChain([tty2, 'optionalAccess', _18 => _18.WriteStream, 'optionalAccess', _19 => _19.prototype, 'optionalAccess', _20 => _20.hasColors, 'optionalCall', _21 => _21()]), () => ( false));
|
|
3037
|
-
var
|
|
3037
|
+
var format2 = /* @__PURE__ */ _chunkKK4YC43Scjs.__name.call(void 0, (open, close) => {
|
|
3038
3038
|
if (!hasColors) {
|
|
3039
3039
|
return (input) => input;
|
|
3040
3040
|
}
|
|
@@ -3058,47 +3058,47 @@ var require_yoctocolors_cjs = _chunkKK4YC43Scjs.__commonJS.call(void 0, {
|
|
|
3058
3058
|
};
|
|
3059
3059
|
}, "format");
|
|
3060
3060
|
var colors8 = {};
|
|
3061
|
-
colors8.reset =
|
|
3062
|
-
colors8.bold =
|
|
3063
|
-
colors8.dim =
|
|
3064
|
-
colors8.italic =
|
|
3065
|
-
colors8.underline =
|
|
3066
|
-
colors8.overline =
|
|
3067
|
-
colors8.inverse =
|
|
3068
|
-
colors8.hidden =
|
|
3069
|
-
colors8.strikethrough =
|
|
3070
|
-
colors8.black =
|
|
3071
|
-
colors8.red =
|
|
3072
|
-
colors8.green =
|
|
3073
|
-
colors8.yellow =
|
|
3074
|
-
colors8.blue =
|
|
3075
|
-
colors8.magenta =
|
|
3076
|
-
colors8.cyan =
|
|
3077
|
-
colors8.white =
|
|
3078
|
-
colors8.gray =
|
|
3079
|
-
colors8.bgBlack =
|
|
3080
|
-
colors8.bgRed =
|
|
3081
|
-
colors8.bgGreen =
|
|
3082
|
-
colors8.bgYellow =
|
|
3083
|
-
colors8.bgBlue =
|
|
3084
|
-
colors8.bgMagenta =
|
|
3085
|
-
colors8.bgCyan =
|
|
3086
|
-
colors8.bgWhite =
|
|
3087
|
-
colors8.bgGray =
|
|
3088
|
-
colors8.redBright =
|
|
3089
|
-
colors8.greenBright =
|
|
3090
|
-
colors8.yellowBright =
|
|
3091
|
-
colors8.blueBright =
|
|
3092
|
-
colors8.magentaBright =
|
|
3093
|
-
colors8.cyanBright =
|
|
3094
|
-
colors8.whiteBright =
|
|
3095
|
-
colors8.bgRedBright =
|
|
3096
|
-
colors8.bgGreenBright =
|
|
3097
|
-
colors8.bgYellowBright =
|
|
3098
|
-
colors8.bgBlueBright =
|
|
3099
|
-
colors8.bgMagentaBright =
|
|
3100
|
-
colors8.bgCyanBright =
|
|
3101
|
-
colors8.bgWhiteBright =
|
|
3061
|
+
colors8.reset = format2(0, 0);
|
|
3062
|
+
colors8.bold = format2(1, 22);
|
|
3063
|
+
colors8.dim = format2(2, 22);
|
|
3064
|
+
colors8.italic = format2(3, 23);
|
|
3065
|
+
colors8.underline = format2(4, 24);
|
|
3066
|
+
colors8.overline = format2(53, 55);
|
|
3067
|
+
colors8.inverse = format2(7, 27);
|
|
3068
|
+
colors8.hidden = format2(8, 28);
|
|
3069
|
+
colors8.strikethrough = format2(9, 29);
|
|
3070
|
+
colors8.black = format2(30, 39);
|
|
3071
|
+
colors8.red = format2(31, 39);
|
|
3072
|
+
colors8.green = format2(32, 39);
|
|
3073
|
+
colors8.yellow = format2(33, 39);
|
|
3074
|
+
colors8.blue = format2(34, 39);
|
|
3075
|
+
colors8.magenta = format2(35, 39);
|
|
3076
|
+
colors8.cyan = format2(36, 39);
|
|
3077
|
+
colors8.white = format2(37, 39);
|
|
3078
|
+
colors8.gray = format2(90, 39);
|
|
3079
|
+
colors8.bgBlack = format2(40, 49);
|
|
3080
|
+
colors8.bgRed = format2(41, 49);
|
|
3081
|
+
colors8.bgGreen = format2(42, 49);
|
|
3082
|
+
colors8.bgYellow = format2(43, 49);
|
|
3083
|
+
colors8.bgBlue = format2(44, 49);
|
|
3084
|
+
colors8.bgMagenta = format2(45, 49);
|
|
3085
|
+
colors8.bgCyan = format2(46, 49);
|
|
3086
|
+
colors8.bgWhite = format2(47, 49);
|
|
3087
|
+
colors8.bgGray = format2(100, 49);
|
|
3088
|
+
colors8.redBright = format2(91, 39);
|
|
3089
|
+
colors8.greenBright = format2(92, 39);
|
|
3090
|
+
colors8.yellowBright = format2(93, 39);
|
|
3091
|
+
colors8.blueBright = format2(94, 39);
|
|
3092
|
+
colors8.magentaBright = format2(95, 39);
|
|
3093
|
+
colors8.cyanBright = format2(96, 39);
|
|
3094
|
+
colors8.whiteBright = format2(97, 39);
|
|
3095
|
+
colors8.bgRedBright = format2(101, 49);
|
|
3096
|
+
colors8.bgGreenBright = format2(102, 49);
|
|
3097
|
+
colors8.bgYellowBright = format2(103, 49);
|
|
3098
|
+
colors8.bgBlueBright = format2(104, 49);
|
|
3099
|
+
colors8.bgMagentaBright = format2(105, 49);
|
|
3100
|
+
colors8.bgCyanBright = format2(106, 49);
|
|
3101
|
+
colors8.bgWhiteBright = format2(107, 49);
|
|
3102
3102
|
module.exports = colors8;
|
|
3103
3103
|
}
|
|
3104
3104
|
});
|
|
@@ -15268,12 +15268,12 @@ var require_common = _chunkKK4YC43Scjs.__commonJS.call(void 0, {
|
|
|
15268
15268
|
args.unshift("%O");
|
|
15269
15269
|
}
|
|
15270
15270
|
let index = 0;
|
|
15271
|
-
args[0] = args[0].replace(/%([a-zA-Z%])/g, (match,
|
|
15271
|
+
args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format2) => {
|
|
15272
15272
|
if (match === "%%") {
|
|
15273
15273
|
return "%";
|
|
15274
15274
|
}
|
|
15275
15275
|
index++;
|
|
15276
|
-
const formatter = createDebug.formatters[
|
|
15276
|
+
const formatter = createDebug.formatters[format2];
|
|
15277
15277
|
if (typeof formatter === "function") {
|
|
15278
15278
|
const val = args[index];
|
|
15279
15279
|
match = formatter.call(self2, val);
|
|
@@ -27274,28 +27274,28 @@ var require_format = _chunkKK4YC43Scjs.__commonJS.call(void 0, {
|
|
|
27274
27274
|
(function() {
|
|
27275
27275
|
var namespace;
|
|
27276
27276
|
if (typeof module !== "undefined") {
|
|
27277
|
-
namespace = module.exports =
|
|
27277
|
+
namespace = module.exports = format2;
|
|
27278
27278
|
} else {
|
|
27279
27279
|
namespace = function() {
|
|
27280
27280
|
return this || (1, eval)("this");
|
|
27281
27281
|
}();
|
|
27282
27282
|
}
|
|
27283
|
-
namespace.format =
|
|
27283
|
+
namespace.format = format2;
|
|
27284
27284
|
namespace.vsprintf = vsprintf;
|
|
27285
27285
|
if (typeof console !== "undefined" && typeof console.log === "function") {
|
|
27286
27286
|
namespace.printf = printf;
|
|
27287
27287
|
}
|
|
27288
27288
|
function printf() {
|
|
27289
|
-
console.log(
|
|
27289
|
+
console.log(format2.apply(null, arguments));
|
|
27290
27290
|
}
|
|
27291
27291
|
_chunkKK4YC43Scjs.__name.call(void 0, printf, "printf");
|
|
27292
27292
|
function vsprintf(fmt, replacements2) {
|
|
27293
|
-
return
|
|
27293
|
+
return format2.apply(null, [
|
|
27294
27294
|
fmt
|
|
27295
27295
|
].concat(replacements2));
|
|
27296
27296
|
}
|
|
27297
27297
|
_chunkKK4YC43Scjs.__name.call(void 0, vsprintf, "vsprintf");
|
|
27298
|
-
function
|
|
27298
|
+
function format2(fmt) {
|
|
27299
27299
|
var argIndex = 1, args = [].slice.call(arguments), i = 0, n = fmt.length, result2 = "", c, escaped = false, arg, tmp, leadingZero = false, precision, nextArg = /* @__PURE__ */ _chunkKK4YC43Scjs.__name.call(void 0, function() {
|
|
27300
27300
|
return args[argIndex++];
|
|
27301
27301
|
}, "nextArg"), slurpNumber = /* @__PURE__ */ _chunkKK4YC43Scjs.__name.call(void 0, function() {
|
|
@@ -27364,7 +27364,7 @@ var require_format = _chunkKK4YC43Scjs.__commonJS.call(void 0, {
|
|
|
27364
27364
|
}
|
|
27365
27365
|
return result2;
|
|
27366
27366
|
}
|
|
27367
|
-
_chunkKK4YC43Scjs.__name.call(void 0,
|
|
27367
|
+
_chunkKK4YC43Scjs.__name.call(void 0, format2, "format");
|
|
27368
27368
|
})();
|
|
27369
27369
|
}
|
|
27370
27370
|
});
|
|
@@ -27387,11 +27387,11 @@ var require_fault = _chunkKK4YC43Scjs.__commonJS.call(void 0, {
|
|
|
27387
27387
|
function create2(EConstructor) {
|
|
27388
27388
|
FormattedError.displayName = EConstructor.displayName || EConstructor.name;
|
|
27389
27389
|
return FormattedError;
|
|
27390
|
-
function FormattedError(
|
|
27391
|
-
if (
|
|
27392
|
-
|
|
27390
|
+
function FormattedError(format2) {
|
|
27391
|
+
if (format2) {
|
|
27392
|
+
format2 = formatter.apply(null, arguments);
|
|
27393
27393
|
}
|
|
27394
|
-
return new EConstructor(
|
|
27394
|
+
return new EConstructor(format2);
|
|
27395
27395
|
}
|
|
27396
27396
|
_chunkKK4YC43Scjs.__name.call(void 0, FormattedError, "FormattedError");
|
|
27397
27397
|
}
|
|
@@ -30391,8 +30391,8 @@ var require_prompt = _chunkKK4YC43Scjs.__commonJS.call(void 0, {
|
|
|
30391
30391
|
return this.skipped;
|
|
30392
30392
|
}
|
|
30393
30393
|
async initialize() {
|
|
30394
|
-
let { format, options, result: result2 } = this;
|
|
30395
|
-
this.format = () =>
|
|
30394
|
+
let { format: format2, options, result: result2 } = this;
|
|
30395
|
+
this.format = () => format2.call(this, this.value);
|
|
30396
30396
|
this.result = () => result2.call(this, this.value);
|
|
30397
30397
|
if (typeof options.initial === "function") {
|
|
30398
30398
|
this.initial = await options.initial.call(this, this);
|
|
@@ -32976,7 +32976,7 @@ var require_interpolate = _chunkKK4YC43Scjs.__commonJS.call(void 0, {
|
|
|
32976
32976
|
};
|
|
32977
32977
|
let { tabstops, items, keys: keys2 } = await tokenize(options, defaults2);
|
|
32978
32978
|
let result2 = createFn("result", prompt2, options);
|
|
32979
|
-
let
|
|
32979
|
+
let format2 = createFn("format", prompt2, options);
|
|
32980
32980
|
let isValid = createFn("validate", prompt2, options, true);
|
|
32981
32981
|
let isVal = prompt2.isValue.bind(prompt2);
|
|
32982
32982
|
return async (state = {}, submitted = false) => {
|
|
@@ -33025,7 +33025,7 @@ var require_interpolate = _chunkKK4YC43Scjs.__commonJS.call(void 0, {
|
|
|
33025
33025
|
}
|
|
33026
33026
|
item.placeholder = false;
|
|
33027
33027
|
let before2 = value;
|
|
33028
|
-
value = await
|
|
33028
|
+
value = await format2(value, state, item, index);
|
|
33029
33029
|
if (val !== value) {
|
|
33030
33030
|
state.values[key] = val;
|
|
33031
33031
|
value = prompt2.styles.typing(val);
|
|
@@ -68426,11 +68426,11 @@ var formatCommitMessage = /* @__PURE__ */ _chunkKK4YC43Scjs.__name.call(void 0,
|
|
|
68426
68426
|
const scope = answers.scope ? answers.scope.trim() : "";
|
|
68427
68427
|
const subject = _optionalChain([answers, 'access', _147 => _147.subject, 'optionalAccess', _148 => _148.trim, 'call', _149 => _149()]);
|
|
68428
68428
|
const type = answers.type;
|
|
68429
|
-
const
|
|
68429
|
+
const format2 = config.prompt.settings.format || "{type}({scope}): {emoji}{subject}";
|
|
68430
68430
|
const body = answers.body && typeof answers.body === "string" ? (0, import_word_wrap.default)(answers.body || "", wrapOptions) : "";
|
|
68431
68431
|
const breaking = answers.breakingBody && typeof answers.breakingBody === "string" ? (0, import_word_wrap.default)(answers.breakingBody || "", wrapOptions) : "";
|
|
68432
68432
|
const issues = answers.issuesBody && typeof answers.issuesBody === "string" ? (0, import_word_wrap.default)(answers.issuesBody || "", wrapOptions) : "";
|
|
68433
|
-
const head =
|
|
68433
|
+
const head = format2.replace(/\{emoji\}/g, config.prompt.settings.disableEmoji ? "" : `${emoji} `).replace(/\{scope\}/g, scope).replace(/\{subject\}/g, subject || "").replace(/\{type\}/g, type || "");
|
|
68434
68434
|
let msg = head;
|
|
68435
68435
|
if (body) {
|
|
68436
68436
|
msg += `
|
|
@@ -80897,7 +80897,6 @@ var _versionplans = require('nx/src/command-line/release/config/version-plans');
|
|
|
80897
80897
|
var _git = require('nx/src/command-line/release/utils/git');
|
|
80898
80898
|
var _github = require('nx/src/command-line/release/utils/github');
|
|
80899
80899
|
var _launcheditor = require('nx/src/command-line/release/utils/launch-editor');
|
|
80900
|
-
var _markdown = require('nx/src/command-line/release/utils/markdown');
|
|
80901
80900
|
var _printchanges = require('nx/src/command-line/release/utils/print-changes');
|
|
80902
80901
|
var _printconfig = require('nx/src/command-line/release/utils/print-config');
|
|
80903
80902
|
var _resolvenxjsonerrormessage = require('nx/src/command-line/release/utils/resolve-nx-json-error-message');
|
|
@@ -80912,10 +80911,48 @@ var _output = require('nx/src/utils/output');
|
|
|
80912
80911
|
var _path3 = require('nx/src/utils/path');
|
|
80913
80912
|
var _workspaceroot = require('nx/src/utils/workspace-root');
|
|
80914
80913
|
|
|
80915
|
-
// src/utilities/
|
|
80914
|
+
// src/utilities/changelog-utils.ts
|
|
80916
80915
|
_chunkKK4YC43Scjs.init_cjs_shims.call(void 0, );
|
|
80916
|
+
var _prettier = require('prettier');
|
|
80917
|
+
async function generateChangelogContent(releaseVersion2, filepath, newContent, currentContent, project, workspaceConfig) {
|
|
80918
|
+
const formatOptions = await _asyncNullishCoalesce(await _prettier.resolveConfig.call(void 0, filepath), async () => ( {}));
|
|
80919
|
+
const header = await _prettier.format.call(void 0, `${_optionalChain([workspaceConfig, 'optionalAccess', _178 => _178.release, 'access', _179 => _179.banner]) ? `})
|
|
80920
|
+
|
|
80921
|
+
` : ""}# Changelog ${project || _optionalChain([workspaceConfig, 'optionalAccess', _182 => _182.name]) ? "for" : ""}${_optionalChain([workspaceConfig, 'optionalAccess', _183 => _183.name]) ? ` ${titleCase(workspaceConfig.name)}` : ""}${project ? `${_optionalChain([workspaceConfig, 'optionalAccess', _184 => _184.name]) ? " -" : ""} ${titleCase(project)}` : ""}
|
|
80922
|
+
|
|
80923
|
+
`, {
|
|
80924
|
+
...formatOptions,
|
|
80925
|
+
filepath
|
|
80926
|
+
});
|
|
80927
|
+
let changelogContents = (currentContent || "").replaceAll(header, "").trim();
|
|
80928
|
+
const changelogReleases = parseChangelogMarkdown(changelogContents).releases;
|
|
80929
|
+
const existingVersionToUpdate = changelogReleases.find((r) => r.version === releaseVersion2.rawVersion);
|
|
80930
|
+
if (existingVersionToUpdate) {
|
|
80931
|
+
changelogContents = changelogContents.replace(`## ${generateChangelogTitle(releaseVersion2.rawVersion, project, false, workspaceConfig)}
|
|
80932
|
+
|
|
80933
|
+
|
|
80934
|
+
${existingVersionToUpdate.body}`, newContent);
|
|
80935
|
+
} else {
|
|
80936
|
+
changelogContents = `${newContent}
|
|
80937
|
+
|
|
80938
|
+
${changelogContents}`;
|
|
80939
|
+
}
|
|
80940
|
+
return await _prettier.format.call(void 0, `${header}
|
|
80941
|
+
|
|
80942
|
+
${changelogContents}`, {
|
|
80943
|
+
...formatOptions,
|
|
80944
|
+
filepath
|
|
80945
|
+
});
|
|
80946
|
+
}
|
|
80947
|
+
_chunkKK4YC43Scjs.__name.call(void 0, generateChangelogContent, "generateChangelogContent");
|
|
80948
|
+
var titleCase = /* @__PURE__ */ _chunkKK4YC43Scjs.__name.call(void 0, (input) => {
|
|
80949
|
+
if (!input) {
|
|
80950
|
+
return "";
|
|
80951
|
+
}
|
|
80952
|
+
return input.split(/(?=[A-Z])|[\.\-\s_]/).map((s) => s.trim()).filter((s) => !!s).map((s) => s ? s.toLowerCase().charAt(0).toUpperCase() + s.toLowerCase().slice(1) : s).join(" ");
|
|
80953
|
+
}, "titleCase");
|
|
80917
80954
|
function generateChangelogTitle(version, project, excludeDate = false, workspaceConfig) {
|
|
80918
|
-
if (!_optionalChain([workspaceConfig, 'optionalAccess',
|
|
80955
|
+
if (!_optionalChain([workspaceConfig, 'optionalAccess', _185 => _185.repository]) || !project) {
|
|
80919
80956
|
return version;
|
|
80920
80957
|
}
|
|
80921
80958
|
let maybeDateStr = "";
|
|
@@ -80926,6 +80963,30 @@ function generateChangelogTitle(version, project, excludeDate = false, workspace
|
|
|
80926
80963
|
return `[${version}](${workspaceConfig.repository}/releases/tag/${project}%40${version})${maybeDateStr}`;
|
|
80927
80964
|
}
|
|
80928
80965
|
_chunkKK4YC43Scjs.__name.call(void 0, generateChangelogTitle, "generateChangelogTitle");
|
|
80966
|
+
function parseChangelogMarkdown(contents) {
|
|
80967
|
+
const CHANGELOG_RELEASE_HEAD_RE = new RegExp("^#+\\s*\\[?(\\d+\\.\\d+\\.\\d+(?:-[a-zA-Z0-9\\.]+)?)\\]?", "gm");
|
|
80968
|
+
const headings = [
|
|
80969
|
+
...contents.matchAll(CHANGELOG_RELEASE_HEAD_RE)
|
|
80970
|
+
];
|
|
80971
|
+
const releases = [];
|
|
80972
|
+
for (let i = 0; i < headings.length; i++) {
|
|
80973
|
+
const heading = headings[i];
|
|
80974
|
+
if (!heading || heading.length < 2) {
|
|
80975
|
+
continue;
|
|
80976
|
+
}
|
|
80977
|
+
const nextHeading = headings[i + 1];
|
|
80978
|
+
const version = heading[1];
|
|
80979
|
+
const release = {
|
|
80980
|
+
version,
|
|
80981
|
+
body: contents.slice(heading.index + heading[0].length, nextHeading ? nextHeading.index : contents.length).trim()
|
|
80982
|
+
};
|
|
80983
|
+
releases.push(release);
|
|
80984
|
+
}
|
|
80985
|
+
return {
|
|
80986
|
+
releases
|
|
80987
|
+
};
|
|
80988
|
+
}
|
|
80989
|
+
_chunkKK4YC43Scjs.__name.call(void 0, parseChangelogMarkdown, "parseChangelogMarkdown");
|
|
80929
80990
|
|
|
80930
80991
|
// src/release/changelog-renderer.ts
|
|
80931
80992
|
_chunkKK4YC43Scjs.init_cjs_shims.call(void 0, );
|
|
@@ -82153,7 +82214,7 @@ var AxiosHeaders = class AxiosHeaders2 {
|
|
|
82153
82214
|
}
|
|
82154
82215
|
return deleted;
|
|
82155
82216
|
}
|
|
82156
|
-
normalize(
|
|
82217
|
+
normalize(format2) {
|
|
82157
82218
|
const self2 = this;
|
|
82158
82219
|
const headers = {};
|
|
82159
82220
|
utils_default.forEach(this, (value, header) => {
|
|
@@ -82163,7 +82224,7 @@ var AxiosHeaders = class AxiosHeaders2 {
|
|
|
82163
82224
|
delete self2[header];
|
|
82164
82225
|
return;
|
|
82165
82226
|
}
|
|
82166
|
-
const normalized =
|
|
82227
|
+
const normalized = format2 ? formatHeader(header) : String(header).trim();
|
|
82167
82228
|
if (normalized !== header) {
|
|
82168
82229
|
delete self2[header];
|
|
82169
82230
|
}
|
|
@@ -84430,7 +84491,7 @@ var StormChangelogRenderer = (_class13 = class extends _changelogrenderer2.defau
|
|
|
84430
84491
|
}
|
|
84431
84492
|
};
|
|
84432
84493
|
for (let i = this.relevantChanges.length - 1; i >= 0; i--) {
|
|
84433
|
-
if (_optionalChain([this, 'access',
|
|
84494
|
+
if (_optionalChain([this, 'access', _186 => _186.relevantChanges, 'access', _187 => _187[i], 'optionalAccess', _188 => _188.isBreaking])) {
|
|
84434
84495
|
const change = this.relevantChanges[i];
|
|
84435
84496
|
if (change) {
|
|
84436
84497
|
this.additionalChangesForAuthorsSection.push(change);
|
|
@@ -84475,7 +84536,7 @@ var StormChangelogRenderer = (_class13 = class extends _changelogrenderer2.defau
|
|
|
84475
84536
|
"### Updated Dependencies",
|
|
84476
84537
|
""
|
|
84477
84538
|
];
|
|
84478
|
-
_optionalChain([this, 'access',
|
|
84539
|
+
_optionalChain([this, 'access', _189 => _189.dependencyBumps, 'optionalAccess', _190 => _190.forEach, 'call', _191 => _191(({ dependencyName, newVersion }) => {
|
|
84479
84540
|
markdownLines.push(`- Updated ${dependencyName} to ${newVersion}`);
|
|
84480
84541
|
})]);
|
|
84481
84542
|
return markdownLines;
|
|
@@ -84492,12 +84553,12 @@ var StormChangelogRenderer = (_class13 = class extends _changelogrenderer2.defau
|
|
|
84492
84553
|
}
|
|
84493
84554
|
for (const author of change.authors) {
|
|
84494
84555
|
const name = this.formatName(author.name);
|
|
84495
|
-
if (!name || name.includes("[bot]") || name === _optionalChain([this, 'access',
|
|
84556
|
+
if (!name || name.includes("[bot]") || name === _optionalChain([this, 'access', _192 => _192.workspaceConfig, 'optionalAccess', _193 => _193.bot, 'access', _194 => _194.name])) {
|
|
84496
84557
|
continue;
|
|
84497
84558
|
}
|
|
84498
84559
|
if (_authors.has(name)) {
|
|
84499
84560
|
const entry = _authors.get(name);
|
|
84500
|
-
_optionalChain([entry, 'optionalAccess',
|
|
84561
|
+
_optionalChain([entry, 'optionalAccess', _195 => _195.email, 'access', _196 => _196.add, 'call', _197 => _197(author.email)]);
|
|
84501
84562
|
} else {
|
|
84502
84563
|
_authors.set(name, {
|
|
84503
84564
|
email: /* @__PURE__ */ new Set([
|
|
@@ -84528,7 +84589,7 @@ var StormChangelogRenderer = (_class13 = class extends _changelogrenderer2.defau
|
|
|
84528
84589
|
user: null
|
|
84529
84590
|
}
|
|
84530
84591
|
}));
|
|
84531
|
-
if (_optionalChain([data, 'optionalAccess',
|
|
84592
|
+
if (_optionalChain([data, 'optionalAccess', _198 => _198.user])) {
|
|
84532
84593
|
meta.github = data.user.username;
|
|
84533
84594
|
break;
|
|
84534
84595
|
}
|
|
@@ -84619,7 +84680,7 @@ function createAPI(overrideReleaseConfig) {
|
|
|
84619
84680
|
if (args.deleteVersionPlans === void 0) {
|
|
84620
84681
|
args.deleteVersionPlans = true;
|
|
84621
84682
|
}
|
|
84622
|
-
const changelogGenerationEnabled = !!_optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
84683
|
+
const changelogGenerationEnabled = !!_optionalChain([nxReleaseConfig, 'optionalAccess', _199 => _199.changelog, 'access', _200 => _200.workspaceChangelog]) || _optionalChain([nxReleaseConfig, 'optionalAccess', _201 => _201.groups]) && Object.values(_optionalChain([nxReleaseConfig, 'optionalAccess', _202 => _202.groups])).some((g) => g.changelog);
|
|
84623
84684
|
if (!changelogGenerationEnabled) {
|
|
84624
84685
|
_output.output.warn({
|
|
84625
84686
|
title: `Changelogs are disabled. No changelog entries will be generated`,
|
|
@@ -84630,7 +84691,7 @@ function createAPI(overrideReleaseConfig) {
|
|
|
84630
84691
|
return {};
|
|
84631
84692
|
}
|
|
84632
84693
|
const tree = new (0, _tree.FsTree)(_workspaceroot.workspaceRoot, !!args.verbose);
|
|
84633
|
-
const useAutomaticFromRef = _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
84694
|
+
const useAutomaticFromRef = _optionalChain([nxReleaseConfig, 'optionalAccess', _203 => _203.changelog, 'optionalAccess', _204 => _204.automaticFromRef]) || args.firstRelease;
|
|
84634
84695
|
const { workspaceChangelogVersion, projectsVersionData } = resolveChangelogVersions(args, releaseGroups, releaseGroupToFilteredProjects);
|
|
84635
84696
|
const to = args.to || "HEAD";
|
|
84636
84697
|
const toSHA = await _git.getCommitHash.call(void 0, to);
|
|
@@ -84698,7 +84759,7 @@ function createAPI(overrideReleaseConfig) {
|
|
|
84698
84759
|
}
|
|
84699
84760
|
}
|
|
84700
84761
|
} else {
|
|
84701
|
-
let workspaceChangelogFromRef = args.from || await _asyncOptionalChain([(await _git.getLatestGitTagForPattern.call(void 0, nxReleaseConfig.releaseTagPattern, {}, nxReleaseConfig.releaseTagPatternCheckAllBranchesWhen)), 'optionalAccess', async
|
|
84762
|
+
let workspaceChangelogFromRef = args.from || await _asyncOptionalChain([(await _git.getLatestGitTagForPattern.call(void 0, nxReleaseConfig.releaseTagPattern, {}, nxReleaseConfig.releaseTagPatternCheckAllBranchesWhen)), 'optionalAccess', async _205 => _205.tag]);
|
|
84702
84763
|
if (!workspaceChangelogFromRef) {
|
|
84703
84764
|
if (useAutomaticFromRef) {
|
|
84704
84765
|
workspaceChangelogFromRef = await _git.getFirstGitCommit.call(void 0, );
|
|
@@ -84740,11 +84801,16 @@ function createAPI(overrideReleaseConfig) {
|
|
|
84740
84801
|
});
|
|
84741
84802
|
if (workspaceChangelog && shouldCreateGitHubRelease(nxReleaseConfig.changelog.workspaceChangelog, args.createRelease)) {
|
|
84742
84803
|
postGitTasks.push(async (latestCommit) => {
|
|
84743
|
-
|
|
84744
|
-
|
|
84804
|
+
const contents = formatGithubReleaseNotes(workspaceChangelog.contents, workspaceConfig);
|
|
84805
|
+
_output.output.logSingleLine(`Creating GitHub Release
|
|
84806
|
+
|
|
84807
|
+
${contents}`);
|
|
84808
|
+
await _github.createOrUpdateGithubRelease.call(void 0, nxReleaseConfig.changelog.workspaceChangelog ? nxReleaseConfig.changelog.workspaceChangelog.createRelease : _config3.defaultCreateReleaseProvider, workspaceChangelog.releaseVersion, contents, latestCommit, {
|
|
84745
84809
|
dryRun: !!args.dryRun
|
|
84746
84810
|
});
|
|
84747
84811
|
});
|
|
84812
|
+
} else {
|
|
84813
|
+
_output.output.logSingleLine(`Skipping GitHub Release for workspace changelog as it is disabled in the release group configuration`);
|
|
84748
84814
|
}
|
|
84749
84815
|
const projectToAdditionalDependencyBumps = /* @__PURE__ */ new Map();
|
|
84750
84816
|
for (const releaseGroup of releaseGroups) {
|
|
@@ -84758,7 +84824,7 @@ function createAPI(overrideReleaseConfig) {
|
|
|
84758
84824
|
const dependentProjects = (projectsVersionData[project].dependentProjects || []).map((dep) => {
|
|
84759
84825
|
return {
|
|
84760
84826
|
dependencyName: dep.source,
|
|
84761
|
-
newVersion: _optionalChain([projectsVersionData, 'access',
|
|
84827
|
+
newVersion: _optionalChain([projectsVersionData, 'access', _206 => _206[dep.source], 'optionalAccess', _207 => _207.newVersion])
|
|
84762
84828
|
};
|
|
84763
84829
|
}).filter((b) => b.newVersion !== null);
|
|
84764
84830
|
for (const dependent of dependentProjects) {
|
|
@@ -84777,10 +84843,10 @@ function createAPI(overrideReleaseConfig) {
|
|
|
84777
84843
|
if (config === false) {
|
|
84778
84844
|
continue;
|
|
84779
84845
|
}
|
|
84780
|
-
const projects = _optionalChain([args, 'access',
|
|
84846
|
+
const projects = _optionalChain([args, 'access', _208 => _208.projects, 'optionalAccess', _209 => _209.length]) ? Array.from(releaseGroupToFilteredProjects.get(releaseGroup)).flatMap((project) => {
|
|
84781
84847
|
return [
|
|
84782
84848
|
project,
|
|
84783
|
-
..._optionalChain([projectsVersionData, 'access',
|
|
84849
|
+
..._optionalChain([projectsVersionData, 'access', _210 => _210[project], 'optionalAccess', _211 => _211.dependentProjects, 'access', _212 => _212.map, 'call', _213 => _213((dep) => dep.source)]) || []
|
|
84784
84850
|
];
|
|
84785
84851
|
}) : releaseGroup.projects;
|
|
84786
84852
|
const projectNodes = projects.map((name) => projectGraph.nodes[name]);
|
|
@@ -84816,12 +84882,12 @@ function createAPI(overrideReleaseConfig) {
|
|
|
84816
84882
|
let fromRef = args.from || await _asyncOptionalChain([(await _git.getLatestGitTagForPattern.call(void 0, releaseGroup.releaseTagPattern, {
|
|
84817
84883
|
projectName: project.name,
|
|
84818
84884
|
releaseGroupName: releaseGroup.name
|
|
84819
|
-
}, releaseGroup.releaseTagPatternCheckAllBranchesWhen)), 'optionalAccess', async
|
|
84885
|
+
}, releaseGroup.releaseTagPatternCheckAllBranchesWhen)), 'optionalAccess', async _214 => _214.tag]);
|
|
84820
84886
|
if (!fromRef && useAutomaticFromRef) {
|
|
84821
84887
|
const firstCommit = await _git.getFirstGitCommit.call(void 0, );
|
|
84822
84888
|
const allCommits = await getCommits(firstCommit, toSHA);
|
|
84823
84889
|
const commitsForProject = allCommits.filter((c) => c.affectedFiles.find((f) => f.startsWith(project.data.root)));
|
|
84824
|
-
fromRef = _optionalChain([commitsForProject, 'access',
|
|
84890
|
+
fromRef = _optionalChain([commitsForProject, 'access', _215 => _215[0], 'optionalAccess', _216 => _216.shortHash]);
|
|
84825
84891
|
if (args.verbose) {
|
|
84826
84892
|
console.log(`Determined --from ref for ${project.name} from the first commit in which it exists: ${fromRef}`);
|
|
84827
84893
|
}
|
|
@@ -84866,11 +84932,16 @@ function createAPI(overrideReleaseConfig) {
|
|
|
84866
84932
|
for (const [projectName, projectChangelog] of Object.entries(projectChangelogs)) {
|
|
84867
84933
|
if (projectChangelogs && shouldCreateGitHubRelease(releaseGroup.changelog, args.createRelease)) {
|
|
84868
84934
|
postGitTasks.push(async (latestCommit) => {
|
|
84869
|
-
|
|
84870
|
-
|
|
84935
|
+
const contents = formatGithubReleaseNotes(projectChangelog.contents, workspaceConfig);
|
|
84936
|
+
_output.output.logSingleLine(`Creating GitHub Release
|
|
84937
|
+
|
|
84938
|
+
${contents}`);
|
|
84939
|
+
await _github.createOrUpdateGithubRelease.call(void 0, releaseGroup.changelog ? releaseGroup.changelog.createRelease : _config3.defaultCreateReleaseProvider, projectChangelog.releaseVersion, contents, latestCommit, {
|
|
84871
84940
|
dryRun: !!args.dryRun
|
|
84872
84941
|
});
|
|
84873
84942
|
});
|
|
84943
|
+
} else {
|
|
84944
|
+
_output.output.logSingleLine(`Skipping GitHub Release for ${projectName} as it is disabled in the release group configuration`);
|
|
84874
84945
|
}
|
|
84875
84946
|
allProjectChangelogs[projectName] = projectChangelog;
|
|
84876
84947
|
}
|
|
@@ -84920,7 +84991,7 @@ function createAPI(overrideReleaseConfig) {
|
|
|
84920
84991
|
return changes2;
|
|
84921
84992
|
}).filter(Boolean);
|
|
84922
84993
|
} else {
|
|
84923
|
-
let fromRef = args.from || await _asyncOptionalChain([(await _git.getLatestGitTagForPattern.call(void 0, releaseGroup.releaseTagPattern, {}, releaseGroup.releaseTagPatternCheckAllBranchesWhen)), 'optionalAccess', async
|
|
84994
|
+
let fromRef = args.from || await _asyncOptionalChain([(await _git.getLatestGitTagForPattern.call(void 0, releaseGroup.releaseTagPattern, {}, releaseGroup.releaseTagPatternCheckAllBranchesWhen)), 'optionalAccess', async _217 => _217.tag]);
|
|
84924
84995
|
if (!fromRef) {
|
|
84925
84996
|
if (useAutomaticFromRef) {
|
|
84926
84997
|
fromRef = await _git.getFirstGitCommit.call(void 0, );
|
|
@@ -84969,6 +85040,8 @@ function createAPI(overrideReleaseConfig) {
|
|
|
84969
85040
|
dryRun: !!args.dryRun
|
|
84970
85041
|
});
|
|
84971
85042
|
});
|
|
85043
|
+
} else {
|
|
85044
|
+
_output.output.logSingleLine(`Skipping GitHub Release for ${projectName} as it is disabled in the release group configuration`);
|
|
84972
85045
|
}
|
|
84973
85046
|
allProjectChangelogs[projectName] = projectChangelog;
|
|
84974
85047
|
}
|
|
@@ -85138,7 +85211,7 @@ async function generateChangelogForWorkspace({ tree, args, projectGraph, nxRelea
|
|
|
85138
85211
|
});
|
|
85139
85212
|
return;
|
|
85140
85213
|
}
|
|
85141
|
-
if (_optionalChain([Object, 'access',
|
|
85214
|
+
if (_optionalChain([Object, 'access', _218 => _218.values, 'call', _219 => _219(nxReleaseConfig.groups), 'access', _220 => _220[0], 'optionalAccess', _221 => _221.projectsRelationship]) === "independent") {
|
|
85142
85215
|
_output.output.warn({
|
|
85143
85216
|
title: `Workspace changelog is enabled, but you have configured an independent projects relationship. This is not supported, so workspace changelog will be disabled.`,
|
|
85144
85217
|
bodyLines: [
|
|
@@ -85194,24 +85267,8 @@ async function generateChangelogForWorkspace({ tree, args, projectGraph, nxRelea
|
|
|
85194
85267
|
contents = _fs.readFileSync.call(void 0, changelogPath, "utf8");
|
|
85195
85268
|
}
|
|
85196
85269
|
if (interpolatedTreePath) {
|
|
85197
|
-
|
|
85198
|
-
|
|
85199
|
-
const changelogReleases = _markdown.parseChangelogMarkdown.call(void 0, rootChangelogContents).releases;
|
|
85200
|
-
const existingVersionToUpdate = changelogReleases.find((r) => r.version === releaseVersion2.rawVersion);
|
|
85201
|
-
if (existingVersionToUpdate) {
|
|
85202
|
-
rootChangelogContents = rootChangelogContents.replace(`## ${generateChangelogTitle(releaseVersion2.rawVersion, null, false, workspaceConfig)}
|
|
85203
|
-
|
|
85204
|
-
|
|
85205
|
-
${existingVersionToUpdate.body}`, contents);
|
|
85206
|
-
} else {
|
|
85207
|
-
rootChangelogContents = `${contents}
|
|
85208
|
-
|
|
85209
|
-
${rootChangelogContents}`;
|
|
85210
|
-
}
|
|
85211
|
-
} else {
|
|
85212
|
-
rootChangelogContents = contents;
|
|
85213
|
-
}
|
|
85214
|
-
tree.write(interpolatedTreePath, rootChangelogContents);
|
|
85270
|
+
const rootChangelogContents = tree.exists(interpolatedTreePath) ? _optionalChain([tree, 'access', _222 => _222.read, 'call', _223 => _223(interpolatedTreePath), 'optionalAccess', _224 => _224.toString, 'call', _225 => _225()]) : "";
|
|
85271
|
+
tree.write(interpolatedTreePath, await generateChangelogContent(releaseVersion2, interpolatedTreePath, contents, rootChangelogContents, null, workspaceConfig));
|
|
85215
85272
|
_printchanges.printAndFlushChanges.call(void 0, tree, !!dryRun, 3, false, _shared.noDiffInChangelogMessage);
|
|
85216
85273
|
}
|
|
85217
85274
|
return {
|
|
@@ -85243,7 +85300,7 @@ async function generateChangelogForProjects({ tree, args, changes, projectsVersi
|
|
|
85243
85300
|
// within the tree, workspaceRoot is the root
|
|
85244
85301
|
});
|
|
85245
85302
|
}
|
|
85246
|
-
if (!_optionalChain([projectsVersionData, 'access',
|
|
85303
|
+
if (!_optionalChain([projectsVersionData, 'access', _226 => _226[project.name], 'optionalAccess', _227 => _227.newVersion])) {
|
|
85247
85304
|
continue;
|
|
85248
85305
|
}
|
|
85249
85306
|
const releaseVersion2 = new (0, _shared.ReleaseVersion)({
|
|
@@ -85287,24 +85344,8 @@ async function generateChangelogForProjects({ tree, args, changes, projectsVersi
|
|
|
85287
85344
|
contents = _fs.readFileSync.call(void 0, changelogPath, "utf8");
|
|
85288
85345
|
}
|
|
85289
85346
|
if (interpolatedTreePath) {
|
|
85290
|
-
|
|
85291
|
-
|
|
85292
|
-
const changelogReleases = _markdown.parseChangelogMarkdown.call(void 0, changelogContents).releases;
|
|
85293
|
-
const existingVersionToUpdate = changelogReleases.find((r) => r.version === releaseVersion2.rawVersion);
|
|
85294
|
-
if (existingVersionToUpdate) {
|
|
85295
|
-
changelogContents = changelogContents.replace(`## ${generateChangelogTitle(releaseVersion2.rawVersion, project.name, false, workspaceConfig)}
|
|
85296
|
-
|
|
85297
|
-
|
|
85298
|
-
${existingVersionToUpdate.body}`, contents);
|
|
85299
|
-
} else {
|
|
85300
|
-
changelogContents = `${contents}
|
|
85301
|
-
|
|
85302
|
-
${changelogContents}`;
|
|
85303
|
-
}
|
|
85304
|
-
} else {
|
|
85305
|
-
changelogContents = contents;
|
|
85306
|
-
}
|
|
85307
|
-
tree.write(interpolatedTreePath, changelogContents);
|
|
85347
|
+
const changelogContents = tree.exists(interpolatedTreePath) ? _optionalChain([tree, 'access', _228 => _228.read, 'call', _229 => _229(interpolatedTreePath), 'optionalAccess', _230 => _230.toString, 'call', _231 => _231()]) : "";
|
|
85348
|
+
tree.write(interpolatedTreePath, await generateChangelogContent(releaseVersion2, interpolatedTreePath, contents, changelogContents, project.name, workspaceConfig));
|
|
85308
85349
|
_printchanges.printAndFlushChanges.call(void 0,
|
|
85309
85350
|
tree,
|
|
85310
85351
|
!!dryRun,
|
|
@@ -85533,7 +85574,7 @@ async function releaseVersion(config, args) {
|
|
|
85533
85574
|
});
|
|
85534
85575
|
const { projects } = _projectgraphjs.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
85535
85576
|
const nxJson = _nxjsonjs.readNxJson.call(void 0, );
|
|
85536
|
-
const workspaceRoot3 = _nullishCoalesce(_optionalChain([config, 'optionalAccess',
|
|
85577
|
+
const workspaceRoot3 = _nullishCoalesce(_optionalChain([config, 'optionalAccess', _232 => _232.workspaceRoot]), () => ( _chunkLFH4CIZMcjs.findWorkspaceRoot.call(void 0, )));
|
|
85537
85578
|
if (args.verbose) {
|
|
85538
85579
|
process.env.NX_VERBOSE_LOGGING = "true";
|
|
85539
85580
|
}
|
|
@@ -85541,7 +85582,7 @@ async function releaseVersion(config, args) {
|
|
|
85541
85582
|
if (configError) {
|
|
85542
85583
|
return await _configjs.handleNxReleaseConfigError.call(void 0, configError);
|
|
85543
85584
|
}
|
|
85544
|
-
if ((args.gitCommit === void 0 || args.gitTag === void 0 || args.stageChanges === void 0) && _optionalChain([nxJson, 'access',
|
|
85585
|
+
if ((args.gitCommit === void 0 || args.gitTag === void 0 || args.stageChanges === void 0) && _optionalChain([nxJson, 'access', _233 => _233.release, 'optionalAccess', _234 => _234.git])) {
|
|
85545
85586
|
await _resolvenxjsonerrormessagejs.resolveNxJsonConfigErrorMessage.call(void 0, [
|
|
85546
85587
|
"release",
|
|
85547
85588
|
"git"
|
|
@@ -85556,10 +85597,10 @@ async function releaseVersion(config, args) {
|
|
|
85556
85597
|
}
|
|
85557
85598
|
const tree = new (0, _treejs.FsTree)(workspaceRoot3, true);
|
|
85558
85599
|
const versionData = {};
|
|
85559
|
-
const commitMessage = args.gitCommitMessage || _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85600
|
+
const commitMessage = args.gitCommitMessage || _optionalChain([nxReleaseConfig, 'optionalAccess', _235 => _235.version, 'access', _236 => _236.git, 'access', _237 => _237.commitMessage]);
|
|
85560
85601
|
const additionalChangedFiles = /* @__PURE__ */ new Set();
|
|
85561
85602
|
const generatorCallbacks = [];
|
|
85562
|
-
if (_optionalChain([args, 'access',
|
|
85603
|
+
if (_optionalChain([args, 'access', _238 => _238.projects, 'optionalAccess', _239 => _239.length])) {
|
|
85563
85604
|
_chunkLFH4CIZMcjs.writeInfo.call(void 0, "Run versioning for all remaining release groups and filtered projects within them", config);
|
|
85564
85605
|
for (const releaseGroup of releaseGroups) {
|
|
85565
85606
|
const releaseGroupName = releaseGroup.name;
|
|
@@ -85599,7 +85640,7 @@ async function releaseVersion(config, args) {
|
|
|
85599
85640
|
});
|
|
85600
85641
|
}
|
|
85601
85642
|
}
|
|
85602
|
-
const gitTagValues2 = _nullishCoalesce(args.gitTag, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85643
|
+
const gitTagValues2 = _nullishCoalesce(args.gitTag, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess', _240 => _240.version, 'access', _241 => _241.git, 'access', _242 => _242.tag]))) ? _sharedjs.createGitTagValues.call(void 0, releaseGroups, releaseGroupToFilteredProjects, versionData) : [];
|
|
85603
85644
|
_sharedjs.handleDuplicateGitTags.call(void 0, gitTagValues2);
|
|
85604
85645
|
printAndFlushChanges2(config, tree, !!args.dryRun);
|
|
85605
85646
|
for (const generatorCallback of generatorCallbacks) {
|
|
@@ -85616,15 +85657,15 @@ async function releaseVersion(config, args) {
|
|
|
85616
85657
|
projectsVersionData: versionData
|
|
85617
85658
|
};
|
|
85618
85659
|
}
|
|
85619
|
-
if (_nullishCoalesce(args.gitCommit, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85660
|
+
if (_nullishCoalesce(args.gitCommit, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess', _243 => _243.version, 'access', _244 => _244.git, 'access', _245 => _245.commit])))) {
|
|
85620
85661
|
await _sharedjs.commitChanges.call(void 0, {
|
|
85621
85662
|
changedFiles: changedFiles2,
|
|
85622
85663
|
isDryRun: !!args.dryRun,
|
|
85623
85664
|
isVerbose: !!args.verbose,
|
|
85624
85665
|
gitCommitMessages: _sharedjs.createCommitMessageValues.call(void 0, releaseGroups, releaseGroupToFilteredProjects, versionData, commitMessage),
|
|
85625
|
-
gitCommitArgs: args.gitCommitArgs || _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85666
|
+
gitCommitArgs: args.gitCommitArgs || _optionalChain([nxReleaseConfig, 'optionalAccess', _246 => _246.version, 'access', _247 => _247.git, 'access', _248 => _248.commitArgs])
|
|
85626
85667
|
});
|
|
85627
|
-
} else if (_nullishCoalesce(args.stageChanges, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85668
|
+
} else if (_nullishCoalesce(args.stageChanges, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess', _249 => _249.version, 'access', _250 => _250.git, 'access', _251 => _251.stageChanges])))) {
|
|
85628
85669
|
_chunkLFH4CIZMcjs.writeInfo.call(void 0, "Staging changed files with git", config);
|
|
85629
85670
|
await _gitjs.gitAdd.call(void 0, {
|
|
85630
85671
|
changedFiles: changedFiles2,
|
|
@@ -85632,13 +85673,13 @@ async function releaseVersion(config, args) {
|
|
|
85632
85673
|
verbose: args.verbose
|
|
85633
85674
|
});
|
|
85634
85675
|
}
|
|
85635
|
-
if (_nullishCoalesce(args.gitTag, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85676
|
+
if (_nullishCoalesce(args.gitTag, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess', _252 => _252.version, 'access', _253 => _253.git, 'access', _254 => _254.tag])))) {
|
|
85636
85677
|
_chunkLFH4CIZMcjs.writeInfo.call(void 0, "Tagging commit with git", config);
|
|
85637
85678
|
for (const tag of gitTagValues2) {
|
|
85638
85679
|
await _gitjs.gitTag.call(void 0, {
|
|
85639
85680
|
tag,
|
|
85640
|
-
message: args.gitTagMessage || _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85641
|
-
additionalArgs: args.gitTagArgs || _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85681
|
+
message: args.gitTagMessage || _optionalChain([nxReleaseConfig, 'optionalAccess', _255 => _255.version, 'access', _256 => _256.git, 'access', _257 => _257.tagMessage]),
|
|
85682
|
+
additionalArgs: args.gitTagArgs || _optionalChain([nxReleaseConfig, 'optionalAccess', _258 => _258.version, 'access', _259 => _259.git, 'access', _260 => _260.tagArgs]),
|
|
85642
85683
|
dryRun: args.dryRun,
|
|
85643
85684
|
verbose: args.verbose
|
|
85644
85685
|
});
|
|
@@ -85685,7 +85726,7 @@ async function releaseVersion(config, args) {
|
|
|
85685
85726
|
});
|
|
85686
85727
|
}
|
|
85687
85728
|
}
|
|
85688
|
-
const gitTagValues = _nullishCoalesce(args.gitTag, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85729
|
+
const gitTagValues = _nullishCoalesce(args.gitTag, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess', _261 => _261.version, 'access', _262 => _262.git, 'access', _263 => _263.tag]))) ? _sharedjs.createGitTagValues.call(void 0, releaseGroups, releaseGroupToFilteredProjects, versionData) : [];
|
|
85689
85730
|
_sharedjs.handleDuplicateGitTags.call(void 0, gitTagValues);
|
|
85690
85731
|
printAndFlushChanges2(config, tree, !!args.dryRun);
|
|
85691
85732
|
for (const generatorCallback of generatorCallbacks) {
|
|
@@ -85694,10 +85735,10 @@ async function releaseVersion(config, args) {
|
|
|
85694
85735
|
let workspaceVersion = void 0;
|
|
85695
85736
|
if (releaseGroups.length === 1) {
|
|
85696
85737
|
const releaseGroup = releaseGroups[0];
|
|
85697
|
-
if (_optionalChain([releaseGroup, 'optionalAccess',
|
|
85738
|
+
if (_optionalChain([releaseGroup, 'optionalAccess', _264 => _264.projectsRelationship]) === "fixed") {
|
|
85698
85739
|
const releaseGroupProjectNames = Array.from(_nullishCoalesce(releaseGroupToFilteredProjects.get(releaseGroup), () => ( [])));
|
|
85699
85740
|
if (releaseGroupProjectNames.length > 0 && releaseGroupProjectNames[0]) {
|
|
85700
|
-
workspaceVersion = _optionalChain([versionData, 'access',
|
|
85741
|
+
workspaceVersion = _optionalChain([versionData, 'access', _265 => _265[releaseGroupProjectNames[0]], 'optionalAccess', _266 => _266.newVersion]);
|
|
85701
85742
|
}
|
|
85702
85743
|
}
|
|
85703
85744
|
}
|
|
@@ -85711,15 +85752,15 @@ async function releaseVersion(config, args) {
|
|
|
85711
85752
|
projectsVersionData: versionData
|
|
85712
85753
|
};
|
|
85713
85754
|
}
|
|
85714
|
-
if (_nullishCoalesce(args.gitCommit, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85755
|
+
if (_nullishCoalesce(args.gitCommit, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess', _267 => _267.version, 'access', _268 => _268.git, 'access', _269 => _269.commit])))) {
|
|
85715
85756
|
await _sharedjs.commitChanges.call(void 0, {
|
|
85716
85757
|
changedFiles,
|
|
85717
85758
|
isDryRun: !!args.dryRun,
|
|
85718
85759
|
isVerbose: !!args.verbose,
|
|
85719
85760
|
gitCommitMessages: _sharedjs.createCommitMessageValues.call(void 0, releaseGroups, releaseGroupToFilteredProjects, versionData, commitMessage),
|
|
85720
|
-
gitCommitArgs: args.gitCommitArgs || _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85761
|
+
gitCommitArgs: args.gitCommitArgs || _optionalChain([nxReleaseConfig, 'optionalAccess', _270 => _270.version, 'access', _271 => _271.git, 'access', _272 => _272.commitArgs])
|
|
85721
85762
|
});
|
|
85722
|
-
} else if (_nullishCoalesce(args.stageChanges, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85763
|
+
} else if (_nullishCoalesce(args.stageChanges, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess', _273 => _273.version, 'access', _274 => _274.git, 'access', _275 => _275.stageChanges])))) {
|
|
85723
85764
|
_chunkLFH4CIZMcjs.writeInfo.call(void 0, "Staging changed files with git", config);
|
|
85724
85765
|
await _gitjs.gitAdd.call(void 0, {
|
|
85725
85766
|
changedFiles,
|
|
@@ -85727,13 +85768,13 @@ async function releaseVersion(config, args) {
|
|
|
85727
85768
|
verbose: args.verbose
|
|
85728
85769
|
});
|
|
85729
85770
|
}
|
|
85730
|
-
if (_nullishCoalesce(args.gitTag, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85771
|
+
if (_nullishCoalesce(args.gitTag, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess', _276 => _276.version, 'access', _277 => _277.git, 'access', _278 => _278.tag])))) {
|
|
85731
85772
|
_chunkLFH4CIZMcjs.writeInfo.call(void 0, "Tagging commit with git", config);
|
|
85732
85773
|
for (const tag of gitTagValues) {
|
|
85733
85774
|
await _gitjs.gitTag.call(void 0, {
|
|
85734
85775
|
tag,
|
|
85735
|
-
message: args.gitTagMessage || _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85736
|
-
additionalArgs: args.gitTagArgs || _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85776
|
+
message: args.gitTagMessage || _optionalChain([nxReleaseConfig, 'optionalAccess', _279 => _279.version, 'access', _280 => _280.git, 'access', _281 => _281.tagMessage]),
|
|
85777
|
+
additionalArgs: args.gitTagArgs || _optionalChain([nxReleaseConfig, 'optionalAccess', _282 => _282.version, 'access', _283 => _283.git, 'access', _284 => _284.tagArgs]),
|
|
85737
85778
|
dryRun: args.dryRun,
|
|
85738
85779
|
verbose: args.verbose
|
|
85739
85780
|
});
|
|
@@ -85756,7 +85797,7 @@ async function releaseVersion(config, args) {
|
|
|
85756
85797
|
}
|
|
85757
85798
|
_chunkKK4YC43Scjs.__name.call(void 0, releaseVersion, "releaseVersion");
|
|
85758
85799
|
async function runVersionOnProjects(config, projectGraph, nxJson, args, tree, generatorData, projectNames, releaseGroup, versionData) {
|
|
85759
|
-
const workspaceRoot3 = _nullishCoalesce(_optionalChain([config, 'optionalAccess',
|
|
85800
|
+
const workspaceRoot3 = _nullishCoalesce(_optionalChain([config, 'optionalAccess', _285 => _285.workspaceRoot]), () => ( _chunkLFH4CIZMcjs.findWorkspaceRoot.call(void 0, )));
|
|
85760
85801
|
const generatorOptions = {
|
|
85761
85802
|
// Always ensure a string to avoid generator schema validation errors
|
|
85762
85803
|
specifier: _nullishCoalesce(args.specifier, () => ( "")),
|
|
@@ -85784,11 +85825,11 @@ function printAndFlushChanges2(config, tree, isDryRun) {
|
|
|
85784
85825
|
for (const f of changes) {
|
|
85785
85826
|
if (f.type === "CREATE") {
|
|
85786
85827
|
_chunkLFH4CIZMcjs.writeInfo.call(void 0, `CREATE ${f.path}${isDryRun ? " [dry-run]" : ""}`, config);
|
|
85787
|
-
_printchangesjs.printDiff.call(void 0, "", _optionalChain([f, 'access',
|
|
85828
|
+
_printchangesjs.printDiff.call(void 0, "", _optionalChain([f, 'access', _286 => _286.content, 'optionalAccess', _287 => _287.toString, 'call', _288 => _288()]) || "");
|
|
85788
85829
|
} else if (f.type === "UPDATE") {
|
|
85789
85830
|
_chunkLFH4CIZMcjs.writeInfo.call(void 0, `UPDATE ${f.path}${isDryRun ? " [dry-run]" : ""}`, config);
|
|
85790
85831
|
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',
|
|
85832
|
+
_printchangesjs.printDiff.call(void 0, currentContentsOnDisk, _optionalChain([f, 'access', _289 => _289.content, 'optionalAccess', _290 => _290.toString, 'call', _291 => _291()]) || "");
|
|
85792
85833
|
} else if (f.type === "DELETE") {
|
|
85793
85834
|
throw new Error("Unexpected DELETE change, please report this as an issue");
|
|
85794
85835
|
}
|
|
@@ -85867,9 +85908,9 @@ var runRelease = /* @__PURE__ */ _chunkKK4YC43Scjs.__name.call(void 0, async (co
|
|
|
85867
85908
|
- From: ${from}
|
|
85868
85909
|
- To: ${to}
|
|
85869
85910
|
`, config);
|
|
85870
|
-
if (_optionalChain([nxJson, 'access',
|
|
85911
|
+
if (_optionalChain([nxJson, 'access', _292 => _292.release, 'optionalAccess', _293 => _293.groups])) {
|
|
85871
85912
|
nxJson.release.groups = Object.keys(nxJson.release.groups).reduce((ret, groupName) => {
|
|
85872
|
-
const groupConfig = _optionalChain([nxJson, 'access',
|
|
85913
|
+
const groupConfig = _optionalChain([nxJson, 'access', _294 => _294.release, 'optionalAccess', _295 => _295.groups, 'optionalAccess', _296 => _296[groupName]]);
|
|
85873
85914
|
ret[groupName] = _chunkP2CHIYIKcjs.defu.call(void 0, groupConfig, DEFAULT_RELEASE_GROUP_CONFIG);
|
|
85874
85915
|
return ret;
|
|
85875
85916
|
}, {});
|
|
@@ -85892,7 +85933,7 @@ var runRelease = /* @__PURE__ */ _chunkKK4YC43Scjs.__name.call(void 0, async (co
|
|
|
85892
85933
|
});
|
|
85893
85934
|
await releaseChangelog({
|
|
85894
85935
|
...options,
|
|
85895
|
-
version: _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85936
|
+
version: _optionalChain([nxReleaseConfig, 'optionalAccess', _297 => _297.projectsRelationship]) !== "fixed" ? void 0 : workspaceVersion,
|
|
85896
85937
|
versionData: projectsVersionData,
|
|
85897
85938
|
dryRun: false,
|
|
85898
85939
|
verbose: _chunkLFH4CIZMcjs.isVerbose.call(void 0, config.logLevel),
|
|
@@ -85905,7 +85946,7 @@ var runRelease = /* @__PURE__ */ _chunkKK4YC43Scjs.__name.call(void 0, async (co
|
|
|
85905
85946
|
if (options.skipPublish) {
|
|
85906
85947
|
_chunkLFH4CIZMcjs.writeWarning.call(void 0, "Skipping publishing packages since `skipPublish` was provided as `true` in the release options.", config);
|
|
85907
85948
|
} else {
|
|
85908
|
-
const changedProjects = Object.keys(projectsVersionData).filter((key) => _optionalChain([projectsVersionData, 'access',
|
|
85949
|
+
const changedProjects = Object.keys(projectsVersionData).filter((key) => _optionalChain([projectsVersionData, 'access', _298 => _298[key], 'optionalAccess', _299 => _299.newVersion]));
|
|
85909
85950
|
if (changedProjects.length > 0) {
|
|
85910
85951
|
_chunkLFH4CIZMcjs.writeInfo.call(void 0, `Publishing release for ${changedProjects.length} ${changedProjects.length === 1 ? "project" : "projects"}:
|
|
85911
85952
|
${changedProjects.map((changedProject) => ` - ${changedProject}`).join("\n")}
|
|
@@ -85915,12 +85956,12 @@ ${changedProjects.map((changedProject) => ` - ${changedProject}`).join("\n")}
|
|
|
85915
85956
|
dryRun: !!options.dryRun,
|
|
85916
85957
|
verbose: _chunkLFH4CIZMcjs.isVerbose.call(void 0, config.logLevel)
|
|
85917
85958
|
});
|
|
85918
|
-
const failedProjects = Object.keys(result2).filter((key) => _optionalChain([result2, 'access',
|
|
85959
|
+
const failedProjects = Object.keys(result2).filter((key) => _optionalChain([result2, 'access', _300 => _300[key], 'optionalAccess', _301 => _301.code]) && _optionalChain([result2, 'access', _302 => _302[key], 'optionalAccess', _303 => _303.code]) > 0);
|
|
85919
85960
|
if (failedProjects.length > 0) {
|
|
85920
85961
|
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
85962
|
|
|
85922
85963
|
Please review the workflow details for the following project(s):
|
|
85923
|
-
${failedProjects.map((failedProject) => ` - ${failedProject} (Error Code: ${_optionalChain([result2, 'access',
|
|
85964
|
+
${failedProjects.map((failedProject) => ` - ${failedProject} (Error Code: ${_optionalChain([result2, 'access', _304 => _304[failedProject], 'optionalAccess', _305 => _305.code])})`).join("\n")}
|
|
85924
85965
|
`);
|
|
85925
85966
|
}
|
|
85926
85967
|
} else {
|
package/bin/git.js
CHANGED
|
@@ -3034,7 +3034,7 @@ var require_yoctocolors_cjs = __commonJS({
|
|
|
3034
3034
|
init_esm_shims();
|
|
3035
3035
|
var tty2 = __require("node:tty");
|
|
3036
3036
|
var hasColors = tty2?.WriteStream?.prototype?.hasColors?.() ?? false;
|
|
3037
|
-
var
|
|
3037
|
+
var format2 = /* @__PURE__ */ __name((open, close) => {
|
|
3038
3038
|
if (!hasColors) {
|
|
3039
3039
|
return (input) => input;
|
|
3040
3040
|
}
|
|
@@ -3058,47 +3058,47 @@ var require_yoctocolors_cjs = __commonJS({
|
|
|
3058
3058
|
};
|
|
3059
3059
|
}, "format");
|
|
3060
3060
|
var colors8 = {};
|
|
3061
|
-
colors8.reset =
|
|
3062
|
-
colors8.bold =
|
|
3063
|
-
colors8.dim =
|
|
3064
|
-
colors8.italic =
|
|
3065
|
-
colors8.underline =
|
|
3066
|
-
colors8.overline =
|
|
3067
|
-
colors8.inverse =
|
|
3068
|
-
colors8.hidden =
|
|
3069
|
-
colors8.strikethrough =
|
|
3070
|
-
colors8.black =
|
|
3071
|
-
colors8.red =
|
|
3072
|
-
colors8.green =
|
|
3073
|
-
colors8.yellow =
|
|
3074
|
-
colors8.blue =
|
|
3075
|
-
colors8.magenta =
|
|
3076
|
-
colors8.cyan =
|
|
3077
|
-
colors8.white =
|
|
3078
|
-
colors8.gray =
|
|
3079
|
-
colors8.bgBlack =
|
|
3080
|
-
colors8.bgRed =
|
|
3081
|
-
colors8.bgGreen =
|
|
3082
|
-
colors8.bgYellow =
|
|
3083
|
-
colors8.bgBlue =
|
|
3084
|
-
colors8.bgMagenta =
|
|
3085
|
-
colors8.bgCyan =
|
|
3086
|
-
colors8.bgWhite =
|
|
3087
|
-
colors8.bgGray =
|
|
3088
|
-
colors8.redBright =
|
|
3089
|
-
colors8.greenBright =
|
|
3090
|
-
colors8.yellowBright =
|
|
3091
|
-
colors8.blueBright =
|
|
3092
|
-
colors8.magentaBright =
|
|
3093
|
-
colors8.cyanBright =
|
|
3094
|
-
colors8.whiteBright =
|
|
3095
|
-
colors8.bgRedBright =
|
|
3096
|
-
colors8.bgGreenBright =
|
|
3097
|
-
colors8.bgYellowBright =
|
|
3098
|
-
colors8.bgBlueBright =
|
|
3099
|
-
colors8.bgMagentaBright =
|
|
3100
|
-
colors8.bgCyanBright =
|
|
3101
|
-
colors8.bgWhiteBright =
|
|
3061
|
+
colors8.reset = format2(0, 0);
|
|
3062
|
+
colors8.bold = format2(1, 22);
|
|
3063
|
+
colors8.dim = format2(2, 22);
|
|
3064
|
+
colors8.italic = format2(3, 23);
|
|
3065
|
+
colors8.underline = format2(4, 24);
|
|
3066
|
+
colors8.overline = format2(53, 55);
|
|
3067
|
+
colors8.inverse = format2(7, 27);
|
|
3068
|
+
colors8.hidden = format2(8, 28);
|
|
3069
|
+
colors8.strikethrough = format2(9, 29);
|
|
3070
|
+
colors8.black = format2(30, 39);
|
|
3071
|
+
colors8.red = format2(31, 39);
|
|
3072
|
+
colors8.green = format2(32, 39);
|
|
3073
|
+
colors8.yellow = format2(33, 39);
|
|
3074
|
+
colors8.blue = format2(34, 39);
|
|
3075
|
+
colors8.magenta = format2(35, 39);
|
|
3076
|
+
colors8.cyan = format2(36, 39);
|
|
3077
|
+
colors8.white = format2(37, 39);
|
|
3078
|
+
colors8.gray = format2(90, 39);
|
|
3079
|
+
colors8.bgBlack = format2(40, 49);
|
|
3080
|
+
colors8.bgRed = format2(41, 49);
|
|
3081
|
+
colors8.bgGreen = format2(42, 49);
|
|
3082
|
+
colors8.bgYellow = format2(43, 49);
|
|
3083
|
+
colors8.bgBlue = format2(44, 49);
|
|
3084
|
+
colors8.bgMagenta = format2(45, 49);
|
|
3085
|
+
colors8.bgCyan = format2(46, 49);
|
|
3086
|
+
colors8.bgWhite = format2(47, 49);
|
|
3087
|
+
colors8.bgGray = format2(100, 49);
|
|
3088
|
+
colors8.redBright = format2(91, 39);
|
|
3089
|
+
colors8.greenBright = format2(92, 39);
|
|
3090
|
+
colors8.yellowBright = format2(93, 39);
|
|
3091
|
+
colors8.blueBright = format2(94, 39);
|
|
3092
|
+
colors8.magentaBright = format2(95, 39);
|
|
3093
|
+
colors8.cyanBright = format2(96, 39);
|
|
3094
|
+
colors8.whiteBright = format2(97, 39);
|
|
3095
|
+
colors8.bgRedBright = format2(101, 49);
|
|
3096
|
+
colors8.bgGreenBright = format2(102, 49);
|
|
3097
|
+
colors8.bgYellowBright = format2(103, 49);
|
|
3098
|
+
colors8.bgBlueBright = format2(104, 49);
|
|
3099
|
+
colors8.bgMagentaBright = format2(105, 49);
|
|
3100
|
+
colors8.bgCyanBright = format2(106, 49);
|
|
3101
|
+
colors8.bgWhiteBright = format2(107, 49);
|
|
3102
3102
|
module.exports = colors8;
|
|
3103
3103
|
}
|
|
3104
3104
|
});
|
|
@@ -15268,12 +15268,12 @@ var require_common = __commonJS({
|
|
|
15268
15268
|
args.unshift("%O");
|
|
15269
15269
|
}
|
|
15270
15270
|
let index = 0;
|
|
15271
|
-
args[0] = args[0].replace(/%([a-zA-Z%])/g, (match,
|
|
15271
|
+
args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format2) => {
|
|
15272
15272
|
if (match === "%%") {
|
|
15273
15273
|
return "%";
|
|
15274
15274
|
}
|
|
15275
15275
|
index++;
|
|
15276
|
-
const formatter = createDebug.formatters[
|
|
15276
|
+
const formatter = createDebug.formatters[format2];
|
|
15277
15277
|
if (typeof formatter === "function") {
|
|
15278
15278
|
const val = args[index];
|
|
15279
15279
|
match = formatter.call(self2, val);
|
|
@@ -27274,28 +27274,28 @@ var require_format = __commonJS({
|
|
|
27274
27274
|
(function() {
|
|
27275
27275
|
var namespace;
|
|
27276
27276
|
if (typeof module !== "undefined") {
|
|
27277
|
-
namespace = module.exports =
|
|
27277
|
+
namespace = module.exports = format2;
|
|
27278
27278
|
} else {
|
|
27279
27279
|
namespace = function() {
|
|
27280
27280
|
return this || (1, eval)("this");
|
|
27281
27281
|
}();
|
|
27282
27282
|
}
|
|
27283
|
-
namespace.format =
|
|
27283
|
+
namespace.format = format2;
|
|
27284
27284
|
namespace.vsprintf = vsprintf;
|
|
27285
27285
|
if (typeof console !== "undefined" && typeof console.log === "function") {
|
|
27286
27286
|
namespace.printf = printf;
|
|
27287
27287
|
}
|
|
27288
27288
|
function printf() {
|
|
27289
|
-
console.log(
|
|
27289
|
+
console.log(format2.apply(null, arguments));
|
|
27290
27290
|
}
|
|
27291
27291
|
__name(printf, "printf");
|
|
27292
27292
|
function vsprintf(fmt, replacements2) {
|
|
27293
|
-
return
|
|
27293
|
+
return format2.apply(null, [
|
|
27294
27294
|
fmt
|
|
27295
27295
|
].concat(replacements2));
|
|
27296
27296
|
}
|
|
27297
27297
|
__name(vsprintf, "vsprintf");
|
|
27298
|
-
function
|
|
27298
|
+
function format2(fmt) {
|
|
27299
27299
|
var argIndex = 1, args = [].slice.call(arguments), i = 0, n = fmt.length, result2 = "", c, escaped = false, arg, tmp, leadingZero = false, precision, nextArg = /* @__PURE__ */ __name(function() {
|
|
27300
27300
|
return args[argIndex++];
|
|
27301
27301
|
}, "nextArg"), slurpNumber = /* @__PURE__ */ __name(function() {
|
|
@@ -27364,7 +27364,7 @@ var require_format = __commonJS({
|
|
|
27364
27364
|
}
|
|
27365
27365
|
return result2;
|
|
27366
27366
|
}
|
|
27367
|
-
__name(
|
|
27367
|
+
__name(format2, "format");
|
|
27368
27368
|
})();
|
|
27369
27369
|
}
|
|
27370
27370
|
});
|
|
@@ -27387,11 +27387,11 @@ var require_fault = __commonJS({
|
|
|
27387
27387
|
function create2(EConstructor) {
|
|
27388
27388
|
FormattedError.displayName = EConstructor.displayName || EConstructor.name;
|
|
27389
27389
|
return FormattedError;
|
|
27390
|
-
function FormattedError(
|
|
27391
|
-
if (
|
|
27392
|
-
|
|
27390
|
+
function FormattedError(format2) {
|
|
27391
|
+
if (format2) {
|
|
27392
|
+
format2 = formatter.apply(null, arguments);
|
|
27393
27393
|
}
|
|
27394
|
-
return new EConstructor(
|
|
27394
|
+
return new EConstructor(format2);
|
|
27395
27395
|
}
|
|
27396
27396
|
__name(FormattedError, "FormattedError");
|
|
27397
27397
|
}
|
|
@@ -30391,8 +30391,8 @@ var require_prompt = __commonJS({
|
|
|
30391
30391
|
return this.skipped;
|
|
30392
30392
|
}
|
|
30393
30393
|
async initialize() {
|
|
30394
|
-
let { format, options, result: result2 } = this;
|
|
30395
|
-
this.format = () =>
|
|
30394
|
+
let { format: format2, options, result: result2 } = this;
|
|
30395
|
+
this.format = () => format2.call(this, this.value);
|
|
30396
30396
|
this.result = () => result2.call(this, this.value);
|
|
30397
30397
|
if (typeof options.initial === "function") {
|
|
30398
30398
|
this.initial = await options.initial.call(this, this);
|
|
@@ -32976,7 +32976,7 @@ var require_interpolate = __commonJS({
|
|
|
32976
32976
|
};
|
|
32977
32977
|
let { tabstops, items, keys: keys2 } = await tokenize(options, defaults2);
|
|
32978
32978
|
let result2 = createFn("result", prompt2, options);
|
|
32979
|
-
let
|
|
32979
|
+
let format2 = createFn("format", prompt2, options);
|
|
32980
32980
|
let isValid = createFn("validate", prompt2, options, true);
|
|
32981
32981
|
let isVal = prompt2.isValue.bind(prompt2);
|
|
32982
32982
|
return async (state = {}, submitted = false) => {
|
|
@@ -33025,7 +33025,7 @@ var require_interpolate = __commonJS({
|
|
|
33025
33025
|
}
|
|
33026
33026
|
item.placeholder = false;
|
|
33027
33027
|
let before2 = value;
|
|
33028
|
-
value = await
|
|
33028
|
+
value = await format2(value, state, item, index);
|
|
33029
33029
|
if (val !== value) {
|
|
33030
33030
|
state.values[key] = val;
|
|
33031
33031
|
value = prompt2.styles.typing(val);
|
|
@@ -68426,11 +68426,11 @@ var formatCommitMessage = /* @__PURE__ */ __name((state) => {
|
|
|
68426
68426
|
const scope = answers.scope ? answers.scope.trim() : "";
|
|
68427
68427
|
const subject = answers.subject?.trim();
|
|
68428
68428
|
const type = answers.type;
|
|
68429
|
-
const
|
|
68429
|
+
const format2 = config.prompt.settings.format || "{type}({scope}): {emoji}{subject}";
|
|
68430
68430
|
const body = answers.body && typeof answers.body === "string" ? (0, import_word_wrap.default)(answers.body || "", wrapOptions) : "";
|
|
68431
68431
|
const breaking = answers.breakingBody && typeof answers.breakingBody === "string" ? (0, import_word_wrap.default)(answers.breakingBody || "", wrapOptions) : "";
|
|
68432
68432
|
const issues = answers.issuesBody && typeof answers.issuesBody === "string" ? (0, import_word_wrap.default)(answers.issuesBody || "", wrapOptions) : "";
|
|
68433
|
-
const head =
|
|
68433
|
+
const head = format2.replace(/\{emoji\}/g, config.prompt.settings.disableEmoji ? "" : `${emoji} `).replace(/\{scope\}/g, scope).replace(/\{subject\}/g, subject || "").replace(/\{type\}/g, type || "");
|
|
68434
68434
|
let msg = head;
|
|
68435
68435
|
if (body) {
|
|
68436
68436
|
msg += `
|
|
@@ -80896,7 +80896,6 @@ import { readRawVersionPlans, setResolvedVersionPlansOnGroups } from "nx/src/com
|
|
|
80896
80896
|
import { getCommitHash, getFirstGitCommit, getGitDiff, getLatestGitTagForPattern, gitAdd, gitPush, gitTag, parseCommits, parseGitCommit } from "nx/src/command-line/release/utils/git";
|
|
80897
80897
|
import { createOrUpdateGithubRelease, getGitHubRepoData } from "nx/src/command-line/release/utils/github";
|
|
80898
80898
|
import { launchEditor } from "nx/src/command-line/release/utils/launch-editor";
|
|
80899
|
-
import { parseChangelogMarkdown } from "nx/src/command-line/release/utils/markdown";
|
|
80900
80899
|
import { printAndFlushChanges } from "nx/src/command-line/release/utils/print-changes";
|
|
80901
80900
|
import { printConfigAndExit } from "nx/src/command-line/release/utils/print-config";
|
|
80902
80901
|
import { resolveNxJsonConfigErrorMessage } from "nx/src/command-line/release/utils/resolve-nx-json-error-message";
|
|
@@ -80911,8 +80910,46 @@ import { output } from "nx/src/utils/output";
|
|
|
80911
80910
|
import { joinPathFragments } from "nx/src/utils/path";
|
|
80912
80911
|
import { workspaceRoot } from "nx/src/utils/workspace-root";
|
|
80913
80912
|
|
|
80914
|
-
// src/utilities/
|
|
80913
|
+
// src/utilities/changelog-utils.ts
|
|
80915
80914
|
init_esm_shims();
|
|
80915
|
+
import { format, resolveConfig } from "prettier";
|
|
80916
|
+
async function generateChangelogContent(releaseVersion2, filepath, newContent, currentContent, project, workspaceConfig) {
|
|
80917
|
+
const formatOptions = await resolveConfig(filepath) ?? {};
|
|
80918
|
+
const header = await format(`${workspaceConfig?.release.banner ? `
|
|
80919
|
+
|
|
80920
|
+
` : ""}# Changelog ${project || workspaceConfig?.name ? "for" : ""}${workspaceConfig?.name ? ` ${titleCase(workspaceConfig.name)}` : ""}${project ? `${workspaceConfig?.name ? " -" : ""} ${titleCase(project)}` : ""}
|
|
80921
|
+
|
|
80922
|
+
`, {
|
|
80923
|
+
...formatOptions,
|
|
80924
|
+
filepath
|
|
80925
|
+
});
|
|
80926
|
+
let changelogContents = (currentContent || "").replaceAll(header, "").trim();
|
|
80927
|
+
const changelogReleases = parseChangelogMarkdown(changelogContents).releases;
|
|
80928
|
+
const existingVersionToUpdate = changelogReleases.find((r) => r.version === releaseVersion2.rawVersion);
|
|
80929
|
+
if (existingVersionToUpdate) {
|
|
80930
|
+
changelogContents = changelogContents.replace(`## ${generateChangelogTitle(releaseVersion2.rawVersion, project, false, workspaceConfig)}
|
|
80931
|
+
|
|
80932
|
+
|
|
80933
|
+
${existingVersionToUpdate.body}`, newContent);
|
|
80934
|
+
} else {
|
|
80935
|
+
changelogContents = `${newContent}
|
|
80936
|
+
|
|
80937
|
+
${changelogContents}`;
|
|
80938
|
+
}
|
|
80939
|
+
return await format(`${header}
|
|
80940
|
+
|
|
80941
|
+
${changelogContents}`, {
|
|
80942
|
+
...formatOptions,
|
|
80943
|
+
filepath
|
|
80944
|
+
});
|
|
80945
|
+
}
|
|
80946
|
+
__name(generateChangelogContent, "generateChangelogContent");
|
|
80947
|
+
var titleCase = /* @__PURE__ */ __name((input) => {
|
|
80948
|
+
if (!input) {
|
|
80949
|
+
return "";
|
|
80950
|
+
}
|
|
80951
|
+
return input.split(/(?=[A-Z])|[\.\-\s_]/).map((s) => s.trim()).filter((s) => !!s).map((s) => s ? s.toLowerCase().charAt(0).toUpperCase() + s.toLowerCase().slice(1) : s).join(" ");
|
|
80952
|
+
}, "titleCase");
|
|
80916
80953
|
function generateChangelogTitle(version, project, excludeDate = false, workspaceConfig) {
|
|
80917
80954
|
if (!workspaceConfig?.repository || !project) {
|
|
80918
80955
|
return version;
|
|
@@ -80925,6 +80962,30 @@ function generateChangelogTitle(version, project, excludeDate = false, workspace
|
|
|
80925
80962
|
return `[${version}](${workspaceConfig.repository}/releases/tag/${project}%40${version})${maybeDateStr}`;
|
|
80926
80963
|
}
|
|
80927
80964
|
__name(generateChangelogTitle, "generateChangelogTitle");
|
|
80965
|
+
function parseChangelogMarkdown(contents) {
|
|
80966
|
+
const CHANGELOG_RELEASE_HEAD_RE = new RegExp("^#+\\s*\\[?(\\d+\\.\\d+\\.\\d+(?:-[a-zA-Z0-9\\.]+)?)\\]?", "gm");
|
|
80967
|
+
const headings = [
|
|
80968
|
+
...contents.matchAll(CHANGELOG_RELEASE_HEAD_RE)
|
|
80969
|
+
];
|
|
80970
|
+
const releases = [];
|
|
80971
|
+
for (let i = 0; i < headings.length; i++) {
|
|
80972
|
+
const heading = headings[i];
|
|
80973
|
+
if (!heading || heading.length < 2) {
|
|
80974
|
+
continue;
|
|
80975
|
+
}
|
|
80976
|
+
const nextHeading = headings[i + 1];
|
|
80977
|
+
const version = heading[1];
|
|
80978
|
+
const release = {
|
|
80979
|
+
version,
|
|
80980
|
+
body: contents.slice(heading.index + heading[0].length, nextHeading ? nextHeading.index : contents.length).trim()
|
|
80981
|
+
};
|
|
80982
|
+
releases.push(release);
|
|
80983
|
+
}
|
|
80984
|
+
return {
|
|
80985
|
+
releases
|
|
80986
|
+
};
|
|
80987
|
+
}
|
|
80988
|
+
__name(parseChangelogMarkdown, "parseChangelogMarkdown");
|
|
80928
80989
|
|
|
80929
80990
|
// src/release/changelog-renderer.ts
|
|
80930
80991
|
init_esm_shims();
|
|
@@ -82152,7 +82213,7 @@ var AxiosHeaders = class AxiosHeaders2 {
|
|
|
82152
82213
|
}
|
|
82153
82214
|
return deleted;
|
|
82154
82215
|
}
|
|
82155
|
-
normalize(
|
|
82216
|
+
normalize(format2) {
|
|
82156
82217
|
const self2 = this;
|
|
82157
82218
|
const headers = {};
|
|
82158
82219
|
utils_default.forEach(this, (value, header) => {
|
|
@@ -82162,7 +82223,7 @@ var AxiosHeaders = class AxiosHeaders2 {
|
|
|
82162
82223
|
delete self2[header];
|
|
82163
82224
|
return;
|
|
82164
82225
|
}
|
|
82165
|
-
const normalized =
|
|
82226
|
+
const normalized = format2 ? formatHeader(header) : String(header).trim();
|
|
82166
82227
|
if (normalized !== header) {
|
|
82167
82228
|
delete self2[header];
|
|
82168
82229
|
}
|
|
@@ -84739,11 +84800,16 @@ function createAPI(overrideReleaseConfig) {
|
|
|
84739
84800
|
});
|
|
84740
84801
|
if (workspaceChangelog && shouldCreateGitHubRelease(nxReleaseConfig.changelog.workspaceChangelog, args.createRelease)) {
|
|
84741
84802
|
postGitTasks.push(async (latestCommit) => {
|
|
84742
|
-
|
|
84743
|
-
|
|
84803
|
+
const contents = formatGithubReleaseNotes(workspaceChangelog.contents, workspaceConfig);
|
|
84804
|
+
output.logSingleLine(`Creating GitHub Release
|
|
84805
|
+
|
|
84806
|
+
${contents}`);
|
|
84807
|
+
await createOrUpdateGithubRelease(nxReleaseConfig.changelog.workspaceChangelog ? nxReleaseConfig.changelog.workspaceChangelog.createRelease : defaultCreateReleaseProvider, workspaceChangelog.releaseVersion, contents, latestCommit, {
|
|
84744
84808
|
dryRun: !!args.dryRun
|
|
84745
84809
|
});
|
|
84746
84810
|
});
|
|
84811
|
+
} else {
|
|
84812
|
+
output.logSingleLine(`Skipping GitHub Release for workspace changelog as it is disabled in the release group configuration`);
|
|
84747
84813
|
}
|
|
84748
84814
|
const projectToAdditionalDependencyBumps = /* @__PURE__ */ new Map();
|
|
84749
84815
|
for (const releaseGroup of releaseGroups) {
|
|
@@ -84865,11 +84931,16 @@ function createAPI(overrideReleaseConfig) {
|
|
|
84865
84931
|
for (const [projectName, projectChangelog] of Object.entries(projectChangelogs)) {
|
|
84866
84932
|
if (projectChangelogs && shouldCreateGitHubRelease(releaseGroup.changelog, args.createRelease)) {
|
|
84867
84933
|
postGitTasks.push(async (latestCommit) => {
|
|
84868
|
-
|
|
84869
|
-
|
|
84934
|
+
const contents = formatGithubReleaseNotes(projectChangelog.contents, workspaceConfig);
|
|
84935
|
+
output.logSingleLine(`Creating GitHub Release
|
|
84936
|
+
|
|
84937
|
+
${contents}`);
|
|
84938
|
+
await createOrUpdateGithubRelease(releaseGroup.changelog ? releaseGroup.changelog.createRelease : defaultCreateReleaseProvider, projectChangelog.releaseVersion, contents, latestCommit, {
|
|
84870
84939
|
dryRun: !!args.dryRun
|
|
84871
84940
|
});
|
|
84872
84941
|
});
|
|
84942
|
+
} else {
|
|
84943
|
+
output.logSingleLine(`Skipping GitHub Release for ${projectName} as it is disabled in the release group configuration`);
|
|
84873
84944
|
}
|
|
84874
84945
|
allProjectChangelogs[projectName] = projectChangelog;
|
|
84875
84946
|
}
|
|
@@ -84968,6 +85039,8 @@ function createAPI(overrideReleaseConfig) {
|
|
|
84968
85039
|
dryRun: !!args.dryRun
|
|
84969
85040
|
});
|
|
84970
85041
|
});
|
|
85042
|
+
} else {
|
|
85043
|
+
output.logSingleLine(`Skipping GitHub Release for ${projectName} as it is disabled in the release group configuration`);
|
|
84971
85044
|
}
|
|
84972
85045
|
allProjectChangelogs[projectName] = projectChangelog;
|
|
84973
85046
|
}
|
|
@@ -85193,24 +85266,8 @@ async function generateChangelogForWorkspace({ tree, args, projectGraph, nxRelea
|
|
|
85193
85266
|
contents = readFileSync4(changelogPath, "utf8");
|
|
85194
85267
|
}
|
|
85195
85268
|
if (interpolatedTreePath) {
|
|
85196
|
-
|
|
85197
|
-
|
|
85198
|
-
const changelogReleases = parseChangelogMarkdown(rootChangelogContents).releases;
|
|
85199
|
-
const existingVersionToUpdate = changelogReleases.find((r) => r.version === releaseVersion2.rawVersion);
|
|
85200
|
-
if (existingVersionToUpdate) {
|
|
85201
|
-
rootChangelogContents = rootChangelogContents.replace(`## ${generateChangelogTitle(releaseVersion2.rawVersion, null, false, workspaceConfig)}
|
|
85202
|
-
|
|
85203
|
-
|
|
85204
|
-
${existingVersionToUpdate.body}`, contents);
|
|
85205
|
-
} else {
|
|
85206
|
-
rootChangelogContents = `${contents}
|
|
85207
|
-
|
|
85208
|
-
${rootChangelogContents}`;
|
|
85209
|
-
}
|
|
85210
|
-
} else {
|
|
85211
|
-
rootChangelogContents = contents;
|
|
85212
|
-
}
|
|
85213
|
-
tree.write(interpolatedTreePath, rootChangelogContents);
|
|
85269
|
+
const rootChangelogContents = tree.exists(interpolatedTreePath) ? tree.read(interpolatedTreePath)?.toString() : "";
|
|
85270
|
+
tree.write(interpolatedTreePath, await generateChangelogContent(releaseVersion2, interpolatedTreePath, contents, rootChangelogContents, null, workspaceConfig));
|
|
85214
85271
|
printAndFlushChanges(tree, !!dryRun, 3, false, noDiffInChangelogMessage);
|
|
85215
85272
|
}
|
|
85216
85273
|
return {
|
|
@@ -85286,24 +85343,8 @@ async function generateChangelogForProjects({ tree, args, changes, projectsVersi
|
|
|
85286
85343
|
contents = readFileSync4(changelogPath, "utf8");
|
|
85287
85344
|
}
|
|
85288
85345
|
if (interpolatedTreePath) {
|
|
85289
|
-
|
|
85290
|
-
|
|
85291
|
-
const changelogReleases = parseChangelogMarkdown(changelogContents).releases;
|
|
85292
|
-
const existingVersionToUpdate = changelogReleases.find((r) => r.version === releaseVersion2.rawVersion);
|
|
85293
|
-
if (existingVersionToUpdate) {
|
|
85294
|
-
changelogContents = changelogContents.replace(`## ${generateChangelogTitle(releaseVersion2.rawVersion, project.name, false, workspaceConfig)}
|
|
85295
|
-
|
|
85296
|
-
|
|
85297
|
-
${existingVersionToUpdate.body}`, contents);
|
|
85298
|
-
} else {
|
|
85299
|
-
changelogContents = `${contents}
|
|
85300
|
-
|
|
85301
|
-
${changelogContents}`;
|
|
85302
|
-
}
|
|
85303
|
-
} else {
|
|
85304
|
-
changelogContents = contents;
|
|
85305
|
-
}
|
|
85306
|
-
tree.write(interpolatedTreePath, changelogContents);
|
|
85346
|
+
const changelogContents = tree.exists(interpolatedTreePath) ? tree.read(interpolatedTreePath)?.toString() : "";
|
|
85347
|
+
tree.write(interpolatedTreePath, await generateChangelogContent(releaseVersion2, interpolatedTreePath, contents, changelogContents, project.name, workspaceConfig));
|
|
85307
85348
|
printAndFlushChanges(
|
|
85308
85349
|
tree,
|
|
85309
85350
|
!!dryRun,
|