@storm-software/git-tools 2.131.33 → 2.131.35

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.js CHANGED
@@ -22,7 +22,7 @@ import '@inquirer/password';
22
22
  import '@inquirer/search';
23
23
  import default11 from '@inquirer/select';
24
24
  import shellescape from 'any-shell-escape';
25
- import chalkTemplate from 'chalk-template';
25
+ import chalk2 from 'chalk';
26
26
  import fs, { readFile as readFile$1, writeFile } from 'node:fs/promises';
27
27
  import createBasePreset from 'conventional-changelog-conventionalcommits';
28
28
  import { readCachedProjectGraph, createProjectGraphAsync as createProjectGraphAsync$1, readProjectsConfigurationFromProjectGraph as readProjectsConfigurationFromProjectGraph$1 } from 'nx/src/project-graph/project-graph';
@@ -47,7 +47,6 @@ import axios from 'axios';
47
47
  import { homedir } from 'node:os';
48
48
  import { defaultCreateReleaseProvider, GithubRemoteReleaseClient } from 'nx/src/command-line/release/utils/remote-release-clients/github';
49
49
  import { parse } from 'yaml';
50
- import chalk from 'chalk';
51
50
  import { printAndFlushChanges as printAndFlushChanges$1 } from 'nx/src/command-line/release/utils/print-changes';
52
51
  import { createGitTagValues, handleDuplicateGitTags, createCommitMessageValues, isPrerelease, shouldPreferDockerVersionForReleaseGroup, ReleaseVersion, noDiffInChangelogMessage, shouldSkipVersionActions } from 'nx/src/command-line/release/utils/shared';
53
52
  import { interpolate as interpolate$1 } from 'nx/src/tasks-runner/utils';
@@ -304,7 +303,7 @@ var commitlint = {
304
303
  enableMultipleScopes: false,
305
304
  disableEmoji: true,
306
305
  breakingChangePrefix: "\u{1F4A3} ",
307
- closedIssuePrefix: "\u2705 ",
306
+ closedIssuePrefix: "\u2714 ",
308
307
  format: "{type}: {emoji}{subject}"
309
308
  }
310
309
  };
@@ -355,7 +354,7 @@ var commitlint2 = {
355
354
  enableMultipleScopes: false,
356
355
  disableEmoji: true,
357
356
  breakingChangePrefix: "\u{1F4A3} ",
358
- closedIssuePrefix: "\u2705 ",
357
+ closedIssuePrefix: "\u2714 ",
359
358
  format: "{type}({scope}): {emoji}{subject}"
360
359
  }
361
360
  };
