@storm-software/git-tools 2.97.1 → 2.97.2
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 +176 -147
- package/bin/git.js +129 -100
- 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, );
|
|
@@ -84758,7 +84819,7 @@ function createAPI(overrideReleaseConfig) {
|
|
|
84758
84819
|
const dependentProjects = (projectsVersionData[project].dependentProjects || []).map((dep) => {
|
|
84759
84820
|
return {
|
|
84760
84821
|
dependencyName: dep.source,
|
|
84761
|
-
newVersion: _optionalChain([projectsVersionData, 'access',
|
|
84822
|
+
newVersion: _optionalChain([projectsVersionData, 'access', _206 => _206[dep.source], 'optionalAccess', _207 => _207.newVersion])
|
|
84762
84823
|
};
|
|
84763
84824
|
}).filter((b) => b.newVersion !== null);
|
|
84764
84825
|
for (const dependent of dependentProjects) {
|
|
@@ -84777,10 +84838,10 @@ function createAPI(overrideReleaseConfig) {
|
|
|
84777
84838
|
if (config === false) {
|
|
84778
84839
|
continue;
|
|
84779
84840
|
}
|
|
84780
|
-
const projects = _optionalChain([args, 'access',
|
|
84841
|
+
const projects = _optionalChain([args, 'access', _208 => _208.projects, 'optionalAccess', _209 => _209.length]) ? Array.from(releaseGroupToFilteredProjects.get(releaseGroup)).flatMap((project) => {
|
|
84781
84842
|
return [
|
|
84782
84843
|
project,
|
|
84783
|
-
..._optionalChain([projectsVersionData, 'access',
|
|
84844
|
+
..._optionalChain([projectsVersionData, 'access', _210 => _210[project], 'optionalAccess', _211 => _211.dependentProjects, 'access', _212 => _212.map, 'call', _213 => _213((dep) => dep.source)]) || []
|
|
84784
84845
|
];
|
|
84785
84846
|
}) : releaseGroup.projects;
|
|
84786
84847
|
const projectNodes = projects.map((name) => projectGraph.nodes[name]);
|
|
@@ -84816,12 +84877,12 @@ function createAPI(overrideReleaseConfig) {
|
|
|
84816
84877
|
let fromRef = args.from || await _asyncOptionalChain([(await _git.getLatestGitTagForPattern.call(void 0, releaseGroup.releaseTagPattern, {
|
|
84817
84878
|
projectName: project.name,
|
|
84818
84879
|
releaseGroupName: releaseGroup.name
|
|
84819
|
-
}, releaseGroup.releaseTagPatternCheckAllBranchesWhen)), 'optionalAccess', async
|
|
84880
|
+
}, releaseGroup.releaseTagPatternCheckAllBranchesWhen)), 'optionalAccess', async _214 => _214.tag]);
|
|
84820
84881
|
if (!fromRef && useAutomaticFromRef) {
|
|
84821
84882
|
const firstCommit = await _git.getFirstGitCommit.call(void 0, );
|
|
84822
84883
|
const allCommits = await getCommits(firstCommit, toSHA);
|
|
84823
84884
|
const commitsForProject = allCommits.filter((c) => c.affectedFiles.find((f) => f.startsWith(project.data.root)));
|
|
84824
|
-
fromRef = _optionalChain([commitsForProject, 'access',
|
|
84885
|
+
fromRef = _optionalChain([commitsForProject, 'access', _215 => _215[0], 'optionalAccess', _216 => _216.shortHash]);
|
|
84825
84886
|
if (args.verbose) {
|
|
84826
84887
|
console.log(`Determined --from ref for ${project.name} from the first commit in which it exists: ${fromRef}`);
|
|
84827
84888
|
}
|
|
@@ -84920,7 +84981,7 @@ function createAPI(overrideReleaseConfig) {
|
|
|
84920
84981
|
return changes2;
|
|
84921
84982
|
}).filter(Boolean);
|
|
84922
84983
|
} else {
|
|
84923
|
-
let fromRef = args.from || await _asyncOptionalChain([(await _git.getLatestGitTagForPattern.call(void 0, releaseGroup.releaseTagPattern, {}, releaseGroup.releaseTagPatternCheckAllBranchesWhen)), 'optionalAccess', async
|
|
84984
|
+
let fromRef = args.from || await _asyncOptionalChain([(await _git.getLatestGitTagForPattern.call(void 0, releaseGroup.releaseTagPattern, {}, releaseGroup.releaseTagPatternCheckAllBranchesWhen)), 'optionalAccess', async _217 => _217.tag]);
|
|
84924
84985
|
if (!fromRef) {
|
|
84925
84986
|
if (useAutomaticFromRef) {
|
|
84926
84987
|
fromRef = await _git.getFirstGitCommit.call(void 0, );
|
|
@@ -85138,7 +85199,7 @@ async function generateChangelogForWorkspace({ tree, args, projectGraph, nxRelea
|
|
|
85138
85199
|
});
|
|
85139
85200
|
return;
|
|
85140
85201
|
}
|
|
85141
|
-
if (_optionalChain([Object, 'access',
|
|
85202
|
+
if (_optionalChain([Object, 'access', _218 => _218.values, 'call', _219 => _219(nxReleaseConfig.groups), 'access', _220 => _220[0], 'optionalAccess', _221 => _221.projectsRelationship]) === "independent") {
|
|
85142
85203
|
_output.output.warn({
|
|
85143
85204
|
title: `Workspace changelog is enabled, but you have configured an independent projects relationship. This is not supported, so workspace changelog will be disabled.`,
|
|
85144
85205
|
bodyLines: [
|
|
@@ -85194,24 +85255,8 @@ async function generateChangelogForWorkspace({ tree, args, projectGraph, nxRelea
|
|
|
85194
85255
|
contents = _fs.readFileSync.call(void 0, changelogPath, "utf8");
|
|
85195
85256
|
}
|
|
85196
85257
|
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);
|
|
85258
|
+
const rootChangelogContents = tree.exists(interpolatedTreePath) ? _optionalChain([tree, 'access', _222 => _222.read, 'call', _223 => _223(interpolatedTreePath), 'optionalAccess', _224 => _224.toString, 'call', _225 => _225()]) : "";
|
|
85259
|
+
tree.write(interpolatedTreePath, await generateChangelogContent(releaseVersion2, interpolatedTreePath, contents, rootChangelogContents, null, workspaceConfig));
|
|
85215
85260
|
_printchanges.printAndFlushChanges.call(void 0, tree, !!dryRun, 3, false, _shared.noDiffInChangelogMessage);
|
|
85216
85261
|
}
|
|
85217
85262
|
return {
|
|
@@ -85243,7 +85288,7 @@ async function generateChangelogForProjects({ tree, args, changes, projectsVersi
|
|
|
85243
85288
|
// within the tree, workspaceRoot is the root
|
|
85244
85289
|
});
|
|
85245
85290
|
}
|
|
85246
|
-
if (!_optionalChain([projectsVersionData, 'access',
|
|
85291
|
+
if (!_optionalChain([projectsVersionData, 'access', _226 => _226[project.name], 'optionalAccess', _227 => _227.newVersion])) {
|
|
85247
85292
|
continue;
|
|
85248
85293
|
}
|
|
85249
85294
|
const releaseVersion2 = new (0, _shared.ReleaseVersion)({
|
|
@@ -85287,24 +85332,8 @@ async function generateChangelogForProjects({ tree, args, changes, projectsVersi
|
|
|
85287
85332
|
contents = _fs.readFileSync.call(void 0, changelogPath, "utf8");
|
|
85288
85333
|
}
|
|
85289
85334
|
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);
|
|
85335
|
+
const changelogContents = tree.exists(interpolatedTreePath) ? _optionalChain([tree, 'access', _228 => _228.read, 'call', _229 => _229(interpolatedTreePath), 'optionalAccess', _230 => _230.toString, 'call', _231 => _231()]) : "";
|
|
85336
|
+
tree.write(interpolatedTreePath, await generateChangelogContent(releaseVersion2, interpolatedTreePath, contents, changelogContents, project.name, workspaceConfig));
|
|
85308
85337
|
_printchanges.printAndFlushChanges.call(void 0,
|
|
85309
85338
|
tree,
|
|
85310
85339
|
!!dryRun,
|
|
@@ -85533,7 +85562,7 @@ async function releaseVersion(config, args) {
|
|
|
85533
85562
|
});
|
|
85534
85563
|
const { projects } = _projectgraphjs.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
85535
85564
|
const nxJson = _nxjsonjs.readNxJson.call(void 0, );
|
|
85536
|
-
const workspaceRoot3 = _nullishCoalesce(_optionalChain([config, 'optionalAccess',
|
|
85565
|
+
const workspaceRoot3 = _nullishCoalesce(_optionalChain([config, 'optionalAccess', _232 => _232.workspaceRoot]), () => ( _chunkLFH4CIZMcjs.findWorkspaceRoot.call(void 0, )));
|
|
85537
85566
|
if (args.verbose) {
|
|
85538
85567
|
process.env.NX_VERBOSE_LOGGING = "true";
|
|
85539
85568
|
}
|
|
@@ -85541,7 +85570,7 @@ async function releaseVersion(config, args) {
|
|
|
85541
85570
|
if (configError) {
|
|
85542
85571
|
return await _configjs.handleNxReleaseConfigError.call(void 0, configError);
|
|
85543
85572
|
}
|
|
85544
|
-
if ((args.gitCommit === void 0 || args.gitTag === void 0 || args.stageChanges === void 0) && _optionalChain([nxJson, 'access',
|
|
85573
|
+
if ((args.gitCommit === void 0 || args.gitTag === void 0 || args.stageChanges === void 0) && _optionalChain([nxJson, 'access', _233 => _233.release, 'optionalAccess', _234 => _234.git])) {
|
|
85545
85574
|
await _resolvenxjsonerrormessagejs.resolveNxJsonConfigErrorMessage.call(void 0, [
|
|
85546
85575
|
"release",
|
|
85547
85576
|
"git"
|
|
@@ -85556,10 +85585,10 @@ async function releaseVersion(config, args) {
|
|
|
85556
85585
|
}
|
|
85557
85586
|
const tree = new (0, _treejs.FsTree)(workspaceRoot3, true);
|
|
85558
85587
|
const versionData = {};
|
|
85559
|
-
const commitMessage = args.gitCommitMessage || _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85588
|
+
const commitMessage = args.gitCommitMessage || _optionalChain([nxReleaseConfig, 'optionalAccess', _235 => _235.version, 'access', _236 => _236.git, 'access', _237 => _237.commitMessage]);
|
|
85560
85589
|
const additionalChangedFiles = /* @__PURE__ */ new Set();
|
|
85561
85590
|
const generatorCallbacks = [];
|
|
85562
|
-
if (_optionalChain([args, 'access',
|
|
85591
|
+
if (_optionalChain([args, 'access', _238 => _238.projects, 'optionalAccess', _239 => _239.length])) {
|
|
85563
85592
|
_chunkLFH4CIZMcjs.writeInfo.call(void 0, "Run versioning for all remaining release groups and filtered projects within them", config);
|
|
85564
85593
|
for (const releaseGroup of releaseGroups) {
|
|
85565
85594
|
const releaseGroupName = releaseGroup.name;
|
|
@@ -85599,7 +85628,7 @@ async function releaseVersion(config, args) {
|
|
|
85599
85628
|
});
|
|
85600
85629
|
}
|
|
85601
85630
|
}
|
|
85602
|
-
const gitTagValues2 = _nullishCoalesce(args.gitTag, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85631
|
+
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
85632
|
_sharedjs.handleDuplicateGitTags.call(void 0, gitTagValues2);
|
|
85604
85633
|
printAndFlushChanges2(config, tree, !!args.dryRun);
|
|
85605
85634
|
for (const generatorCallback of generatorCallbacks) {
|
|
@@ -85616,15 +85645,15 @@ async function releaseVersion(config, args) {
|
|
|
85616
85645
|
projectsVersionData: versionData
|
|
85617
85646
|
};
|
|
85618
85647
|
}
|
|
85619
|
-
if (_nullishCoalesce(args.gitCommit, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85648
|
+
if (_nullishCoalesce(args.gitCommit, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess', _243 => _243.version, 'access', _244 => _244.git, 'access', _245 => _245.commit])))) {
|
|
85620
85649
|
await _sharedjs.commitChanges.call(void 0, {
|
|
85621
85650
|
changedFiles: changedFiles2,
|
|
85622
85651
|
isDryRun: !!args.dryRun,
|
|
85623
85652
|
isVerbose: !!args.verbose,
|
|
85624
85653
|
gitCommitMessages: _sharedjs.createCommitMessageValues.call(void 0, releaseGroups, releaseGroupToFilteredProjects, versionData, commitMessage),
|
|
85625
|
-
gitCommitArgs: args.gitCommitArgs || _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85654
|
+
gitCommitArgs: args.gitCommitArgs || _optionalChain([nxReleaseConfig, 'optionalAccess', _246 => _246.version, 'access', _247 => _247.git, 'access', _248 => _248.commitArgs])
|
|
85626
85655
|
});
|
|
85627
|
-
} else if (_nullishCoalesce(args.stageChanges, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85656
|
+
} else if (_nullishCoalesce(args.stageChanges, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess', _249 => _249.version, 'access', _250 => _250.git, 'access', _251 => _251.stageChanges])))) {
|
|
85628
85657
|
_chunkLFH4CIZMcjs.writeInfo.call(void 0, "Staging changed files with git", config);
|
|
85629
85658
|
await _gitjs.gitAdd.call(void 0, {
|
|
85630
85659
|
changedFiles: changedFiles2,
|
|
@@ -85632,13 +85661,13 @@ async function releaseVersion(config, args) {
|
|
|
85632
85661
|
verbose: args.verbose
|
|
85633
85662
|
});
|
|
85634
85663
|
}
|
|
85635
|
-
if (_nullishCoalesce(args.gitTag, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85664
|
+
if (_nullishCoalesce(args.gitTag, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess', _252 => _252.version, 'access', _253 => _253.git, 'access', _254 => _254.tag])))) {
|
|
85636
85665
|
_chunkLFH4CIZMcjs.writeInfo.call(void 0, "Tagging commit with git", config);
|
|
85637
85666
|
for (const tag of gitTagValues2) {
|
|
85638
85667
|
await _gitjs.gitTag.call(void 0, {
|
|
85639
85668
|
tag,
|
|
85640
|
-
message: args.gitTagMessage || _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85641
|
-
additionalArgs: args.gitTagArgs || _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85669
|
+
message: args.gitTagMessage || _optionalChain([nxReleaseConfig, 'optionalAccess', _255 => _255.version, 'access', _256 => _256.git, 'access', _257 => _257.tagMessage]),
|
|
85670
|
+
additionalArgs: args.gitTagArgs || _optionalChain([nxReleaseConfig, 'optionalAccess', _258 => _258.version, 'access', _259 => _259.git, 'access', _260 => _260.tagArgs]),
|
|
85642
85671
|
dryRun: args.dryRun,
|
|
85643
85672
|
verbose: args.verbose
|
|
85644
85673
|
});
|
|
@@ -85685,7 +85714,7 @@ async function releaseVersion(config, args) {
|
|
|
85685
85714
|
});
|
|
85686
85715
|
}
|
|
85687
85716
|
}
|
|
85688
|
-
const gitTagValues = _nullishCoalesce(args.gitTag, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85717
|
+
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
85718
|
_sharedjs.handleDuplicateGitTags.call(void 0, gitTagValues);
|
|
85690
85719
|
printAndFlushChanges2(config, tree, !!args.dryRun);
|
|
85691
85720
|
for (const generatorCallback of generatorCallbacks) {
|
|
@@ -85694,10 +85723,10 @@ async function releaseVersion(config, args) {
|
|
|
85694
85723
|
let workspaceVersion = void 0;
|
|
85695
85724
|
if (releaseGroups.length === 1) {
|
|
85696
85725
|
const releaseGroup = releaseGroups[0];
|
|
85697
|
-
if (_optionalChain([releaseGroup, 'optionalAccess',
|
|
85726
|
+
if (_optionalChain([releaseGroup, 'optionalAccess', _264 => _264.projectsRelationship]) === "fixed") {
|
|
85698
85727
|
const releaseGroupProjectNames = Array.from(_nullishCoalesce(releaseGroupToFilteredProjects.get(releaseGroup), () => ( [])));
|
|
85699
85728
|
if (releaseGroupProjectNames.length > 0 && releaseGroupProjectNames[0]) {
|
|
85700
|
-
workspaceVersion = _optionalChain([versionData, 'access',
|
|
85729
|
+
workspaceVersion = _optionalChain([versionData, 'access', _265 => _265[releaseGroupProjectNames[0]], 'optionalAccess', _266 => _266.newVersion]);
|
|
85701
85730
|
}
|
|
85702
85731
|
}
|
|
85703
85732
|
}
|
|
@@ -85711,15 +85740,15 @@ async function releaseVersion(config, args) {
|
|
|
85711
85740
|
projectsVersionData: versionData
|
|
85712
85741
|
};
|
|
85713
85742
|
}
|
|
85714
|
-
if (_nullishCoalesce(args.gitCommit, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85743
|
+
if (_nullishCoalesce(args.gitCommit, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess', _267 => _267.version, 'access', _268 => _268.git, 'access', _269 => _269.commit])))) {
|
|
85715
85744
|
await _sharedjs.commitChanges.call(void 0, {
|
|
85716
85745
|
changedFiles,
|
|
85717
85746
|
isDryRun: !!args.dryRun,
|
|
85718
85747
|
isVerbose: !!args.verbose,
|
|
85719
85748
|
gitCommitMessages: _sharedjs.createCommitMessageValues.call(void 0, releaseGroups, releaseGroupToFilteredProjects, versionData, commitMessage),
|
|
85720
|
-
gitCommitArgs: args.gitCommitArgs || _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85749
|
+
gitCommitArgs: args.gitCommitArgs || _optionalChain([nxReleaseConfig, 'optionalAccess', _270 => _270.version, 'access', _271 => _271.git, 'access', _272 => _272.commitArgs])
|
|
85721
85750
|
});
|
|
85722
|
-
} else if (_nullishCoalesce(args.stageChanges, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85751
|
+
} else if (_nullishCoalesce(args.stageChanges, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess', _273 => _273.version, 'access', _274 => _274.git, 'access', _275 => _275.stageChanges])))) {
|
|
85723
85752
|
_chunkLFH4CIZMcjs.writeInfo.call(void 0, "Staging changed files with git", config);
|
|
85724
85753
|
await _gitjs.gitAdd.call(void 0, {
|
|
85725
85754
|
changedFiles,
|
|
@@ -85727,13 +85756,13 @@ async function releaseVersion(config, args) {
|
|
|
85727
85756
|
verbose: args.verbose
|
|
85728
85757
|
});
|
|
85729
85758
|
}
|
|
85730
|
-
if (_nullishCoalesce(args.gitTag, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85759
|
+
if (_nullishCoalesce(args.gitTag, () => ( _optionalChain([nxReleaseConfig, 'optionalAccess', _276 => _276.version, 'access', _277 => _277.git, 'access', _278 => _278.tag])))) {
|
|
85731
85760
|
_chunkLFH4CIZMcjs.writeInfo.call(void 0, "Tagging commit with git", config);
|
|
85732
85761
|
for (const tag of gitTagValues) {
|
|
85733
85762
|
await _gitjs.gitTag.call(void 0, {
|
|
85734
85763
|
tag,
|
|
85735
|
-
message: args.gitTagMessage || _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85736
|
-
additionalArgs: args.gitTagArgs || _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85764
|
+
message: args.gitTagMessage || _optionalChain([nxReleaseConfig, 'optionalAccess', _279 => _279.version, 'access', _280 => _280.git, 'access', _281 => _281.tagMessage]),
|
|
85765
|
+
additionalArgs: args.gitTagArgs || _optionalChain([nxReleaseConfig, 'optionalAccess', _282 => _282.version, 'access', _283 => _283.git, 'access', _284 => _284.tagArgs]),
|
|
85737
85766
|
dryRun: args.dryRun,
|
|
85738
85767
|
verbose: args.verbose
|
|
85739
85768
|
});
|
|
@@ -85756,7 +85785,7 @@ async function releaseVersion(config, args) {
|
|
|
85756
85785
|
}
|
|
85757
85786
|
_chunkKK4YC43Scjs.__name.call(void 0, releaseVersion, "releaseVersion");
|
|
85758
85787
|
async function runVersionOnProjects(config, projectGraph, nxJson, args, tree, generatorData, projectNames, releaseGroup, versionData) {
|
|
85759
|
-
const workspaceRoot3 = _nullishCoalesce(_optionalChain([config, 'optionalAccess',
|
|
85788
|
+
const workspaceRoot3 = _nullishCoalesce(_optionalChain([config, 'optionalAccess', _285 => _285.workspaceRoot]), () => ( _chunkLFH4CIZMcjs.findWorkspaceRoot.call(void 0, )));
|
|
85760
85789
|
const generatorOptions = {
|
|
85761
85790
|
// Always ensure a string to avoid generator schema validation errors
|
|
85762
85791
|
specifier: _nullishCoalesce(args.specifier, () => ( "")),
|
|
@@ -85784,11 +85813,11 @@ function printAndFlushChanges2(config, tree, isDryRun) {
|
|
|
85784
85813
|
for (const f of changes) {
|
|
85785
85814
|
if (f.type === "CREATE") {
|
|
85786
85815
|
_chunkLFH4CIZMcjs.writeInfo.call(void 0, `CREATE ${f.path}${isDryRun ? " [dry-run]" : ""}`, config);
|
|
85787
|
-
_printchangesjs.printDiff.call(void 0, "", _optionalChain([f, 'access',
|
|
85816
|
+
_printchangesjs.printDiff.call(void 0, "", _optionalChain([f, 'access', _286 => _286.content, 'optionalAccess', _287 => _287.toString, 'call', _288 => _288()]) || "");
|
|
85788
85817
|
} else if (f.type === "UPDATE") {
|
|
85789
85818
|
_chunkLFH4CIZMcjs.writeInfo.call(void 0, `UPDATE ${f.path}${isDryRun ? " [dry-run]" : ""}`, config);
|
|
85790
85819
|
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',
|
|
85820
|
+
_printchangesjs.printDiff.call(void 0, currentContentsOnDisk, _optionalChain([f, 'access', _289 => _289.content, 'optionalAccess', _290 => _290.toString, 'call', _291 => _291()]) || "");
|
|
85792
85821
|
} else if (f.type === "DELETE") {
|
|
85793
85822
|
throw new Error("Unexpected DELETE change, please report this as an issue");
|
|
85794
85823
|
}
|
|
@@ -85867,9 +85896,9 @@ var runRelease = /* @__PURE__ */ _chunkKK4YC43Scjs.__name.call(void 0, async (co
|
|
|
85867
85896
|
- From: ${from}
|
|
85868
85897
|
- To: ${to}
|
|
85869
85898
|
`, config);
|
|
85870
|
-
if (_optionalChain([nxJson, 'access',
|
|
85899
|
+
if (_optionalChain([nxJson, 'access', _292 => _292.release, 'optionalAccess', _293 => _293.groups])) {
|
|
85871
85900
|
nxJson.release.groups = Object.keys(nxJson.release.groups).reduce((ret, groupName) => {
|
|
85872
|
-
const groupConfig = _optionalChain([nxJson, 'access',
|
|
85901
|
+
const groupConfig = _optionalChain([nxJson, 'access', _294 => _294.release, 'optionalAccess', _295 => _295.groups, 'optionalAccess', _296 => _296[groupName]]);
|
|
85873
85902
|
ret[groupName] = _chunkP2CHIYIKcjs.defu.call(void 0, groupConfig, DEFAULT_RELEASE_GROUP_CONFIG);
|
|
85874
85903
|
return ret;
|
|
85875
85904
|
}, {});
|
|
@@ -85892,7 +85921,7 @@ var runRelease = /* @__PURE__ */ _chunkKK4YC43Scjs.__name.call(void 0, async (co
|
|
|
85892
85921
|
});
|
|
85893
85922
|
await releaseChangelog({
|
|
85894
85923
|
...options,
|
|
85895
|
-
version: _optionalChain([nxReleaseConfig, 'optionalAccess',
|
|
85924
|
+
version: _optionalChain([nxReleaseConfig, 'optionalAccess', _297 => _297.projectsRelationship]) !== "fixed" ? void 0 : workspaceVersion,
|
|
85896
85925
|
versionData: projectsVersionData,
|
|
85897
85926
|
dryRun: false,
|
|
85898
85927
|
verbose: _chunkLFH4CIZMcjs.isVerbose.call(void 0, config.logLevel),
|
|
@@ -85905,7 +85934,7 @@ var runRelease = /* @__PURE__ */ _chunkKK4YC43Scjs.__name.call(void 0, async (co
|
|
|
85905
85934
|
if (options.skipPublish) {
|
|
85906
85935
|
_chunkLFH4CIZMcjs.writeWarning.call(void 0, "Skipping publishing packages since `skipPublish` was provided as `true` in the release options.", config);
|
|
85907
85936
|
} else {
|
|
85908
|
-
const changedProjects = Object.keys(projectsVersionData).filter((key) => _optionalChain([projectsVersionData, 'access',
|
|
85937
|
+
const changedProjects = Object.keys(projectsVersionData).filter((key) => _optionalChain([projectsVersionData, 'access', _298 => _298[key], 'optionalAccess', _299 => _299.newVersion]));
|
|
85909
85938
|
if (changedProjects.length > 0) {
|
|
85910
85939
|
_chunkLFH4CIZMcjs.writeInfo.call(void 0, `Publishing release for ${changedProjects.length} ${changedProjects.length === 1 ? "project" : "projects"}:
|
|
85911
85940
|
${changedProjects.map((changedProject) => ` - ${changedProject}`).join("\n")}
|
|
@@ -85915,12 +85944,12 @@ ${changedProjects.map((changedProject) => ` - ${changedProject}`).join("\n")}
|
|
|
85915
85944
|
dryRun: !!options.dryRun,
|
|
85916
85945
|
verbose: _chunkLFH4CIZMcjs.isVerbose.call(void 0, config.logLevel)
|
|
85917
85946
|
});
|
|
85918
|
-
const failedProjects = Object.keys(result2).filter((key) => _optionalChain([result2, 'access',
|
|
85947
|
+
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
85948
|
if (failedProjects.length > 0) {
|
|
85920
85949
|
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
85950
|
|
|
85922
85951
|
Please review the workflow details for the following project(s):
|
|
85923
|
-
${failedProjects.map((failedProject) => ` - ${failedProject} (Error Code: ${_optionalChain([result2, 'access',
|
|
85952
|
+
${failedProjects.map((failedProject) => ` - ${failedProject} (Error Code: ${_optionalChain([result2, 'access', _304 => _304[failedProject], 'optionalAccess', _305 => _305.code])})`).join("\n")}
|
|
85924
85953
|
`);
|
|
85925
85954
|
}
|
|
85926
85955
|
} 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
|
}
|
|
@@ -85193,24 +85254,8 @@ async function generateChangelogForWorkspace({ tree, args, projectGraph, nxRelea
|
|
|
85193
85254
|
contents = readFileSync4(changelogPath, "utf8");
|
|
85194
85255
|
}
|
|
85195
85256
|
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);
|
|
85257
|
+
const rootChangelogContents = tree.exists(interpolatedTreePath) ? tree.read(interpolatedTreePath)?.toString() : "";
|
|
85258
|
+
tree.write(interpolatedTreePath, await generateChangelogContent(releaseVersion2, interpolatedTreePath, contents, rootChangelogContents, null, workspaceConfig));
|
|
85214
85259
|
printAndFlushChanges(tree, !!dryRun, 3, false, noDiffInChangelogMessage);
|
|
85215
85260
|
}
|
|
85216
85261
|
return {
|
|
@@ -85286,24 +85331,8 @@ async function generateChangelogForProjects({ tree, args, changes, projectsVersi
|
|
|
85286
85331
|
contents = readFileSync4(changelogPath, "utf8");
|
|
85287
85332
|
}
|
|
85288
85333
|
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);
|
|
85334
|
+
const changelogContents = tree.exists(interpolatedTreePath) ? tree.read(interpolatedTreePath)?.toString() : "";
|
|
85335
|
+
tree.write(interpolatedTreePath, await generateChangelogContent(releaseVersion2, interpolatedTreePath, contents, changelogContents, project.name, workspaceConfig));
|
|
85307
85336
|
printAndFlushChanges(
|
|
85308
85337
|
tree,
|
|
85309
85338
|
!!dryRun,
|