@storm-software/git-tools 2.121.1 → 2.121.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -2
- package/bin/{chunk-7V324BCR.cjs → chunk-N5U2S3QK.cjs} +1 -1
- package/bin/{chunk-XJZXOYRK.js → chunk-QBJQH2IK.js} +1 -1
- package/bin/git.cjs +88 -84
- package/bin/git.js +18 -14
- package/bin/post-checkout.cjs +9 -9
- package/bin/post-checkout.js +1 -1
- package/bin/post-commit.cjs +9 -9
- package/bin/post-commit.js +1 -1
- package/bin/post-merge.cjs +9 -9
- package/bin/post-merge.js +1 -1
- package/bin/pre-commit.cjs +9 -9
- package/bin/pre-commit.js +1 -1
- package/bin/pre-install.cjs +9 -9
- package/bin/pre-install.js +1 -1
- package/bin/pre-push.cjs +15 -15
- package/bin/pre-push.js +3 -3
- package/bin/prepare.cjs +7 -7
- package/bin/prepare.js +1 -1
- package/bin/version-warning.cjs +5 -5
- package/bin/version-warning.js +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
|
|
|
21
21
|
|
|
22
22
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
23
23
|
|
|
24
|
-
[](https://prettier.io/) [](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://fumadocs.vercel.app/) 
|
|
25
25
|
|
|
26
26
|
<!-- prettier-ignore-start -->
|
|
27
27
|
<!-- markdownlint-disable -->
|
|
@@ -40,7 +40,6 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
|
|
|
40
40
|
|
|
41
41
|
<!-- START doctoc -->
|
|
42
42
|
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
|
43
|
-
|
|
44
43
|
## Table of Contents
|
|
45
44
|
|
|
46
45
|
- [Storm Git Tools](#storm-git-tools)
|
|
@@ -2729,7 +2729,7 @@ var correctPaths = function(path) {
|
|
|
2729
2729
|
return ".";
|
|
2730
2730
|
}
|
|
2731
2731
|
path = normalizeWindowsPath(path);
|
|
2732
|
-
const isUNCPath = path
|
|
2732
|
+
const isUNCPath = path?.match(_UNC_REGEX);
|
|
2733
2733
|
const isPathAbsolute = isAbsolute(path);
|
|
2734
2734
|
const trailingSeparator = path[path.length - 1] === "/";
|
|
2735
2735
|
path = normalizeString(path, !isPathAbsolute);
|
|
@@ -2719,7 +2719,7 @@ var correctPaths = function(path) {
|
|
|
2719
2719
|
return ".";
|
|
2720
2720
|
}
|
|
2721
2721
|
path = normalizeWindowsPath(path);
|
|
2722
|
-
const isUNCPath = path
|
|
2722
|
+
const isUNCPath = path?.match(_UNC_REGEX);
|
|
2723
2723
|
const isPathAbsolute = isAbsolute(path);
|
|
2724
2724
|
const trailingSeparator = path[path.length - 1] === "/";
|
|
2725
2725
|
path = normalizeString(path, !isPathAbsolute);
|
package/bin/git.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var chunkCIJVSMK2_cjs = require('./chunk-CIJVSMK2.cjs');
|
|
5
|
-
var
|
|
5
|
+
var chunkN5U2S3QK_cjs = require('./chunk-N5U2S3QK.cjs');
|
|
6
6
|
var TOML = require('@ltd/j-toml');
|
|
7
7
|
var commander = require('commander');
|
|
8
8
|
var prompts = require('@inquirer/prompts');
|
|
@@ -447,16 +447,16 @@ var config2 = {
|
|
|
447
447
|
var monorepo_default = config2;
|
|
448
448
|
|
|
449
449
|
// src/commitlint/helpers.ts
|
|
450
|
-
var jiti = jiti$1.createJiti(
|
|
450
|
+
var jiti = jiti$1.createJiti(chunkN5U2S3QK_cjs.importMetaUrl, { importMeta: ({ url: (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('git.cjs', document.baseURI).href)) }) });
|
|
451
451
|
async function resolveCommitlintConfig(workspaceConfig, configPath) {
|
|
452
452
|
if (configPath && configPath !== "@storm-software/git-tools/commitlint/minimal" && configPath !== "@storm-software/git-tools/commitlint/monorepo") {
|
|
453
|
-
|
|
453
|
+
chunkN5U2S3QK_cjs.writeInfo(
|
|
454
454
|
`Using custom commitlint config file: ${configPath}`,
|
|
455
455
|
workspaceConfig
|
|
456
456
|
);
|
|
457
457
|
} else {
|
|
458
458
|
configPath = workspaceConfig?.variant === "minimal" ? "@storm-software/git-tools/commitlint/minimal" : "@storm-software/git-tools/commitlint/monorepo";
|
|
459
|
-
|
|
459
|
+
chunkN5U2S3QK_cjs.writeInfo(
|
|
460
460
|
`Using standard commitlint config file: ${configPath}`,
|
|
461
461
|
workspaceConfig
|
|
462
462
|
);
|
|
@@ -1047,7 +1047,7 @@ function getRuleFromScopeEnum(scopeEnum) {
|
|
|
1047
1047
|
// src/commitlint/run.ts
|
|
1048
1048
|
var COMMIT_EDITMSG_PATH = ".git/COMMIT_EDITMSG";
|
|
1049
1049
|
async function runCommitLint(workspaceConfig, options) {
|
|
1050
|
-
|
|
1050
|
+
chunkN5U2S3QK_cjs.writeInfo(
|
|
1051
1051
|
"\u{1F4DD} Validating git commit message aligns with the Storm Software specification",
|
|
1052
1052
|
workspaceConfig
|
|
1053
1053
|
);
|
|
@@ -1055,7 +1055,7 @@ async function runCommitLint(workspaceConfig, options) {
|
|
|
1055
1055
|
if (options.message && options.message !== COMMIT_EDITMSG_PATH) {
|
|
1056
1056
|
commitMessage = options.message;
|
|
1057
1057
|
} else {
|
|
1058
|
-
const commitFile =
|
|
1058
|
+
const commitFile = chunkN5U2S3QK_cjs.joinPaths(
|
|
1059
1059
|
workspaceConfig.workspaceRoot,
|
|
1060
1060
|
options.file || options.message || COMMIT_EDITMSG_PATH
|
|
1061
1061
|
);
|
|
@@ -1072,17 +1072,17 @@ async function runCommitLint(workspaceConfig, options) {
|
|
|
1072
1072
|
if (upstreamRemote) {
|
|
1073
1073
|
const upstreamRemoteIdentifier = upstreamRemote.split(" ")[0]?.trim();
|
|
1074
1074
|
if (!upstreamRemoteIdentifier) {
|
|
1075
|
-
|
|
1075
|
+
chunkN5U2S3QK_cjs.writeWarning(
|
|
1076
1076
|
`No upstream remote found for ${workspaceConfig.name}.git. Skipping comparison.`,
|
|
1077
1077
|
workspaceConfig
|
|
1078
1078
|
);
|
|
1079
1079
|
return;
|
|
1080
1080
|
}
|
|
1081
|
-
|
|
1081
|
+
chunkN5U2S3QK_cjs.writeDebug(`Comparing against remote ${upstreamRemoteIdentifier}`);
|
|
1082
1082
|
const currentBranch = childProcess__default.default.execSync("git branch --show-current").toString().trim();
|
|
1083
1083
|
gitLogCmd = gitLogCmd + ` ${currentBranch} ^${upstreamRemoteIdentifier}/main`;
|
|
1084
1084
|
} else {
|
|
1085
|
-
|
|
1085
|
+
chunkN5U2S3QK_cjs.writeWarning(
|
|
1086
1086
|
`No upstream remote found for ${workspaceConfig.name}.git. Skipping comparison against upstream main.`,
|
|
1087
1087
|
workspaceConfig
|
|
1088
1088
|
);
|
|
@@ -1090,7 +1090,7 @@ async function runCommitLint(workspaceConfig, options) {
|
|
|
1090
1090
|
}
|
|
1091
1091
|
commitMessage = childProcess__default.default.execSync(gitLogCmd).toString().trim();
|
|
1092
1092
|
if (!commitMessage) {
|
|
1093
|
-
|
|
1093
|
+
chunkN5U2S3QK_cjs.writeWarning(
|
|
1094
1094
|
"No commits found. Skipping commit message validation.",
|
|
1095
1095
|
workspaceConfig
|
|
1096
1096
|
);
|
|
@@ -1104,7 +1104,7 @@ async function runCommitLint(workspaceConfig, options) {
|
|
|
1104
1104
|
let commitlintRegex;
|
|
1105
1105
|
const allowedTypes = commitlintConfig.rules["type-enum"] ?? COMMIT_TYPES;
|
|
1106
1106
|
let allowedScopes = [];
|
|
1107
|
-
if (commitlintConfig.rules["scope-empty"] && commitlintConfig.rules["scope-empty"][0] !== 0 /* Disabled */) {
|
|
1107
|
+
if (workspaceConfig.variant !== "minimal" && commitlintConfig.rules["scope-empty"] && commitlintConfig.rules["scope-empty"][0] !== 0 /* Disabled */) {
|
|
1108
1108
|
allowedScopes = await getNxScopes({
|
|
1109
1109
|
config: workspaceConfig
|
|
1110
1110
|
});
|
|
@@ -1122,7 +1122,7 @@ async function runCommitLint(workspaceConfig, options) {
|
|
|
1122
1122
|
parserOpts: createParserOpts(workspaceConfig.variant)
|
|
1123
1123
|
});
|
|
1124
1124
|
if (!commitlintRegex.test(commitMessage) || report.errors.length || report.warnings.length) {
|
|
1125
|
-
|
|
1125
|
+
chunkN5U2S3QK_cjs.writeSuccess(
|
|
1126
1126
|
`Commit was processing completed successfully!`,
|
|
1127
1127
|
workspaceConfig
|
|
1128
1128
|
);
|
|
@@ -1194,16 +1194,16 @@ function resolveMonorepoCommitOptions(workspaceConfig, config5 = monorepo_defaul
|
|
|
1194
1194
|
}
|
|
1195
1195
|
};
|
|
1196
1196
|
}
|
|
1197
|
-
var jiti2 = jiti$1.createJiti(
|
|
1197
|
+
var jiti2 = jiti$1.createJiti(chunkN5U2S3QK_cjs.importMetaUrl, { importMeta: ({ url: (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('git.cjs', document.baseURI).href)) }) });
|
|
1198
1198
|
async function resolveCommitConfig(workspaceConfig, configPath) {
|
|
1199
1199
|
if (configPath && configPath !== "@storm-software/git-tools/commit/minimal" && configPath !== "@storm-software/git-tools/commit/monorepo") {
|
|
1200
|
-
|
|
1200
|
+
chunkN5U2S3QK_cjs.writeInfo(
|
|
1201
1201
|
`Using custom commit config file: ${configPath}`,
|
|
1202
1202
|
workspaceConfig
|
|
1203
1203
|
);
|
|
1204
1204
|
} else {
|
|
1205
1205
|
configPath = workspaceConfig?.variant === "minimal" ? "@storm-software/git-tools/commit/minimal" : "@storm-software/git-tools/commit/monorepo";
|
|
1206
|
-
|
|
1206
|
+
chunkN5U2S3QK_cjs.writeInfo(
|
|
1207
1207
|
`Using standard commit config file: ${configPath}`,
|
|
1208
1208
|
workspaceConfig
|
|
1209
1209
|
);
|
|
@@ -1303,7 +1303,7 @@ async function createState(workspaceConfig, configPath) {
|
|
|
1303
1303
|
const project = projectConfigurations.projects[scope];
|
|
1304
1304
|
if (project) {
|
|
1305
1305
|
let description = `${project.name} - ${project.root}`;
|
|
1306
|
-
const packageJsonPath =
|
|
1306
|
+
const packageJsonPath = chunkN5U2S3QK_cjs.joinPaths(project.root, "package.json");
|
|
1307
1307
|
if (fs$1.existsSync(packageJsonPath)) {
|
|
1308
1308
|
const packageJsonFile = await fs.readFile(packageJsonPath, "utf8");
|
|
1309
1309
|
const packageJson = JSON.parse(packageJsonFile);
|
|
@@ -1329,7 +1329,7 @@ async function createState(workspaceConfig, configPath) {
|
|
|
1329
1329
|
return state;
|
|
1330
1330
|
}
|
|
1331
1331
|
var MAX_LINE_WIDTH = 72;
|
|
1332
|
-
var formatCommitMessage = (state) => {
|
|
1332
|
+
var formatCommitMessage = (state, workspaceConfig) => {
|
|
1333
1333
|
const { config: config5, answers } = state;
|
|
1334
1334
|
const wrapOptions = {
|
|
1335
1335
|
indent: "",
|
|
@@ -1339,17 +1339,17 @@ var formatCommitMessage = (state) => {
|
|
|
1339
1339
|
if (typeof answers.type !== "string") {
|
|
1340
1340
|
throw new Error("Invalid commit type.");
|
|
1341
1341
|
}
|
|
1342
|
-
if (typeof answers.scope !== "string") {
|
|
1343
|
-
throw new Error("Invalid commit scope.");
|
|
1344
|
-
}
|
|
1345
1342
|
if (typeof answers.subject !== "string") {
|
|
1346
1343
|
throw new Error("Invalid subject type.");
|
|
1347
1344
|
}
|
|
1345
|
+
if (workspaceConfig.variant !== "minimal" && typeof answers.scope !== "string") {
|
|
1346
|
+
throw new Error("Invalid commit scope.");
|
|
1347
|
+
}
|
|
1348
1348
|
const emoji = answers.type?.[answers.type]?.emoji ? answers.type[answers.type].emoji : "";
|
|
1349
|
-
const scope = answers.scope ? answers.scope.trim() : "";
|
|
1349
|
+
const scope = workspaceConfig.variant !== "minimal" && typeof answers.scope === "string" && answers.scope ? answers.scope.trim() : "";
|
|
1350
1350
|
const subject = answers.subject?.trim();
|
|
1351
1351
|
const type = answers.type;
|
|
1352
|
-
const format2 = config5.prompt.settings.format || "{type}({scope}): {emoji}{subject}";
|
|
1352
|
+
const format2 = config5.prompt.settings.format || (workspaceConfig.variant !== "minimal" ? "{type}({scope}): {emoji}{subject}" : "{type}: {emoji}{subject}");
|
|
1353
1353
|
const body = answers.body && typeof answers.body === "string" ? wrap__default.default(answers.body || "", wrapOptions) : "";
|
|
1354
1354
|
const breaking = answers.breakingBody && typeof answers.breakingBody === "string" ? wrap__default.default(answers.breakingBody || "", wrapOptions) : "";
|
|
1355
1355
|
const issues = answers.issuesBody && typeof answers.issuesBody === "string" ? wrap__default.default(answers.issuesBody || "", wrapOptions) : "";
|
|
@@ -1380,10 +1380,10 @@ ${closedIssueEmoji}${config5.prompt.settings.closedIssueMessage}${issues}`;
|
|
|
1380
1380
|
|
|
1381
1381
|
// src/commit/run.ts
|
|
1382
1382
|
async function runCommit(commitizenFile, dryRun = false) {
|
|
1383
|
-
const workspaceConfig = await
|
|
1383
|
+
const workspaceConfig = await chunkN5U2S3QK_cjs.getWorkspaceConfig();
|
|
1384
1384
|
const state = await createState(workspaceConfig, commitizenFile);
|
|
1385
1385
|
if (dryRun) {
|
|
1386
|
-
|
|
1386
|
+
chunkN5U2S3QK_cjs.writeInfo("Running in dry mode.", workspaceConfig);
|
|
1387
1387
|
}
|
|
1388
1388
|
console.log(chalkTemplate__default.default`
|
|
1389
1389
|
{bold.#999999 ----------------------------------------}
|
|
@@ -1392,8 +1392,8 @@ async function runCommit(commitizenFile, dryRun = false) {
|
|
|
1392
1392
|
{#CCCCCC Please provide the requested details below...}
|
|
1393
1393
|
`);
|
|
1394
1394
|
state.answers = await askQuestions(state);
|
|
1395
|
-
const message = formatCommitMessage(state);
|
|
1396
|
-
const commitMsgFile =
|
|
1395
|
+
const message = formatCommitMessage(state, workspaceConfig);
|
|
1396
|
+
const commitMsgFile = chunkN5U2S3QK_cjs.joinPaths(getGitDir(), "COMMIT_EDITMSG");
|
|
1397
1397
|
console.log(chalkTemplate__default.default`
|
|
1398
1398
|
{bold.#999999 ----------------------------------------}
|
|
1399
1399
|
|
|
@@ -1406,11 +1406,11 @@ async function runCommit(commitizenFile, dryRun = false) {
|
|
|
1406
1406
|
commandItems.push(...["--file", commitMsgFile]);
|
|
1407
1407
|
const command = shellescape__default.default(commandItems);
|
|
1408
1408
|
if (dryRun) {
|
|
1409
|
-
|
|
1409
|
+
chunkN5U2S3QK_cjs.writeDebug(
|
|
1410
1410
|
`Skipping execution [dry-run]: ${command.replace(commitMsgFile, ".git/COMMIT_EDITMSG")}`,
|
|
1411
1411
|
workspaceConfig
|
|
1412
1412
|
);
|
|
1413
|
-
|
|
1413
|
+
chunkN5U2S3QK_cjs.writeDebug(`Message [dry-run]: ${message}`, workspaceConfig);
|
|
1414
1414
|
} else {
|
|
1415
1415
|
await fs__default.default.writeFile(commitMsgFile, message);
|
|
1416
1416
|
chunkCIJVSMK2_cjs.run(workspaceConfig, command);
|
|
@@ -2442,7 +2442,7 @@ async function generateChangelogContent(releaseVersion, filepath, newContent, cu
|
|
|
2442
2442
|
const header = await prettier.format(
|
|
2443
2443
|
` : void 0 : workspaceConfig?.release.banner.alt) || "Branded release banner image"}](${bannerUrl || chunkN5U2S3QK_cjs.STORM_DEFAULT_RELEASE_BANNER})
|
|
2446
2446
|
|
|
2447
2447
|
# Changelog ${project || workspaceConfig?.name ? "for" : ""}${workspaceConfig?.name ? ` ${titleCase(workspaceConfig.name)}` : ""}${project ? `${workspaceConfig?.name ? " -" : ""} ${titleCase(project)}` : ""}
|
|
2448
2448
|
|
|
@@ -2491,7 +2491,7 @@ function parseChangelogMarkdown(contents) {
|
|
|
2491
2491
|
"^#+\\s*\\[?(\\d+\\.\\d+\\.\\d+(?:-[a-zA-Z0-9\\.]+)?)\\]?",
|
|
2492
2492
|
"gm"
|
|
2493
2493
|
);
|
|
2494
|
-
const headings = [...contents.matchAll(CHANGELOG_RELEASE_HEAD_RE)];
|
|
2494
|
+
const headings = contents ? [...contents.matchAll(CHANGELOG_RELEASE_HEAD_RE)] : [];
|
|
2495
2495
|
const releases = [];
|
|
2496
2496
|
for (let i = 0; i < headings.length; i++) {
|
|
2497
2497
|
const heading = headings[i];
|
|
@@ -2681,7 +2681,7 @@ var StormChangelogRenderer = class extends DefaultChangelogRenderer__default.def
|
|
|
2681
2681
|
};
|
|
2682
2682
|
}
|
|
2683
2683
|
async render() {
|
|
2684
|
-
this.workspaceConfig = await
|
|
2684
|
+
this.workspaceConfig = await chunkN5U2S3QK_cjs.getWorkspaceConfig();
|
|
2685
2685
|
return await super.render();
|
|
2686
2686
|
}
|
|
2687
2687
|
preprocessChanges() {
|
|
@@ -2799,8 +2799,8 @@ var StormChangelogRenderer = class extends DefaultChangelogRenderer__default.def
|
|
|
2799
2799
|
return;
|
|
2800
2800
|
}
|
|
2801
2801
|
for (const email of meta.email) {
|
|
2802
|
-
if (email
|
|
2803
|
-
const match = email
|
|
2802
|
+
if (email?.endsWith("@users.noreply.github.com")) {
|
|
2803
|
+
const match = email?.match(
|
|
2804
2804
|
/^(\d+\+)?([^@]+)@users\.noreply\.github\.com$/
|
|
2805
2805
|
);
|
|
2806
2806
|
if (match && match[2]) {
|
|
@@ -2874,7 +2874,7 @@ function getGitHubRepoData(remoteName = "origin", createReleaseConfig) {
|
|
|
2874
2874
|
const escapedHostname = hostname.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
2875
2875
|
const regexString = `${escapedHostname}[/:]([\\w.-]+/[\\w.-]+)(\\.git)?`;
|
|
2876
2876
|
const regex = new RegExp(regexString);
|
|
2877
|
-
const match = remoteUrl
|
|
2877
|
+
const match = remoteUrl?.match(regex);
|
|
2878
2878
|
if (match && match[1]) {
|
|
2879
2879
|
return {
|
|
2880
2880
|
hostname,
|
|
@@ -2992,7 +2992,7 @@ async function createOrUpdateGithubReleaseInternal(githubRequestConfig, release,
|
|
|
2992
2992
|
if (!shouldContinueInGitHub) {
|
|
2993
2993
|
return;
|
|
2994
2994
|
}
|
|
2995
|
-
const open =
|
|
2995
|
+
const open = chunkN5U2S3QK_cjs.__require("open");
|
|
2996
2996
|
await open(result.url).then(() => {
|
|
2997
2997
|
console.info(
|
|
2998
2998
|
`
|
|
@@ -3218,7 +3218,7 @@ async function isUserAnOrganizationMember(userId, config5, remoteName = "origin"
|
|
|
3218
3218
|
// src/release/changelog.ts
|
|
3219
3219
|
function createAPI(overrideReleaseConfig) {
|
|
3220
3220
|
return async function releaseChangelog(args) {
|
|
3221
|
-
const workspaceConfig = await
|
|
3221
|
+
const workspaceConfig = await chunkN5U2S3QK_cjs.getWorkspaceConfig();
|
|
3222
3222
|
const projectGraph$1 = await projectGraph.createProjectGraphAsync({ exitOnError: true });
|
|
3223
3223
|
const nxJson$1 = nxJson.readNxJson();
|
|
3224
3224
|
const userProvidedReleaseConfig = deepMergeJson.deepMergeJson(
|
|
@@ -3879,7 +3879,7 @@ async function applyChangesAndExit(args, nxReleaseConfig, tree, toSHA, postGitTa
|
|
|
3879
3879
|
});
|
|
3880
3880
|
latestCommit = await git.getCommitHash("HEAD");
|
|
3881
3881
|
} else if ((args.stageChanges ?? nxReleaseConfig.changelog?.git.stageChanges) && changes.length) {
|
|
3882
|
-
|
|
3882
|
+
chunkN5U2S3QK_cjs.writeDebug(`Staging changed files with git`);
|
|
3883
3883
|
await git.gitAdd({
|
|
3884
3884
|
changedFiles,
|
|
3885
3885
|
deletedFiles,
|
|
@@ -3888,7 +3888,7 @@ async function applyChangesAndExit(args, nxReleaseConfig, tree, toSHA, postGitTa
|
|
|
3888
3888
|
});
|
|
3889
3889
|
}
|
|
3890
3890
|
if (args.gitTag ?? nxReleaseConfig.changelog?.git.tag) {
|
|
3891
|
-
|
|
3891
|
+
chunkN5U2S3QK_cjs.writeDebug(`Tagging commit with git`);
|
|
3892
3892
|
for (const tag of gitTagValues) {
|
|
3893
3893
|
await gitTag({
|
|
3894
3894
|
tag,
|
|
@@ -3900,7 +3900,7 @@ async function applyChangesAndExit(args, nxReleaseConfig, tree, toSHA, postGitTa
|
|
|
3900
3900
|
}
|
|
3901
3901
|
}
|
|
3902
3902
|
if (args.gitPush ?? nxReleaseConfig.changelog?.git.push) {
|
|
3903
|
-
|
|
3903
|
+
chunkN5U2S3QK_cjs.writeDebug(`Pushing to git remote "${args.gitRemote}"`);
|
|
3904
3904
|
await git.gitPush({
|
|
3905
3905
|
gitRemote: args.gitRemote,
|
|
3906
3906
|
dryRun: args.dryRun,
|
|
@@ -3919,7 +3919,7 @@ async function generateChangelogForWorkspace({
|
|
|
3919
3919
|
workspaceChangelogVersion,
|
|
3920
3920
|
changes
|
|
3921
3921
|
}) {
|
|
3922
|
-
const workspaceConfig = await
|
|
3922
|
+
const workspaceConfig = await chunkN5U2S3QK_cjs.getWorkspaceConfig();
|
|
3923
3923
|
if (!workspaceConfig) {
|
|
3924
3924
|
throw new Error(
|
|
3925
3925
|
`Unable to determine the Storm workspace config. Please ensure that your storm-workspace.json file is present and valid.`
|
|
@@ -4033,7 +4033,7 @@ async function generateChangelogForProjects({
|
|
|
4033
4033
|
nxReleaseConfig,
|
|
4034
4034
|
projectToAdditionalDependencyBumps
|
|
4035
4035
|
}) {
|
|
4036
|
-
const workspaceConfig = await
|
|
4036
|
+
const workspaceConfig = await chunkN5U2S3QK_cjs.getWorkspaceConfig();
|
|
4037
4037
|
if (!workspaceConfig) {
|
|
4038
4038
|
throw new Error(
|
|
4039
4039
|
`Unable to determine the Storm workspace config. Please ensure that your storm-workspace.json file is present and valid.`
|
|
@@ -4338,7 +4338,7 @@ var runRelease = async (config5, options) => {
|
|
|
4338
4338
|
throw new Error("The `GITHUB_ACTOR` environment variable is not set.");
|
|
4339
4339
|
}
|
|
4340
4340
|
if (!await isUserAnOrganizationMember(process.env.GITHUB_ACTOR, config5)) {
|
|
4341
|
-
|
|
4341
|
+
chunkN5U2S3QK_cjs.writeFatal(
|
|
4342
4342
|
"You must be a member of the Storm Software organization to run the release process.",
|
|
4343
4343
|
config5
|
|
4344
4344
|
);
|
|
@@ -4355,12 +4355,12 @@ var runRelease = async (config5, options) => {
|
|
|
4355
4355
|
process.env.NODE_AUTH_TOKEN = process.env.NPM_TOKEN;
|
|
4356
4356
|
process.env.NPM_AUTH_TOKEN = process.env.NPM_TOKEN;
|
|
4357
4357
|
process.env.NPM_CONFIG_PROVENANCE = "true";
|
|
4358
|
-
|
|
4358
|
+
chunkN5U2S3QK_cjs.writeDebug("Creating workspace Project Graph data...", config5);
|
|
4359
4359
|
const nxJson = nxJson_js.readNxJson();
|
|
4360
|
-
|
|
4360
|
+
chunkN5U2S3QK_cjs.writeDebug("Reading in the workspaces release configuration", config5);
|
|
4361
4361
|
const to = options.head || process.env.NX_HEAD;
|
|
4362
4362
|
const from = options.base || process.env.NX_BASE;
|
|
4363
|
-
|
|
4363
|
+
chunkN5U2S3QK_cjs.writeDebug(
|
|
4364
4364
|
`Using the following Git SHAs to determine the release content:
|
|
4365
4365
|
- From: ${from}
|
|
4366
4366
|
- To: ${to}
|
|
@@ -4371,28 +4371,28 @@ var runRelease = async (config5, options) => {
|
|
|
4371
4371
|
nxJson.release.groups = Object.keys(nxJson.release.groups).reduce(
|
|
4372
4372
|
(ret, groupName) => {
|
|
4373
4373
|
const groupConfig = nxJson.release?.groups?.[groupName];
|
|
4374
|
-
ret[groupName] =
|
|
4374
|
+
ret[groupName] = chunkN5U2S3QK_cjs.defu(groupConfig, DEFAULT_RELEASE_GROUP_CONFIG);
|
|
4375
4375
|
return ret;
|
|
4376
4376
|
},
|
|
4377
4377
|
{}
|
|
4378
4378
|
);
|
|
4379
4379
|
}
|
|
4380
|
-
const nxReleaseConfig =
|
|
4380
|
+
const nxReleaseConfig = chunkN5U2S3QK_cjs.defu(
|
|
4381
4381
|
nxJson.release,
|
|
4382
4382
|
DEFAULT_RELEASE_CONFIG
|
|
4383
4383
|
);
|
|
4384
|
-
|
|
4384
|
+
chunkN5U2S3QK_cjs.writeInfo(
|
|
4385
4385
|
"Using the following `nx.json` release configuration values",
|
|
4386
4386
|
config5
|
|
4387
4387
|
);
|
|
4388
|
-
|
|
4388
|
+
chunkN5U2S3QK_cjs.writeInfo(nxReleaseConfig, config5);
|
|
4389
4389
|
const releaseVersion = version_js.createAPI(nxReleaseConfig);
|
|
4390
4390
|
const releaseChangelog = createAPI(nxReleaseConfig);
|
|
4391
4391
|
const releasePublish = publish_js.createAPI(nxReleaseConfig);
|
|
4392
|
-
|
|
4392
|
+
chunkN5U2S3QK_cjs.writeDebug("Determining the current release versions...", config5);
|
|
4393
4393
|
const { workspaceVersion, projectsVersionData } = await releaseVersion({
|
|
4394
4394
|
dryRun: false,
|
|
4395
|
-
verbose:
|
|
4395
|
+
verbose: chunkN5U2S3QK_cjs.isVerbose(config5.logLevel),
|
|
4396
4396
|
preid: config5.preid,
|
|
4397
4397
|
deleteVersionPlans: false,
|
|
4398
4398
|
stageChanges: true,
|
|
@@ -4403,15 +4403,15 @@ var runRelease = async (config5, options) => {
|
|
|
4403
4403
|
version: nxReleaseConfig?.projectsRelationship !== "fixed" ? void 0 : workspaceVersion,
|
|
4404
4404
|
versionData: projectsVersionData,
|
|
4405
4405
|
dryRun: false,
|
|
4406
|
-
verbose:
|
|
4406
|
+
verbose: chunkN5U2S3QK_cjs.isVerbose(config5.logLevel),
|
|
4407
4407
|
to,
|
|
4408
4408
|
from,
|
|
4409
4409
|
gitCommit: true,
|
|
4410
4410
|
gitCommitMessage: "release(monorepo): Publish workspace release updates"
|
|
4411
4411
|
});
|
|
4412
|
-
|
|
4412
|
+
chunkN5U2S3QK_cjs.writeDebug("Tagging commit with git", config5);
|
|
4413
4413
|
if (options.skipPublish) {
|
|
4414
|
-
|
|
4414
|
+
chunkN5U2S3QK_cjs.writeWarning(
|
|
4415
4415
|
"Skipping publishing packages since `skipPublish` was provided as `true` in the release options.",
|
|
4416
4416
|
config5
|
|
4417
4417
|
);
|
|
@@ -4420,7 +4420,7 @@ var runRelease = async (config5, options) => {
|
|
|
4420
4420
|
(key) => projectsVersionData[key]?.newVersion
|
|
4421
4421
|
);
|
|
4422
4422
|
if (changedProjects.length > 0) {
|
|
4423
|
-
|
|
4423
|
+
chunkN5U2S3QK_cjs.writeInfo(
|
|
4424
4424
|
`Publishing release for ${changedProjects.length} ${changedProjects.length === 1 ? "project" : "projects"}:
|
|
4425
4425
|
${changedProjects.map((changedProject) => ` - ${changedProject}`).join("\n")}
|
|
4426
4426
|
`,
|
|
@@ -4430,7 +4430,7 @@ ${changedProjects.map((changedProject) => ` - ${changedProject}`).join("\n")}
|
|
|
4430
4430
|
const result = await releasePublish({
|
|
4431
4431
|
...options,
|
|
4432
4432
|
dryRun: !!options.dryRun,
|
|
4433
|
-
verbose:
|
|
4433
|
+
verbose: chunkN5U2S3QK_cjs.isVerbose(config5.logLevel)
|
|
4434
4434
|
});
|
|
4435
4435
|
const failedProjects = Object.keys(result).filter(
|
|
4436
4436
|
(key) => result[key]?.code && result[key]?.code > 0
|
|
@@ -4445,10 +4445,10 @@ ${failedProjects.map((failedProject) => ` - ${failedProject} (Error Code: ${res
|
|
|
4445
4445
|
);
|
|
4446
4446
|
}
|
|
4447
4447
|
} else {
|
|
4448
|
-
|
|
4448
|
+
chunkN5U2S3QK_cjs.writeWarning("Skipped publishing packages.", config5);
|
|
4449
4449
|
}
|
|
4450
4450
|
}
|
|
4451
|
-
|
|
4451
|
+
chunkN5U2S3QK_cjs.writeSuccess("Completed the Storm workspace release process!", config5);
|
|
4452
4452
|
};
|
|
4453
4453
|
async function updatePackageManifests(projectsVersionData, config5) {
|
|
4454
4454
|
let projectGraph;
|
|
@@ -4463,7 +4463,7 @@ async function updatePackageManifests(projectsVersionData, config5) {
|
|
|
4463
4463
|
Object.keys(projectsVersionData).map(async (node) => {
|
|
4464
4464
|
const projectNode = projectGraph.nodes[node];
|
|
4465
4465
|
if (!projectNode?.data.root) {
|
|
4466
|
-
|
|
4466
|
+
chunkN5U2S3QK_cjs.writeWarning(
|
|
4467
4467
|
`Project node ${node} not found in the project graph. Skipping manifest update.`,
|
|
4468
4468
|
config5
|
|
4469
4469
|
);
|
|
@@ -4471,17 +4471,17 @@ async function updatePackageManifests(projectsVersionData, config5) {
|
|
|
4471
4471
|
}
|
|
4472
4472
|
const versionData = projectsVersionData[node];
|
|
4473
4473
|
if (projectNode?.data.root && versionData && versionData.newVersion !== null) {
|
|
4474
|
-
|
|
4474
|
+
chunkN5U2S3QK_cjs.writeTrace(
|
|
4475
4475
|
`Writing version ${versionData.newVersion} update to manifest file for ${node}
|
|
4476
4476
|
`,
|
|
4477
4477
|
config5
|
|
4478
4478
|
);
|
|
4479
|
-
const projectRoot =
|
|
4479
|
+
const projectRoot = chunkN5U2S3QK_cjs.joinPaths(
|
|
4480
4480
|
config5.workspaceRoot,
|
|
4481
4481
|
projectNode.data.root
|
|
4482
4482
|
);
|
|
4483
|
-
const packageJsonPath =
|
|
4484
|
-
const cargoTomlPath =
|
|
4483
|
+
const packageJsonPath = chunkN5U2S3QK_cjs.joinPaths(projectRoot, "package.json");
|
|
4484
|
+
const cargoTomlPath = chunkN5U2S3QK_cjs.joinPaths(projectRoot, "Cargo.toml");
|
|
4485
4485
|
if (fs$1.existsSync(packageJsonPath)) {
|
|
4486
4486
|
const packageJsonContent = await fs.readFile(packageJsonPath, "utf8");
|
|
4487
4487
|
const packageJson = JSON.parse(packageJsonContent);
|
|
@@ -4499,7 +4499,7 @@ async function updatePackageManifests(projectsVersionData, config5) {
|
|
|
4499
4499
|
})
|
|
4500
4500
|
);
|
|
4501
4501
|
} else {
|
|
4502
|
-
|
|
4502
|
+
chunkN5U2S3QK_cjs.writeWarning("No project nodes found. Skipping manifest updates.", config5);
|
|
4503
4503
|
}
|
|
4504
4504
|
}
|
|
4505
4505
|
|
|
@@ -4507,8 +4507,8 @@ async function updatePackageManifests(projectsVersionData, config5) {
|
|
|
4507
4507
|
var _config = {};
|
|
4508
4508
|
function createProgram(config5) {
|
|
4509
4509
|
_config = config5;
|
|
4510
|
-
|
|
4511
|
-
const root =
|
|
4510
|
+
chunkN5U2S3QK_cjs.writeInfo("\u26A1 Running Storm Git Tools", config5);
|
|
4511
|
+
const root = chunkN5U2S3QK_cjs.findWorkspaceRootSafe(process.cwd());
|
|
4512
4512
|
process.env.STORM_WORKSPACE_ROOT ??= root;
|
|
4513
4513
|
process.env.NX_WORKSPACE_ROOT_PATH ??= root;
|
|
4514
4514
|
if (root) {
|
|
@@ -4577,12 +4577,12 @@ async function commitAction({
|
|
|
4577
4577
|
dryRun = false
|
|
4578
4578
|
}) {
|
|
4579
4579
|
try {
|
|
4580
|
-
|
|
4580
|
+
chunkN5U2S3QK_cjs.writeInfo(
|
|
4581
4581
|
`\u26A1 Preparing to commit your changes. Please provide the requested details below...`,
|
|
4582
4582
|
_config
|
|
4583
4583
|
);
|
|
4584
4584
|
await runCommit(config5, dryRun);
|
|
4585
|
-
|
|
4585
|
+
chunkN5U2S3QK_cjs.writeSuccess(
|
|
4586
4586
|
`\u{1F389} Storm Commit processing completed successfully!
|
|
4587
4587
|
|
|
4588
4588
|
Note: Please run "pnpm push" to upload these changes to the remote ${_config.name ? _config.name : _config.namespace ? _config.namespace : _config.organization ? _config.organization : "Storm-Software"} Git repository at ${_config.repository}
|
|
@@ -4590,10 +4590,14 @@ Note: Please run "pnpm push" to upload these changes to the remote ${_config.nam
|
|
|
4590
4590
|
_config
|
|
4591
4591
|
);
|
|
4592
4592
|
} catch (error) {
|
|
4593
|
-
|
|
4593
|
+
chunkN5U2S3QK_cjs.writeFatal(
|
|
4594
4594
|
`A fatal error occurred while running commit action:
|
|
4595
4595
|
|
|
4596
|
-
${error.message}
|
|
4596
|
+
${error.message}${error.stack ? `
|
|
4597
|
+
|
|
4598
|
+
Stacktrace: ${error.stack}` : ""}
|
|
4599
|
+
|
|
4600
|
+
Please fix any errors and try committing again.`,
|
|
4597
4601
|
_config
|
|
4598
4602
|
);
|
|
4599
4603
|
throw new Error(error.message, { cause: error });
|
|
@@ -4601,14 +4605,14 @@ ${error.message}`,
|
|
|
4601
4605
|
}
|
|
4602
4606
|
async function readmeAction(options) {
|
|
4603
4607
|
try {
|
|
4604
|
-
|
|
4608
|
+
chunkN5U2S3QK_cjs.writeInfo("\u26A1 Formatting the workspace's README.md files", _config);
|
|
4605
4609
|
await runReadme(options);
|
|
4606
|
-
|
|
4610
|
+
chunkN5U2S3QK_cjs.writeSuccess(
|
|
4607
4611
|
"Formatting of the workspace's README.md files is complete\n",
|
|
4608
4612
|
_config
|
|
4609
4613
|
);
|
|
4610
4614
|
} catch (error) {
|
|
4611
|
-
|
|
4615
|
+
chunkN5U2S3QK_cjs.writeFatal(
|
|
4612
4616
|
`A fatal error occurred while running README format action:
|
|
4613
4617
|
|
|
4614
4618
|
${error.message}`
|
|
@@ -4623,7 +4627,7 @@ async function releaseAction({
|
|
|
4623
4627
|
dryRun
|
|
4624
4628
|
}) {
|
|
4625
4629
|
try {
|
|
4626
|
-
|
|
4630
|
+
chunkN5U2S3QK_cjs.writeInfo(
|
|
4627
4631
|
"\u26A1 Running the Storm Release and Publish process on the workspace",
|
|
4628
4632
|
_config
|
|
4629
4633
|
);
|
|
@@ -4633,9 +4637,9 @@ async function releaseAction({
|
|
|
4633
4637
|
base,
|
|
4634
4638
|
head
|
|
4635
4639
|
});
|
|
4636
|
-
|
|
4640
|
+
chunkN5U2S3QK_cjs.writeSuccess("Release completed successfully!\n", _config);
|
|
4637
4641
|
} catch (error) {
|
|
4638
|
-
|
|
4642
|
+
chunkN5U2S3QK_cjs.writeFatal(
|
|
4639
4643
|
`A fatal error occurred while running release action:
|
|
4640
4644
|
|
|
4641
4645
|
${error.message} ${error.stack ? `
|
|
@@ -4649,17 +4653,17 @@ Stacktrace: ${error.stack}` : ""}`,
|
|
|
4649
4653
|
}
|
|
4650
4654
|
async function commitLintAction(options) {
|
|
4651
4655
|
try {
|
|
4652
|
-
|
|
4656
|
+
chunkN5U2S3QK_cjs.writeInfo(
|
|
4653
4657
|
`\u26A1 Linting the ${_config.repository ? _config.repository : _config.namespace ? _config.namespace : _config.name ? _config.name : typeof _config.organization === "string" ? _config.organization : _config.organization?.name ? _config.organization?.name : "Storm-Software"} repository's commit messages.`,
|
|
4654
4658
|
_config
|
|
4655
4659
|
);
|
|
4656
4660
|
await runCommitLint(_config, options);
|
|
4657
|
-
|
|
4661
|
+
chunkN5U2S3QK_cjs.writeSuccess(
|
|
4658
4662
|
"Linting the commit messages completed successfully!\n",
|
|
4659
4663
|
_config
|
|
4660
4664
|
);
|
|
4661
4665
|
} catch (error) {
|
|
4662
|
-
|
|
4666
|
+
chunkN5U2S3QK_cjs.writeFatal(
|
|
4663
4667
|
`A fatal error occurred while linting the commit messages:
|
|
4664
4668
|
|
|
4665
4669
|
${error.message}`,
|
|
@@ -4671,18 +4675,18 @@ ${error.message}`,
|
|
|
4671
4675
|
|
|
4672
4676
|
// bin/git.ts
|
|
4673
4677
|
void (async () => {
|
|
4674
|
-
const config5 = await
|
|
4678
|
+
const config5 = await chunkN5U2S3QK_cjs.getConfig();
|
|
4675
4679
|
try {
|
|
4676
|
-
|
|
4680
|
+
chunkN5U2S3QK_cjs.handleProcess(config5);
|
|
4677
4681
|
const program = createProgram(config5);
|
|
4678
4682
|
await program.parseAsync(process.argv);
|
|
4679
|
-
|
|
4683
|
+
chunkN5U2S3QK_cjs.writeSuccess(
|
|
4680
4684
|
`\u{1F389} Git ${process.argv && process.argv.length >= 3 && process.argv[2] ? process.argv[2] : "tool"} processing completed successfully!`,
|
|
4681
4685
|
config5
|
|
4682
4686
|
);
|
|
4683
|
-
|
|
4687
|
+
chunkN5U2S3QK_cjs.exitWithSuccess(config5);
|
|
4684
4688
|
} catch (error) {
|
|
4685
|
-
|
|
4689
|
+
chunkN5U2S3QK_cjs.exitWithError(config5);
|
|
4686
4690
|
process.exit(1);
|
|
4687
4691
|
}
|
|
4688
4692
|
})();
|
package/bin/git.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { run } from './chunk-54Q5U5WW.js';
|
|
3
|
-
import { getConfig, handleProcess, writeSuccess, exitWithSuccess, exitWithError, writeInfo, findWorkspaceRootSafe, writeFatal, getWorkspaceConfig, joinPaths, writeDebug, defu, isVerbose, writeWarning, writeTrace, STORM_DEFAULT_RELEASE_BANNER, __require } from './chunk-
|
|
3
|
+
import { getConfig, handleProcess, writeSuccess, exitWithSuccess, exitWithError, writeInfo, findWorkspaceRootSafe, writeFatal, getWorkspaceConfig, joinPaths, writeDebug, defu, isVerbose, writeWarning, writeTrace, STORM_DEFAULT_RELEASE_BANNER, __require } from './chunk-QBJQH2IK.js';
|
|
4
4
|
import TOML from '@ltd/j-toml';
|
|
5
5
|
import { Command, Option } from 'commander';
|
|
6
6
|
import { select, confirm, input } from '@inquirer/prompts';
|
|
@@ -1086,7 +1086,7 @@ async function runCommitLint(workspaceConfig, options) {
|
|
|
1086
1086
|
let commitlintRegex;
|
|
1087
1087
|
const allowedTypes = commitlintConfig.rules["type-enum"] ?? COMMIT_TYPES;
|
|
1088
1088
|
let allowedScopes = [];
|
|
1089
|
-
if (commitlintConfig.rules["scope-empty"] && commitlintConfig.rules["scope-empty"][0] !== 0 /* Disabled */) {
|
|
1089
|
+
if (workspaceConfig.variant !== "minimal" && commitlintConfig.rules["scope-empty"] && commitlintConfig.rules["scope-empty"][0] !== 0 /* Disabled */) {
|
|
1090
1090
|
allowedScopes = await getNxScopes({
|
|
1091
1091
|
config: workspaceConfig
|
|
1092
1092
|
});
|
|
@@ -1311,7 +1311,7 @@ async function createState(workspaceConfig, configPath) {
|
|
|
1311
1311
|
return state;
|
|
1312
1312
|
}
|
|
1313
1313
|
var MAX_LINE_WIDTH = 72;
|
|
1314
|
-
var formatCommitMessage = (state) => {
|
|
1314
|
+
var formatCommitMessage = (state, workspaceConfig) => {
|
|
1315
1315
|
const { config: config5, answers } = state;
|
|
1316
1316
|
const wrapOptions = {
|
|
1317
1317
|
indent: "",
|
|
@@ -1321,17 +1321,17 @@ var formatCommitMessage = (state) => {
|
|
|
1321
1321
|
if (typeof answers.type !== "string") {
|
|
1322
1322
|
throw new Error("Invalid commit type.");
|
|
1323
1323
|
}
|
|
1324
|
-
if (typeof answers.scope !== "string") {
|
|
1325
|
-
throw new Error("Invalid commit scope.");
|
|
1326
|
-
}
|
|
1327
1324
|
if (typeof answers.subject !== "string") {
|
|
1328
1325
|
throw new Error("Invalid subject type.");
|
|
1329
1326
|
}
|
|
1327
|
+
if (workspaceConfig.variant !== "minimal" && typeof answers.scope !== "string") {
|
|
1328
|
+
throw new Error("Invalid commit scope.");
|
|
1329
|
+
}
|
|
1330
1330
|
const emoji = answers.type?.[answers.type]?.emoji ? answers.type[answers.type].emoji : "";
|
|
1331
|
-
const scope = answers.scope ? answers.scope.trim() : "";
|
|
1331
|
+
const scope = workspaceConfig.variant !== "minimal" && typeof answers.scope === "string" && answers.scope ? answers.scope.trim() : "";
|
|
1332
1332
|
const subject = answers.subject?.trim();
|
|
1333
1333
|
const type = answers.type;
|
|
1334
|
-
const format2 = config5.prompt.settings.format || "{type}({scope}): {emoji}{subject}";
|
|
1334
|
+
const format2 = config5.prompt.settings.format || (workspaceConfig.variant !== "minimal" ? "{type}({scope}): {emoji}{subject}" : "{type}: {emoji}{subject}");
|
|
1335
1335
|
const body = answers.body && typeof answers.body === "string" ? wrap(answers.body || "", wrapOptions) : "";
|
|
1336
1336
|
const breaking = answers.breakingBody && typeof answers.breakingBody === "string" ? wrap(answers.breakingBody || "", wrapOptions) : "";
|
|
1337
1337
|
const issues = answers.issuesBody && typeof answers.issuesBody === "string" ? wrap(answers.issuesBody || "", wrapOptions) : "";
|
|
@@ -1374,7 +1374,7 @@ async function runCommit(commitizenFile, dryRun = false) {
|
|
|
1374
1374
|
{#CCCCCC Please provide the requested details below...}
|
|
1375
1375
|
`);
|
|
1376
1376
|
state.answers = await askQuestions(state);
|
|
1377
|
-
const message = formatCommitMessage(state);
|
|
1377
|
+
const message = formatCommitMessage(state, workspaceConfig);
|
|
1378
1378
|
const commitMsgFile = joinPaths(getGitDir(), "COMMIT_EDITMSG");
|
|
1379
1379
|
console.log(chalkTemplate`
|
|
1380
1380
|
{bold.#999999 ----------------------------------------}
|
|
@@ -2473,7 +2473,7 @@ function parseChangelogMarkdown(contents) {
|
|
|
2473
2473
|
"^#+\\s*\\[?(\\d+\\.\\d+\\.\\d+(?:-[a-zA-Z0-9\\.]+)?)\\]?",
|
|
2474
2474
|
"gm"
|
|
2475
2475
|
);
|
|
2476
|
-
const headings = [...contents.matchAll(CHANGELOG_RELEASE_HEAD_RE)];
|
|
2476
|
+
const headings = contents ? [...contents.matchAll(CHANGELOG_RELEASE_HEAD_RE)] : [];
|
|
2477
2477
|
const releases = [];
|
|
2478
2478
|
for (let i = 0; i < headings.length; i++) {
|
|
2479
2479
|
const heading = headings[i];
|
|
@@ -2781,8 +2781,8 @@ var StormChangelogRenderer = class extends DefaultChangelogRenderer {
|
|
|
2781
2781
|
return;
|
|
2782
2782
|
}
|
|
2783
2783
|
for (const email of meta.email) {
|
|
2784
|
-
if (email
|
|
2785
|
-
const match = email
|
|
2784
|
+
if (email?.endsWith("@users.noreply.github.com")) {
|
|
2785
|
+
const match = email?.match(
|
|
2786
2786
|
/^(\d+\+)?([^@]+)@users\.noreply\.github\.com$/
|
|
2787
2787
|
);
|
|
2788
2788
|
if (match && match[2]) {
|
|
@@ -2856,7 +2856,7 @@ function getGitHubRepoData(remoteName = "origin", createReleaseConfig) {
|
|
|
2856
2856
|
const escapedHostname = hostname.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
2857
2857
|
const regexString = `${escapedHostname}[/:]([\\w.-]+/[\\w.-]+)(\\.git)?`;
|
|
2858
2858
|
const regex = new RegExp(regexString);
|
|
2859
|
-
const match = remoteUrl
|
|
2859
|
+
const match = remoteUrl?.match(regex);
|
|
2860
2860
|
if (match && match[1]) {
|
|
2861
2861
|
return {
|
|
2862
2862
|
hostname,
|
|
@@ -4575,7 +4575,11 @@ Note: Please run "pnpm push" to upload these changes to the remote ${_config.nam
|
|
|
4575
4575
|
writeFatal(
|
|
4576
4576
|
`A fatal error occurred while running commit action:
|
|
4577
4577
|
|
|
4578
|
-
${error.message}
|
|
4578
|
+
${error.message}${error.stack ? `
|
|
4579
|
+
|
|
4580
|
+
Stacktrace: ${error.stack}` : ""}
|
|
4581
|
+
|
|
4582
|
+
Please fix any errors and try committing again.`,
|
|
4579
4583
|
_config
|
|
4580
4584
|
);
|
|
4581
4585
|
throw new Error(error.message, { cause: error });
|
package/bin/post-checkout.cjs
CHANGED
|
@@ -3,33 +3,33 @@
|
|
|
3
3
|
|
|
4
4
|
var chunkSWXHQXUT_cjs = require('./chunk-SWXHQXUT.cjs');
|
|
5
5
|
var chunkCIJVSMK2_cjs = require('./chunk-CIJVSMK2.cjs');
|
|
6
|
-
var
|
|
6
|
+
var chunkN5U2S3QK_cjs = require('./chunk-N5U2S3QK.cjs');
|
|
7
7
|
|
|
8
8
|
// bin/post-checkout.ts
|
|
9
9
|
void (async () => {
|
|
10
|
-
const config = await
|
|
10
|
+
const config = await chunkN5U2S3QK_cjs.getConfig();
|
|
11
11
|
try {
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
chunkN5U2S3QK_cjs.handleProcess(config);
|
|
13
|
+
chunkN5U2S3QK_cjs.writeInfo("Running post-checkout hook...", config);
|
|
14
14
|
chunkSWXHQXUT_cjs.checkPackageVersion(process.argv?.slice(1));
|
|
15
15
|
try {
|
|
16
16
|
chunkCIJVSMK2_cjs.run(config, "git-lfs version");
|
|
17
17
|
} catch (error) {
|
|
18
|
-
|
|
18
|
+
chunkN5U2S3QK_cjs.writeError(
|
|
19
19
|
`This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-checkout.
|
|
20
20
|
Error: ${error?.message}`,
|
|
21
21
|
config
|
|
22
22
|
);
|
|
23
|
-
|
|
23
|
+
chunkN5U2S3QK_cjs.exitWithError(config);
|
|
24
24
|
}
|
|
25
25
|
chunkCIJVSMK2_cjs.run(config, "git lfs post-checkout");
|
|
26
|
-
|
|
26
|
+
chunkN5U2S3QK_cjs.exitWithSuccess(config);
|
|
27
27
|
} catch (error) {
|
|
28
|
-
|
|
28
|
+
chunkN5U2S3QK_cjs.writeFatal(
|
|
29
29
|
`A fatal error occurred while running the program: ${error.message}`,
|
|
30
30
|
config
|
|
31
31
|
);
|
|
32
|
-
|
|
32
|
+
chunkN5U2S3QK_cjs.exitWithError(config);
|
|
33
33
|
process.exit(1);
|
|
34
34
|
}
|
|
35
35
|
})();
|
package/bin/post-checkout.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { checkPackageVersion } from './chunk-AMSZ7DVW.js';
|
|
3
3
|
import { run } from './chunk-54Q5U5WW.js';
|
|
4
|
-
import { getConfig, handleProcess, writeInfo, writeError, exitWithError, exitWithSuccess, writeFatal } from './chunk-
|
|
4
|
+
import { getConfig, handleProcess, writeInfo, writeError, exitWithError, exitWithSuccess, writeFatal } from './chunk-QBJQH2IK.js';
|
|
5
5
|
|
|
6
6
|
// bin/post-checkout.ts
|
|
7
7
|
void (async () => {
|
package/bin/post-commit.cjs
CHANGED
|
@@ -3,33 +3,33 @@
|
|
|
3
3
|
|
|
4
4
|
var chunkSWXHQXUT_cjs = require('./chunk-SWXHQXUT.cjs');
|
|
5
5
|
var chunkCIJVSMK2_cjs = require('./chunk-CIJVSMK2.cjs');
|
|
6
|
-
var
|
|
6
|
+
var chunkN5U2S3QK_cjs = require('./chunk-N5U2S3QK.cjs');
|
|
7
7
|
|
|
8
8
|
// bin/post-commit.ts
|
|
9
9
|
void (async () => {
|
|
10
|
-
const config = await
|
|
10
|
+
const config = await chunkN5U2S3QK_cjs.getConfig();
|
|
11
11
|
try {
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
chunkN5U2S3QK_cjs.handleProcess(config);
|
|
13
|
+
chunkN5U2S3QK_cjs.writeInfo("Running post-commit hook...", config);
|
|
14
14
|
chunkSWXHQXUT_cjs.checkPackageVersion(process.argv?.slice(1));
|
|
15
15
|
try {
|
|
16
16
|
chunkCIJVSMK2_cjs.run(config, "git-lfs version");
|
|
17
17
|
} catch (error) {
|
|
18
|
-
|
|
18
|
+
chunkN5U2S3QK_cjs.writeError(
|
|
19
19
|
`This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-commit.
|
|
20
20
|
Error: ${error?.message}`,
|
|
21
21
|
config
|
|
22
22
|
);
|
|
23
|
-
|
|
23
|
+
chunkN5U2S3QK_cjs.exitWithError(config);
|
|
24
24
|
}
|
|
25
25
|
chunkCIJVSMK2_cjs.run(config, "git lfs post-commit");
|
|
26
|
-
|
|
26
|
+
chunkN5U2S3QK_cjs.exitWithSuccess(config);
|
|
27
27
|
} catch (error) {
|
|
28
|
-
|
|
28
|
+
chunkN5U2S3QK_cjs.writeFatal(
|
|
29
29
|
`A fatal error occurred while running the program: ${error.message}`,
|
|
30
30
|
config
|
|
31
31
|
);
|
|
32
|
-
|
|
32
|
+
chunkN5U2S3QK_cjs.exitWithError(config);
|
|
33
33
|
process.exit(1);
|
|
34
34
|
}
|
|
35
35
|
})();
|
package/bin/post-commit.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { checkPackageVersion } from './chunk-AMSZ7DVW.js';
|
|
3
3
|
import { run } from './chunk-54Q5U5WW.js';
|
|
4
|
-
import { getConfig, handleProcess, writeInfo, writeError, exitWithError, exitWithSuccess, writeFatal } from './chunk-
|
|
4
|
+
import { getConfig, handleProcess, writeInfo, writeError, exitWithError, exitWithSuccess, writeFatal } from './chunk-QBJQH2IK.js';
|
|
5
5
|
|
|
6
6
|
// bin/post-commit.ts
|
|
7
7
|
void (async () => {
|
package/bin/post-merge.cjs
CHANGED
|
@@ -3,33 +3,33 @@
|
|
|
3
3
|
|
|
4
4
|
var chunkSWXHQXUT_cjs = require('./chunk-SWXHQXUT.cjs');
|
|
5
5
|
var chunkCIJVSMK2_cjs = require('./chunk-CIJVSMK2.cjs');
|
|
6
|
-
var
|
|
6
|
+
var chunkN5U2S3QK_cjs = require('./chunk-N5U2S3QK.cjs');
|
|
7
7
|
|
|
8
8
|
// bin/post-merge.ts
|
|
9
9
|
void (async () => {
|
|
10
|
-
const config = await
|
|
10
|
+
const config = await chunkN5U2S3QK_cjs.getConfig();
|
|
11
11
|
try {
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
chunkN5U2S3QK_cjs.handleProcess(config);
|
|
13
|
+
chunkN5U2S3QK_cjs.writeInfo("Running post-merge hook...", config);
|
|
14
14
|
chunkSWXHQXUT_cjs.checkPackageVersion(process.argv?.slice(1));
|
|
15
15
|
try {
|
|
16
16
|
chunkCIJVSMK2_cjs.run(config, "git-lfs version");
|
|
17
17
|
} catch (error) {
|
|
18
|
-
|
|
18
|
+
chunkN5U2S3QK_cjs.writeError(
|
|
19
19
|
`This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-merge.
|
|
20
20
|
Error: ${error?.message}`,
|
|
21
21
|
config
|
|
22
22
|
);
|
|
23
|
-
|
|
23
|
+
chunkN5U2S3QK_cjs.exitWithError(config);
|
|
24
24
|
}
|
|
25
25
|
chunkCIJVSMK2_cjs.run(config, "git lfs post-merge");
|
|
26
|
-
|
|
26
|
+
chunkN5U2S3QK_cjs.exitWithSuccess(config);
|
|
27
27
|
} catch (error) {
|
|
28
|
-
|
|
28
|
+
chunkN5U2S3QK_cjs.writeFatal(
|
|
29
29
|
`A fatal error occurred while running the program: ${error.message}`,
|
|
30
30
|
config
|
|
31
31
|
);
|
|
32
|
-
|
|
32
|
+
chunkN5U2S3QK_cjs.exitWithError(config);
|
|
33
33
|
process.exit(1);
|
|
34
34
|
}
|
|
35
35
|
})();
|
package/bin/post-merge.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { checkPackageVersion } from './chunk-AMSZ7DVW.js';
|
|
3
3
|
import { run } from './chunk-54Q5U5WW.js';
|
|
4
|
-
import { getConfig, handleProcess, writeInfo, writeError, exitWithError, exitWithSuccess, writeFatal } from './chunk-
|
|
4
|
+
import { getConfig, handleProcess, writeInfo, writeError, exitWithError, exitWithSuccess, writeFatal } from './chunk-QBJQH2IK.js';
|
|
5
5
|
|
|
6
6
|
// bin/post-merge.ts
|
|
7
7
|
void (async () => {
|
package/bin/pre-commit.cjs
CHANGED
|
@@ -2,29 +2,29 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var chunkSWXHQXUT_cjs = require('./chunk-SWXHQXUT.cjs');
|
|
5
|
-
var
|
|
5
|
+
var chunkN5U2S3QK_cjs = require('./chunk-N5U2S3QK.cjs');
|
|
6
6
|
|
|
7
7
|
// bin/pre-commit.ts
|
|
8
8
|
void (async () => {
|
|
9
|
-
const config = await
|
|
9
|
+
const config = await chunkN5U2S3QK_cjs.getConfig();
|
|
10
10
|
try {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
chunkN5U2S3QK_cjs.handleProcess(config);
|
|
12
|
+
chunkN5U2S3QK_cjs.writeInfo("Running pre-commit hook...", config);
|
|
13
13
|
chunkSWXHQXUT_cjs.checkPackageVersion(process.argv.slice(1));
|
|
14
14
|
if (chunkSWXHQXUT_cjs.isPackageVersionChanged(process.argv?.slice(1))) {
|
|
15
|
-
|
|
15
|
+
chunkN5U2S3QK_cjs.writeError(
|
|
16
16
|
"Please regenerate the package lock file before committing...",
|
|
17
17
|
config
|
|
18
18
|
);
|
|
19
|
-
|
|
19
|
+
chunkN5U2S3QK_cjs.exitWithError(config);
|
|
20
20
|
}
|
|
21
|
-
|
|
21
|
+
chunkN5U2S3QK_cjs.exitWithSuccess(config);
|
|
22
22
|
} catch (error) {
|
|
23
|
-
|
|
23
|
+
chunkN5U2S3QK_cjs.writeFatal(
|
|
24
24
|
`A fatal error occurred while running the program: ${error.message}`,
|
|
25
25
|
config
|
|
26
26
|
);
|
|
27
|
-
|
|
27
|
+
chunkN5U2S3QK_cjs.exitWithError(config);
|
|
28
28
|
process.exit(1);
|
|
29
29
|
}
|
|
30
30
|
})();
|
package/bin/pre-commit.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { checkPackageVersion, isPackageVersionChanged } from './chunk-AMSZ7DVW.js';
|
|
3
|
-
import { getConfig, handleProcess, writeInfo, writeError, exitWithError, exitWithSuccess, writeFatal } from './chunk-
|
|
3
|
+
import { getConfig, handleProcess, writeInfo, writeError, exitWithError, exitWithSuccess, writeFatal } from './chunk-QBJQH2IK.js';
|
|
4
4
|
|
|
5
5
|
// bin/pre-commit.ts
|
|
6
6
|
void (async () => {
|
package/bin/pre-install.cjs
CHANGED
|
@@ -2,26 +2,26 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var chunkCIJVSMK2_cjs = require('./chunk-CIJVSMK2.cjs');
|
|
5
|
-
var
|
|
5
|
+
var chunkN5U2S3QK_cjs = require('./chunk-N5U2S3QK.cjs');
|
|
6
6
|
|
|
7
7
|
// bin/pre-install.ts
|
|
8
8
|
void (async () => {
|
|
9
|
-
const config = await
|
|
9
|
+
const config = await chunkN5U2S3QK_cjs.getConfig();
|
|
10
10
|
try {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
chunkN5U2S3QK_cjs.handleProcess(config);
|
|
12
|
+
chunkN5U2S3QK_cjs.writeInfo("Running pre-install hook...", config);
|
|
13
13
|
if (Boolean(process.env.CI) || Boolean(process.env.STORM_CI)) {
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
chunkN5U2S3QK_cjs.writeInfo("Skipping pre-install for CI process...", config);
|
|
15
|
+
chunkN5U2S3QK_cjs.exitWithSuccess(config);
|
|
16
16
|
}
|
|
17
17
|
chunkCIJVSMK2_cjs.run(config, "npx -y only-allow pnpm");
|
|
18
|
-
|
|
18
|
+
chunkN5U2S3QK_cjs.exitWithSuccess(config);
|
|
19
19
|
} catch (error) {
|
|
20
|
-
|
|
20
|
+
chunkN5U2S3QK_cjs.writeFatal(
|
|
21
21
|
`A fatal error occurred while running the program: ${error.message}`,
|
|
22
22
|
config
|
|
23
23
|
);
|
|
24
|
-
|
|
24
|
+
chunkN5U2S3QK_cjs.exitWithError(config);
|
|
25
25
|
process.exit(1);
|
|
26
26
|
}
|
|
27
27
|
})();
|
package/bin/pre-install.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { run } from './chunk-54Q5U5WW.js';
|
|
3
|
-
import { getConfig, handleProcess, writeInfo, exitWithSuccess, writeFatal, exitWithError } from './chunk-
|
|
3
|
+
import { getConfig, handleProcess, writeInfo, exitWithSuccess, writeFatal, exitWithError } from './chunk-QBJQH2IK.js';
|
|
4
4
|
|
|
5
5
|
// bin/pre-install.ts
|
|
6
6
|
void (async () => {
|
package/bin/pre-push.cjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
var chunkSWXHQXUT_cjs = require('./chunk-SWXHQXUT.cjs');
|
|
5
5
|
var chunkCIJVSMK2_cjs = require('./chunk-CIJVSMK2.cjs');
|
|
6
|
-
var
|
|
6
|
+
var chunkN5U2S3QK_cjs = require('./chunk-N5U2S3QK.cjs');
|
|
7
7
|
var fs = require('fs');
|
|
8
8
|
var promises = require('fs/promises');
|
|
9
9
|
var path = require('path');
|
|
@@ -14,12 +14,12 @@ var fs__default = /*#__PURE__*/_interopDefault(fs);
|
|
|
14
14
|
var path__default = /*#__PURE__*/_interopDefault(path);
|
|
15
15
|
|
|
16
16
|
void (async () => {
|
|
17
|
-
const config = await
|
|
17
|
+
const config = await chunkN5U2S3QK_cjs.getConfig();
|
|
18
18
|
try {
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
chunkN5U2S3QK_cjs.handleProcess(config);
|
|
20
|
+
chunkN5U2S3QK_cjs.writeInfo("Running pre-push hook...", config);
|
|
21
21
|
chunkSWXHQXUT_cjs.checkPackageVersion(process.argv?.slice(1));
|
|
22
|
-
|
|
22
|
+
chunkN5U2S3QK_cjs.writeInfo("\u{1F512}\u{1F512}\u{1F512} Validating lock files \u{1F512}\u{1F512}\u{1F512}\n", config);
|
|
23
23
|
const errors = [];
|
|
24
24
|
if (fs__default.default.existsSync(
|
|
25
25
|
path__default.default.join(config.workspaceRoot ?? "./", "package-lock.json")
|
|
@@ -40,12 +40,12 @@ void (async () => {
|
|
|
40
40
|
encoding: "utf8"
|
|
41
41
|
}
|
|
42
42
|
);
|
|
43
|
-
if (content
|
|
43
|
+
if (content?.match(/localhost:487/)) {
|
|
44
44
|
errors.push(
|
|
45
45
|
'The "pnpm-lock.yaml" has reference to local repository ("localhost:4873"). Please use ensure you disable local registry before running "pnpm i"'
|
|
46
46
|
);
|
|
47
47
|
}
|
|
48
|
-
if (content
|
|
48
|
+
if (content?.match(/resolution: \{tarball/)) {
|
|
49
49
|
errors.push(
|
|
50
50
|
'The "pnpm-lock.yaml" has reference to tarball package. Please use npm registry only'
|
|
51
51
|
);
|
|
@@ -54,32 +54,32 @@ void (async () => {
|
|
|
54
54
|
errors.push('The "pnpm-lock.yaml" does not exist or cannot be read');
|
|
55
55
|
}
|
|
56
56
|
if (errors.length > 0) {
|
|
57
|
-
|
|
57
|
+
chunkN5U2S3QK_cjs.writeError("\u274C Lock file validation failed", config);
|
|
58
58
|
for (const error of errors) {
|
|
59
59
|
console.error(error);
|
|
60
60
|
}
|
|
61
|
-
|
|
61
|
+
chunkN5U2S3QK_cjs.exitWithError(config);
|
|
62
62
|
}
|
|
63
|
-
|
|
63
|
+
chunkN5U2S3QK_cjs.writeSuccess("Lock file is valid \u2705", config);
|
|
64
64
|
chunkCIJVSMK2_cjs.run(config, "git lfs pre-push origin");
|
|
65
65
|
try {
|
|
66
66
|
chunkCIJVSMK2_cjs.run(config, "git-lfs version");
|
|
67
67
|
} catch (error) {
|
|
68
|
-
|
|
68
|
+
chunkN5U2S3QK_cjs.writeError(
|
|
69
69
|
`This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/pre-push.
|
|
70
70
|
Error: ${error?.message}`,
|
|
71
71
|
config
|
|
72
72
|
);
|
|
73
|
-
|
|
73
|
+
chunkN5U2S3QK_cjs.exitWithError(config);
|
|
74
74
|
}
|
|
75
75
|
chunkCIJVSMK2_cjs.run(config, "git lfs pre-push origin");
|
|
76
|
-
|
|
76
|
+
chunkN5U2S3QK_cjs.exitWithSuccess(config);
|
|
77
77
|
} catch (error) {
|
|
78
|
-
|
|
78
|
+
chunkN5U2S3QK_cjs.writeFatal(
|
|
79
79
|
`A fatal error occurred while running the program: ${error.message}`,
|
|
80
80
|
config
|
|
81
81
|
);
|
|
82
|
-
|
|
82
|
+
chunkN5U2S3QK_cjs.exitWithError(config);
|
|
83
83
|
process.exit(1);
|
|
84
84
|
}
|
|
85
85
|
})();
|
package/bin/pre-push.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { checkPackageVersion } from './chunk-AMSZ7DVW.js';
|
|
3
3
|
import { run } from './chunk-54Q5U5WW.js';
|
|
4
|
-
import { getConfig, handleProcess, writeInfo, writeError, exitWithError, writeSuccess, exitWithSuccess, writeFatal } from './chunk-
|
|
4
|
+
import { getConfig, handleProcess, writeInfo, writeError, exitWithError, writeSuccess, exitWithSuccess, writeFatal } from './chunk-QBJQH2IK.js';
|
|
5
5
|
import fs from 'node:fs';
|
|
6
6
|
import { readFile } from 'node:fs/promises';
|
|
7
7
|
import path from 'node:path';
|
|
@@ -33,12 +33,12 @@ void (async () => {
|
|
|
33
33
|
encoding: "utf8"
|
|
34
34
|
}
|
|
35
35
|
);
|
|
36
|
-
if (content
|
|
36
|
+
if (content?.match(/localhost:487/)) {
|
|
37
37
|
errors.push(
|
|
38
38
|
'The "pnpm-lock.yaml" has reference to local repository ("localhost:4873"). Please use ensure you disable local registry before running "pnpm i"'
|
|
39
39
|
);
|
|
40
40
|
}
|
|
41
|
-
if (content
|
|
41
|
+
if (content?.match(/resolution: \{tarball/)) {
|
|
42
42
|
errors.push(
|
|
43
43
|
'The "pnpm-lock.yaml" has reference to tarball package. Please use npm registry only'
|
|
44
44
|
);
|
package/bin/prepare.cjs
CHANGED
|
@@ -2,24 +2,24 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var chunkCIJVSMK2_cjs = require('./chunk-CIJVSMK2.cjs');
|
|
5
|
-
var
|
|
5
|
+
var chunkN5U2S3QK_cjs = require('./chunk-N5U2S3QK.cjs');
|
|
6
6
|
|
|
7
7
|
// bin/prepare.ts
|
|
8
8
|
void (async () => {
|
|
9
|
-
const config = await
|
|
9
|
+
const config = await chunkN5U2S3QK_cjs.getConfig();
|
|
10
10
|
try {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
chunkN5U2S3QK_cjs.handleProcess(config);
|
|
12
|
+
chunkN5U2S3QK_cjs.writeInfo("Running prepare hook...", config);
|
|
13
13
|
if (!process.env.CI && !process.env.STORM_CI) {
|
|
14
14
|
chunkCIJVSMK2_cjs.run(config, "lefthook install");
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
chunkN5U2S3QK_cjs.exitWithSuccess(config);
|
|
17
17
|
} catch (error) {
|
|
18
|
-
|
|
18
|
+
chunkN5U2S3QK_cjs.writeFatal(
|
|
19
19
|
`A fatal error occurred while running the program: ${error.message}`,
|
|
20
20
|
config
|
|
21
21
|
);
|
|
22
|
-
|
|
22
|
+
chunkN5U2S3QK_cjs.exitWithError(config);
|
|
23
23
|
process.exit(1);
|
|
24
24
|
}
|
|
25
25
|
})();
|
package/bin/prepare.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { run } from './chunk-54Q5U5WW.js';
|
|
3
|
-
import { getConfig, handleProcess, writeInfo, exitWithSuccess, writeFatal, exitWithError } from './chunk-
|
|
3
|
+
import { getConfig, handleProcess, writeInfo, exitWithSuccess, writeFatal, exitWithError } from './chunk-QBJQH2IK.js';
|
|
4
4
|
|
|
5
5
|
// bin/prepare.ts
|
|
6
6
|
void (async () => {
|
package/bin/version-warning.cjs
CHANGED
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var chunkSWXHQXUT_cjs = require('./chunk-SWXHQXUT.cjs');
|
|
5
|
-
var
|
|
5
|
+
var chunkN5U2S3QK_cjs = require('./chunk-N5U2S3QK.cjs');
|
|
6
6
|
|
|
7
7
|
// bin/version-warning.ts
|
|
8
8
|
void (async () => {
|
|
9
|
-
const config = await
|
|
9
|
+
const config = await chunkN5U2S3QK_cjs.getConfig();
|
|
10
10
|
try {
|
|
11
|
-
|
|
11
|
+
chunkN5U2S3QK_cjs.handleProcess(config);
|
|
12
12
|
chunkSWXHQXUT_cjs.checkPackageVersion(process.argv.slice(1));
|
|
13
13
|
} catch (error) {
|
|
14
|
-
|
|
14
|
+
chunkN5U2S3QK_cjs.writeFatal(
|
|
15
15
|
`A fatal error occurred while running the program: ${error.message}`,
|
|
16
16
|
config
|
|
17
17
|
);
|
|
18
|
-
|
|
18
|
+
chunkN5U2S3QK_cjs.exitWithError(config);
|
|
19
19
|
process.exit(1);
|
|
20
20
|
}
|
|
21
21
|
})();
|
package/bin/version-warning.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { checkPackageVersion } from './chunk-AMSZ7DVW.js';
|
|
3
|
-
import { getConfig, handleProcess, writeFatal, exitWithError } from './chunk-
|
|
3
|
+
import { getConfig, handleProcess, writeFatal, exitWithError } from './chunk-QBJQH2IK.js';
|
|
4
4
|
|
|
5
5
|
// bin/version-warning.ts
|
|
6
6
|
void (async () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/git-tools",
|
|
3
|
-
"version": "2.121.
|
|
3
|
+
"version": "2.121.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Tools for managing Git repositories within a Nx workspace.",
|
|
6
6
|
"repository": {
|
|
@@ -185,8 +185,8 @@
|
|
|
185
185
|
"@inquirer/prompts": "7.2.1",
|
|
186
186
|
"@nx/devkit": "^21.4.1",
|
|
187
187
|
"@nx/js": "^21.4.1",
|
|
188
|
-
"@storm-software/config": "^1.131.
|
|
189
|
-
"@storm-software/config-tools": "^1.185.
|
|
188
|
+
"@storm-software/config": "^1.131.3",
|
|
189
|
+
"@storm-software/config-tools": "^1.185.3",
|
|
190
190
|
"@textlint/ast-node-types": "14.4.2",
|
|
191
191
|
"@textlint/markdown-to-ast": "14.4.2",
|
|
192
192
|
"anchor-markdown-header": "0.7.0",
|
|
@@ -194,7 +194,7 @@
|
|
|
194
194
|
"axios": "1.8.2",
|
|
195
195
|
"chalk": "^4.1.2",
|
|
196
196
|
"chalk-template": "1.1.0",
|
|
197
|
-
"conventional-changelog-storm-software": "^0.1.
|
|
197
|
+
"conventional-changelog-storm-software": "^0.1.3",
|
|
198
198
|
"htmlparser2": "10.0.0",
|
|
199
199
|
"jsonc-parser": "3.2.1",
|
|
200
200
|
"nx": "^21.4.1",
|
|
@@ -216,5 +216,5 @@
|
|
|
216
216
|
"tsup": "8.4.0"
|
|
217
217
|
},
|
|
218
218
|
"publishConfig": { "access": "public" },
|
|
219
|
-
"gitHead": "
|
|
219
|
+
"gitHead": "1b9f901274134d51c4200e5797348cf9587203dc"
|
|
220
220
|
}
|