@@ -1209,7 +1208,7 @@ async function createState(workspaceConfig, configPath) {
1209
1208
  if (state.config.questions.type.enum) {
1210
1209
  ret[key] = {
1211
1210
  ...state.config.questions.type.enum[key],
1212
- title: chalkTemplate`${state.config.questions.type.enum[key]?.emoji ? `${state.config.questions.type.enum[key]?.emoji} ` : ""}{bold ${key}} ${state.config.questions.type.enum[key]?.title && state.config.questions.type.enum[key]?.title !== key ? `- ${state.config.questions.type.enum[key]?.title}` : ""}${state.config.questions.type.enum[key]?.semverBump ? ` (version bump: ${state.config.questions.type.enum[key]?.semverBump})` : ""}`,
1211
+ title: `${state.config.questions.type.enum[key]?.emoji ? `${state.config.questions.type.enum[key]?.emoji} ` : ""}${chalk2.bold(key)} ${state.config.questions.type.enum[key]?.title && state.config.questions.type.enum[key]?.title !== key ? `- ${state.config.questions.type.enum[key]?.title}` : ""}${state.config.questions.type.enum[key]?.semverBump ? ` (version bump: ${state.config.questions.type.enum[key]?.semverBump})` : ""}`,
1213
1212
  hidden: false
1214
1213
  };
1215
1214
  }
@@ -1225,7 +1224,7 @@ async function createState(workspaceConfig, configPath) {
1225
1224
  for (const scope of scopes) {
1226
1225
  if (scope === "monorepo") {
1227
1226
  state.config.questions.scope.enum[scope] = {
1228
- title: chalkTemplate`{bold monorepo} - workspace root`,
1227
+ title: chalk2.bold("monorepo") + " - workspace root",
1229
1228
  description: "The base workspace package (workspace root)",
1230
1229
  hidden: false,
1231
1230
  projectRoot: "/"
@@ -1259,7 +1258,7 @@ async function createState(workspaceConfig, configPath) {
1259
1258
  description = packageJson.description || description;
1260
1259
  }
1261
1260
  state.config.questions.scope.enum[scope] = {
1262
- title: chalkTemplate`{bold ${project.name}} - ${project.root}`,
1261
+ title: chalk2.bold(project.name) + " - " + project.root,
1263
1262
  description,
1264
1263
  hidden: false,
1265
1264
  projectRoot: project.root
@@ -1331,22 +1330,22 @@ async function runCommit(commitizenFile, dryRun = false) {
1331
1330
  if (dryRun) {
1332
1331
  writeInfo("Running in dry mode.", workspaceConfig);
1333
1332
  }
1334
- console.log(chalkTemplate`
1335
- {bold.#999999 ----------------------------------------}
1336
-
1337
- {bold.#FFFFFF ${brandIcon(workspaceConfig)} Storm Software Git-Tools - Commit}
1338
- {#CCCCCC Please provide the requested details below...}
1339
- `);
1333
+ console.log(
1334
+ chalk2.bold.hex("#999999")("----------------------------------------") + "\n" + chalk2.bold.hex("#FFFFFF")(
1335
+ ` ${brandIcon(workspaceConfig)} Storm Software Git-Tools - Commit`
1336
+ ) + "\n" + chalk2.hex("#CCCCCC")("Please provide the requested details below...")
1337
+ );
1340
1338
  state.answers = await askQuestions(state);
1341
1339
  const message = formatCommitMessage(state, workspaceConfig);
1342
1340
  const commitMsgFile = joinPaths(getGitDir(), "COMMIT_EDITMSG");
1343
- console.log(chalkTemplate`
1344
- {bold.#999999 ----------------------------------------}
1345
-
1346
- {bold.#FFFFFF Commit message} - {#DDDDDD ${message}}
1347
- {bold.#FFFFFF Git-Commit File} - {#DDDDDD ${commitMsgFile}}
1348
-
1349
- `);
1341
+ console.log(
1342
+ chalk2.bold.hex("#999999")("----------------------------------------") + `
1343
+ ${chalk2.bold.hex("#FFFFFF")("Commit message")} - ${chalk2.hex("#DDDDDD")(message)}
1344
+ ${chalk2.bold.hex("#FFFFFF")("Git-Commit File")} - ${chalk2.hex("#DDDDDD")(
1345
+ commitMsgFile
1346
+ )}
1347
+ `
1348
+ );
1350
1349
  await runCommitLint(workspaceConfig, { message });
1351
1350
  const commandItems = ["git", "commit", "-S"];
1352
1351
  commandItems.push(...["--file", commitMsgFile]);
@@ -1376,7 +1375,9 @@ async function askQuestions(state) {
1376
1375
  return state.answers;
1377
1376
  }
1378
1377
  async function askQuestion(index, question) {
1379
- const message = chalkTemplate`{bold ${index + 1}. ${question.title}} - ${question.description}
1378
+ const message = `${chalk2.bold(
1379
+ `${index + 1}. ${question.title}`
1380
+ )} - ${question.description}
1380
1381
  `;
1381
1382
  if (question.type === "select" && question.enum && Object.keys(question.enum).length > 1) {
1382
1383
  return default11({
@@ -2570,7 +2571,7 @@ async function generateChangelogForProjects({
2570
2571
  if (interpolatedTreePath) {
2571
2572
  const prefix = dryRun ? "Previewing" : "Generating";
2572
2573
  output.log({
2573
- title: `${prefix} an entry in ${interpolatedTreePath} for ${chalk.white(
2574
+ title: `${prefix} an entry in ${interpolatedTreePath} for ${chalk2.white(
2574
2575
  releaseVersion.gitTag
2575
2576
  )}`
2576
2577
  });