@storm-software/git-tools 2.38.2 → 2.39.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## 2.39.0 (2024-08-01)
2
+
3
+
4
+ ### Features
5
+
6
+ - **git-tools:** Update `commitlint` to warn users when no commit message is provided instead of throwing errors ([04942ee2](https://github.com/storm-software/storm-ops/commit/04942ee2))
7
+
8
+ ## 2.38.3 (2024-07-31)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ - **git-tools:** Resolved issue when `commitlint` is called without a `message` parameter ([624b24bc](https://github.com/storm-software/storm-ops/commit/624b24bc))
14
+
1
15
  ## 2.38.2 (2024-07-31)
2
16
 
3
17
 
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
- [![Version](https://img.shields.io/badge/version-2.38.1-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
24
+ [![Version](https://img.shields.io/badge/version-2.38.3-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
25
25
 
26
26
  <!-- prettier-ignore-start -->
27
27
  <!-- markdownlint-disable -->
package/bin/git.js CHANGED
@@ -1489,7 +1489,7 @@ var require_jiti = __commonJS({
1489
1489
  if (0 === path13.length) return ".";
1490
1490
  const isUNCPath = (path13 = normalizeWindowsPath2(path13)).match(_UNC_REGEX2), isPathAbsolute = isAbsolute3(path13), trailingSeparator = "/" === path13[path13.length - 1];
1491
1491
  return 0 === (path13 = normalizeString2(path13, !isPathAbsolute)).length ? isPathAbsolute ? "/" : trailingSeparator ? "./" : "." : (trailingSeparator && (path13 += "/"), _DRIVE_LETTER_RE2.test(path13) && (path13 += "/"), isUNCPath ? isPathAbsolute ? `//${path13}` : `//./${path13}` : isPathAbsolute && !isAbsolute3(path13) ? `/${path13}` : path13);
1492
- }, join12 = function(...arguments_) {
1492
+ }, join13 = function(...arguments_) {
1493
1493
  if (0 === arguments_.length) return ".";
1494
1494
  let joined;
1495
1495
  for (const argument of arguments_) argument && argument.length > 0 && (void 0 === joined ? joined = argument : joined += `/${argument}`);
@@ -4102,13 +4102,13 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
4102
4102
  } catch (_a4) {
4103
4103
  return false;
4104
4104
  }
4105
- }(_filename) && (_filename = join12(_filename, "index.js")), true === opts.cache && (opts.cache = function() {
4105
+ }(_filename) && (_filename = join13(_filename, "index.js")), true === opts.cache && (opts.cache = function() {
4106
4106
  let _tmpDir = (0, external_os_namespaceObject.tmpdir)();
4107
4107
  if (process.env.TMPDIR && _tmpDir === process.cwd() && !process.env.JITI_RESPECT_TMPDIR_ENV) {
4108
4108
  const _env = process.env.TMPDIR;
4109
4109
  delete process.env.TMPDIR, _tmpDir = (0, external_os_namespaceObject.tmpdir)(), process.env.TMPDIR = _env;
4110
4110
  }
4111
- return join12(_tmpDir, "node-jiti");
4111
+ return join13(_tmpDir, "node-jiti");
4112
4112
  }()), opts.cache) try {
4113
4113
  if ((0, external_fs_.mkdirSync)(opts.cache, { recursive: true }), !function(filename) {
4114
4114
  try {
@@ -4133,7 +4133,7 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
4133
4133
  for (const [alias2, to3] of Object.entries(aliases2)) {
4134
4134
  if (!_path.startsWith(alias2)) continue;
4135
4135
  const _alias = hasTrailingSlash2(alias2) ? alias2.slice(0, -1) : alias2;
4136
- if (hasTrailingSlash2(_path[_alias.length])) return join12(to3, _path.slice(alias2.length));
4136
+ if (hasTrailingSlash2(_path[_alias.length])) return join13(to3, _path.slice(alias2.length));
4137
4137
  }
4138
4138
  return _path;
4139
4139
  }(id, alias)), opts.esmResolve) {
@@ -4161,7 +4161,7 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
4161
4161
  function transform3(topts) {
4162
4162
  let code = function(filename, source2, get3) {
4163
4163
  if (!opts.cache || !filename) return get3();
4164
- const sourceHash = ` /* v${opts.cacheVersion}-${md5(source2, 16)} */`, filebase = basename2(pathe_ff20891b_dirname(filename)) + "-" + basename2(filename), cacheFile = join12(opts.cache, filebase + "." + md5(filename) + ".js");
4164
+ const sourceHash = ` /* v${opts.cacheVersion}-${md5(source2, 16)} */`, filebase = basename2(pathe_ff20891b_dirname(filename)) + "-" + basename2(filename), cacheFile = join13(opts.cache, filebase + "." + md5(filename) + ".js");
4165
4165
  if ((0, external_fs_.existsSync)(cacheFile)) {
4166
4166
  const cacheSource = (0, external_fs_.readFileSync)(cacheFile, "utf8");
4167
4167
  if (cacheSource.endsWith(sourceHash)) return debug2("[cache hit]", filename, "~>", cacheFile), cacheSource;
@@ -4218,9 +4218,9 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
4218
4218
  var _a4;
4219
4219
  const id = evalOptions.id || (evalOptions.filename ? basename2(evalOptions.filename) : `_jitiEval.${evalOptions.ext || ".js"}`), filename = evalOptions.filename || _resolve3(id), ext = evalOptions.ext || extname5(filename), cache4 = evalOptions.cache || parentCache || {}, isTypescript = ".ts" === ext || ".mts" === ext || ".cts" === ext, isNativeModule = ".mjs" === ext || ".js" === ext && "module" === (null === (_a4 = function(path13) {
4220
4220
  for (; path13 && "." !== path13 && "/" !== path13; ) {
4221
- path13 = join12(path13, "..");
4221
+ path13 = join13(path13, "..");
4222
4222
  try {
4223
- const pkg = (0, external_fs_.readFileSync)(join12(path13, "package.json"), "utf8");
4223
+ const pkg = (0, external_fs_.readFileSync)(join13(path13, "package.json"), "utf8");
4224
4224
  try {
4225
4225
  return JSON.parse(pkg);
4226
4226
  } catch (_a5) {
@@ -37763,7 +37763,7 @@ var require_path_reservations = __commonJS({
37763
37763
  var assert7 = __require("assert");
37764
37764
  var normalize2 = require_normalize_unicode();
37765
37765
  var stripSlashes = require_strip_trailing_slashes();
37766
- var { join: join12 } = __require("path");
37766
+ var { join: join13 } = __require("path");
37767
37767
  var platform = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
37768
37768
  var isWindows = platform === "win32";
37769
37769
  module.exports = () => {
@@ -37772,7 +37772,7 @@ var require_path_reservations = __commonJS({
37772
37772
  const getDirs = (path13) => {
37773
37773
  const dirs = path13.split("/").slice(0, -1).reduce((set3, path14) => {
37774
37774
  if (set3.length) {
37775
- path14 = join12(set3[set3.length - 1], path14);
37775
+ path14 = join13(set3[set3.length - 1], path14);
37776
37776
  }
37777
37777
  set3.push(path14 || "/");
37778
37778
  return set3;
@@ -37840,7 +37840,7 @@ var require_path_reservations = __commonJS({
37840
37840
  };
37841
37841
  const reserve = (paths, fn7) => {
37842
37842
  paths = isWindows ? ["win32 parallelization disabled"] : paths.map((p4) => {
37843
- return stripSlashes(join12(normalize2(p4))).toLowerCase();
37843
+ return stripSlashes(join13(normalize2(p4))).toLowerCase();
37844
37844
  });
37845
37845
  const dirs = new Set(
37846
37846
  paths.map((path13) => getDirs(path13)).reduce((a3, b11) => a3.concat(b11))
@@ -58655,16 +58655,16 @@ var require_tsconfig_loader = __commonJS({
58655
58655
  return walkForTsConfig(parentDirectory, readdirSync4);
58656
58656
  }
58657
58657
  exports.walkForTsConfig = walkForTsConfig;
58658
- function loadTsconfig(configFilePath, existsSync9, readFileSync8) {
58659
- if (existsSync9 === void 0) {
58660
- existsSync9 = fs11.existsSync;
58658
+ function loadTsconfig(configFilePath, existsSync10, readFileSync8) {
58659
+ if (existsSync10 === void 0) {
58660
+ existsSync10 = fs11.existsSync;
58661
58661
  }
58662
58662
  if (readFileSync8 === void 0) {
58663
58663
  readFileSync8 = function(filename) {
58664
58664
  return fs11.readFileSync(filename, "utf8");
58665
58665
  };
58666
58666
  }
58667
- if (!existsSync9(configFilePath)) {
58667
+ if (!existsSync10(configFilePath)) {
58668
58668
  return void 0;
58669
58669
  }
58670
58670
  var configString = readFileSync8(configFilePath);
@@ -58680,27 +58680,27 @@ var require_tsconfig_loader = __commonJS({
58680
58680
  var base = void 0;
58681
58681
  if (Array.isArray(extendedConfig)) {
58682
58682
  base = extendedConfig.reduce(function(currBase, extendedConfigElement) {
58683
- return mergeTsconfigs(currBase, loadTsconfigFromExtends(configFilePath, extendedConfigElement, existsSync9, readFileSync8));
58683
+ return mergeTsconfigs(currBase, loadTsconfigFromExtends(configFilePath, extendedConfigElement, existsSync10, readFileSync8));
58684
58684
  }, {});
58685
58685
  } else {
58686
- base = loadTsconfigFromExtends(configFilePath, extendedConfig, existsSync9, readFileSync8);
58686
+ base = loadTsconfigFromExtends(configFilePath, extendedConfig, existsSync10, readFileSync8);
58687
58687
  }
58688
58688
  return mergeTsconfigs(base, config2);
58689
58689
  }
58690
58690
  return config2;
58691
58691
  }
58692
58692
  exports.loadTsconfig = loadTsconfig;
58693
- function loadTsconfigFromExtends(configFilePath, extendedConfigValue, existsSync9, readFileSync8) {
58693
+ function loadTsconfigFromExtends(configFilePath, extendedConfigValue, existsSync10, readFileSync8) {
58694
58694
  var _a4;
58695
58695
  if (typeof extendedConfigValue === "string" && extendedConfigValue.indexOf(".json") === -1) {
58696
58696
  extendedConfigValue += ".json";
58697
58697
  }
58698
58698
  var currentDir = path13.dirname(configFilePath);
58699
58699
  var extendedConfigPath = path13.join(currentDir, extendedConfigValue);
58700
- if (extendedConfigValue.indexOf("/") !== -1 && extendedConfigValue.indexOf(".") !== -1 && !existsSync9(extendedConfigPath)) {
58700
+ if (extendedConfigValue.indexOf("/") !== -1 && extendedConfigValue.indexOf(".") !== -1 && !existsSync10(extendedConfigPath)) {
58701
58701
  extendedConfigPath = path13.join(currentDir, "node_modules", extendedConfigValue);
58702
58702
  }
58703
- var config2 = loadTsconfig(extendedConfigPath, existsSync9, readFileSync8) || {};
58703
+ var config2 = loadTsconfig(extendedConfigPath, existsSync10, readFileSync8) || {};
58704
58704
  if ((_a4 = config2.compilerOptions) === null || _a4 === void 0 ? void 0 : _a4.baseUrl) {
58705
58705
  var extendsDir = path13.dirname(extendedConfigValue);
58706
58706
  config2.compilerOptions.baseUrl = path13.join(extendsDir, config2.compilerOptions.baseUrl);
@@ -77948,7 +77948,7 @@ var require_buffer_list = __commonJS({
77948
77948
  }
77949
77949
  }, {
77950
77950
  key: "join",
77951
- value: function join12(s3) {
77951
+ value: function join13(s3) {
77952
77952
  if (this.length === 0) return "";
77953
77953
  var p4 = this.head;
77954
77954
  var ret = "" + p4.data;
@@ -110764,7 +110764,7 @@ function lineSuffix(contents) {
110764
110764
  assertDoc(contents);
110765
110765
  return { type: DOC_TYPE_LINE_SUFFIX, contents };
110766
110766
  }
110767
- function join8(separator, docs) {
110767
+ function join9(separator, docs) {
110768
110768
  assertDoc(separator);
110769
110769
  assertDocArray(docs);
110770
110770
  const parts = [];
@@ -111124,7 +111124,7 @@ function cleanDoc(doc) {
111124
111124
  return mapDoc(doc, (currentDoc) => cleanDocFn(currentDoc));
111125
111125
  }
111126
111126
  function replaceEndOfLine(doc, replacement = literalline) {
111127
- return mapDoc(doc, (currentDoc) => typeof currentDoc === "string" ? join8(replacement, currentDoc.split("\n")) : currentDoc);
111127
+ return mapDoc(doc, (currentDoc) => typeof currentDoc === "string" ? join9(replacement, currentDoc.split("\n")) : currentDoc);
111128
111128
  }
111129
111129
  function canBreakFn(doc) {
111130
111130
  if (doc.type === DOC_TYPE_LINE) {
@@ -111821,7 +111821,7 @@ var init_doc = __esm({
111821
111821
  MODE_FLAT = Symbol("MODE_FLAT");
111822
111822
  CURSOR_PLACEHOLDER = Symbol("cursor");
111823
111823
  builders = {
111824
- join: join8,
111824
+ join: join9,
111825
111825
  line,
111826
111826
  softline,
111827
111827
  hardline,
@@ -231713,7 +231713,7 @@ ${formatLogMessage(config2)}`, {
231713
231713
  // packages/git-tools/bin/git.ts
231714
231714
  var import_fs_extra = __toESM(require_lib3(), 1);
231715
231715
  var import_tsconfig_paths = __toESM(require_lib5(), 1);
231716
- import { join as join11 } from "node:path";
231716
+ import { join as join12 } from "node:path";
231717
231717
 
231718
231718
  // node_modules/.pnpm/commander@12.1.0/node_modules/commander/esm.mjs
231719
231719
  var import_index = __toESM(require_commander(), 1);
@@ -232245,16 +232245,18 @@ var runCommit = async (commitConfig = "@storm-software/git-tools/commit/config.j
232245
232245
  };
232246
232246
 
232247
232247
  // packages/git-tools/src/commitlint/run-lint.ts
232248
+ import { existsSync as existsSync7 } from "fs";
232248
232249
  import { readFile as readFile4 } from "fs/promises";
232249
232250
  import childProcess2 from "node:child_process";
232251
+ import { join as join5 } from "node:path";
232250
232252
  var COMMIT_EDITMSG_PATH = ".git/COMMIT_EDITMSG";
232251
232253
  var runCommitLint = async (commitMessageArg) => {
232252
232254
  const config2 = await loadStormConfig();
232253
232255
  let commitMessage;
232254
232256
  if (commitMessageArg && commitMessageArg !== COMMIT_EDITMSG_PATH) {
232255
232257
  commitMessage = commitMessageArg;
232256
- } else if (commitMessageArg !== COMMIT_EDITMSG_PATH) {
232257
- commitMessage = await readCommitMessageFile();
232258
+ } else if (existsSync7(join5(config2.workspaceRoot, COMMIT_EDITMSG_PATH))) {
232259
+ commitMessage = await readCommitMessageFile(config2.workspaceRoot);
232258
232260
  }
232259
232261
  if (!commitMessage) {
232260
232262
  let gitLogCmd = "git log -1 --no-merges";
@@ -232265,21 +232267,29 @@ var runCommitLint = async (commitMessageArg) => {
232265
232267
  if (upstreamRemote) {
232266
232268
  const upstreamRemoteIdentifier = upstreamRemote.split(" ")[0]?.trim();
232267
232269
  if (!upstreamRemoteIdentifier) {
232268
- throw new Error(
232269
- `No upstream remote found for ${config2.name}.git. Skipping comparison.`
232270
+ writeWarning(
232271
+ `No upstream remote found for ${config2.name}.git. Skipping comparison.`,
232272
+ config2
232270
232273
  );
232274
+ return;
232271
232275
  }
232272
232276
  writeDebug(`Comparing against remote ${upstreamRemoteIdentifier}`);
232273
232277
  const currentBranch = childProcess2.execSync("git branch --show-current").toString().trim();
232274
232278
  gitLogCmd = gitLogCmd + ` ${currentBranch} ^${upstreamRemoteIdentifier}/main`;
232275
232279
  } else {
232276
- throw new Error(
232277
- `No upstream remote found for ${config2.name}.git. Skipping comparison against upstream main.`
232280
+ writeWarning(
232281
+ `No upstream remote found for ${config2.name}.git. Skipping comparison against upstream main.`,
232282
+ config2
232278
232283
  );
232284
+ return;
232279
232285
  }
232280
232286
  commitMessage = childProcess2.execSync(gitLogCmd).toString().trim();
232281
232287
  if (!commitMessage) {
232282
- throw new Error("No commits found. Skipping commit message validation.");
232288
+ writeWarning(
232289
+ "No commits found. Skipping commit message validation.",
232290
+ config2
232291
+ );
232292
+ return;
232283
232293
  }
232284
232294
  }
232285
232295
  const allowedTypes = Object.keys(
@@ -232304,26 +232314,26 @@ possible scopes: ${allowedScopes} (if unsure use "core")`;
232304
232314
  throw new Error(errorMessage);
232305
232315
  }
232306
232316
  };
232307
- var readCommitMessageFile = async () => {
232308
- return (await readFile4(COMMIT_EDITMSG_PATH, "utf8"))?.trim();
232317
+ var readCommitMessageFile = async (workspaceRoot3) => {
232318
+ return (await readFile4(join5(workspaceRoot3, COMMIT_EDITMSG_PATH), "utf8"))?.trim();
232309
232319
  };
232310
232320
 
232311
232321
  // packages/git-tools/src/readme/index.ts
232312
232322
  import {
232313
- existsSync as existsSync8,
232323
+ existsSync as existsSync9,
232314
232324
  readFileSync as readFileSync6,
232315
232325
  readdirSync as readdirSync3,
232316
232326
  rmSync,
232317
232327
  writeFileSync as writeFileSync3
232318
232328
  } from "node:fs";
232319
- import { join as join9 } from "node:path";
232329
+ import { join as join10 } from "node:path";
232320
232330
  import {
232321
232331
  createProjectGraphAsync as createProjectGraphAsync2,
232322
232332
  readProjectsConfigurationFromProjectGraph as readProjectsConfigurationFromProjectGraph2
232323
232333
  } from "nx/src/project-graph/project-graph.js";
232324
232334
 
232325
232335
  // packages/git-tools/src/utilities/file-utils.ts
232326
- import Path, { dirname as dirname3, isAbsolute as isAbsolute2, join as join5 } from "node:path";
232336
+ import Path, { dirname as dirname3, isAbsolute as isAbsolute2, join as join6 } from "node:path";
232327
232337
  function findFileName(filePath) {
232328
232338
  return filePath?.split(filePath?.includes(Path.sep) ? Path.sep : filePath?.includes("/") ? "/" : "\\")?.pop() ?? "";
232329
232339
  }
@@ -232333,7 +232343,7 @@ function findFilePath(filePath) {
232333
232343
 
232334
232344
  // packages/git-tools/src/readme/doctoc.ts
232335
232345
  import { readFileSync as readFileSync4, readdirSync as readdirSync2, statSync as statSync3, writeFileSync as writeFileSync2 } from "node:fs";
232336
- import { extname as extname3, join as join6 } from "node:path";
232346
+ import { extname as extname3, join as join7 } from "node:path";
232337
232347
 
232338
232348
  // node_modules/.pnpm/underscore@1.13.6/node_modules/underscore/modules/index.js
232339
232349
  var modules_exports = {};
@@ -236101,7 +236111,7 @@ function separateFilesAndDirs(fileInfos) {
236101
236111
  }
236102
236112
  function findMarkdownFiles(currentPath) {
236103
236113
  function getFileInfo3(entry) {
236104
- const target = join6(currentPath, entry);
236114
+ const target = join7(currentPath, entry);
236105
236115
  return {
236106
236116
  name: entry,
236107
236117
  path: target
@@ -236129,8 +236139,8 @@ function findMarkdownFiles(currentPath) {
236129
236139
  }
236130
236140
 
236131
236141
  // packages/git-tools/src/readme/nx-docs.ts
236132
- import { existsSync as existsSync7, readFileSync as readFileSync5 } from "node:fs";
236133
- import { join as join7 } from "node:path";
236142
+ import { existsSync as existsSync8, readFileSync as readFileSync5 } from "node:fs";
236143
+ import { join as join8 } from "node:path";
236134
236144
  var getExecutorMarkdown = (_packageName, executorsJsonFile, executorsJson) => {
236135
236145
  if (!executorsJson?.executors) {
236136
236146
  return "";
@@ -236144,8 +236154,8 @@ var getExecutorMarkdown = (_packageName, executorsJsonFile, executorsJson) => {
236144
236154
  let description = "";
236145
236155
  let required = [];
236146
236156
  if (executor.schema) {
236147
- const schemaJsonPath = join7(findFilePath(executorsJsonFile), executor.schema);
236148
- if (existsSync7(schemaJsonPath)) {
236157
+ const schemaJsonPath = join8(findFilePath(executorsJsonFile), executor.schema);
236158
+ if (existsSync8(schemaJsonPath)) {
236149
236159
  const schemaJson = JSON.parse(readFileSync5(schemaJsonPath, "utf8") ?? "{}");
236150
236160
  if (schemaJson.title) {
236151
236161
  title = `## ${schemaJson.title}
@@ -236237,8 +236247,8 @@ var getGeneratorMarkdown = (packageName, generatorsJsonFile, generatorsJson) =>
236237
236247
  let example = "";
236238
236248
  const required = [];
236239
236249
  if (generator.schema) {
236240
- const schemaJsonPath = join7(findFilePath(generatorsJsonFile), generator.schema);
236241
- if (existsSync7(schemaJsonPath)) {
236250
+ const schemaJsonPath = join8(findFilePath(generatorsJsonFile), generator.schema);
236251
+ if (existsSync8(schemaJsonPath)) {
236242
236252
  const schemaJson = JSON.parse(readFileSync5(schemaJsonPath, "utf8") ?? "{}");
236243
236253
  if (schemaJson.title) {
236244
236254
  title = `## ${schemaJson.title}
@@ -236440,11 +236450,11 @@ var runProjectReadme = async (projectName, { templates, output: output2, clean =
236440
236450
  });
236441
236451
  const projectConfigs = readProjectsConfigurationFromProjectGraph2(projectGraph);
236442
236452
  const project = projectConfigs.projects[projectName];
236443
- const inputFile = join9(project?.root ?? "./", "README.md");
236444
- if (existsSync8(inputFile)) {
236453
+ const inputFile = join10(project?.root ?? "./", "README.md");
236454
+ if (existsSync9(inputFile)) {
236445
236455
  console.info(`Formatting ${projectName}'s README file at "${inputFile}"`);
236446
- const outputFilePath = output2 ? output2.includes("README.md") ? output2 : join9(findFilePath(output2), "README.md") : inputFile;
236447
- if (clean && existsSync8(outputFilePath)) {
236456
+ const outputFilePath = output2 ? output2.includes("README.md") ? output2 : join10(findFilePath(output2), "README.md") : inputFile;
236457
+ if (clean && existsSync9(outputFilePath)) {
236448
236458
  if (outputFilePath === inputFile) {
236449
236459
  console.warn(
236450
236460
  "Skipping cleaning since output directory + file name is the same as input directory + file name."
@@ -236459,7 +236469,7 @@ var runProjectReadme = async (projectName, { templates, output: output2, clean =
236459
236469
  let newContent = readdirSync3(templates).reduce(
236460
236470
  (ret, fileName) => {
236461
236471
  console.info(`Using template "${fileName}" to format file...`);
236462
- const templateFilePath = join9(templates, fileName);
236472
+ const templateFilePath = join10(templates, fileName);
236463
236473
  const templateContent = readFileSync6(templateFilePath, "utf8");
236464
236474
  const section = findFileName(templateFilePath).replace(templates, "").replace("README.", "").replace(".md", "");
236465
236475
  return formatReadMeFromSectionName(section, templateContent, ret);
@@ -236467,8 +236477,8 @@ var runProjectReadme = async (projectName, { templates, output: output2, clean =
236467
236477
  readFileSync6(inputFile, "utf8")
236468
236478
  );
236469
236479
  let packageName = projectName;
236470
- const packageJsonPath = join9(findFilePath(inputFile), "package.json");
236471
- if (existsSync8(packageJsonPath)) {
236480
+ const packageJsonPath = join10(findFilePath(inputFile), "package.json");
236481
+ if (existsSync9(packageJsonPath)) {
236472
236482
  const packageJson = JSON.parse(
236473
236483
  readFileSync6(packageJsonPath, "utf8") ?? "{}"
236474
236484
  );
@@ -236484,8 +236494,8 @@ var runProjectReadme = async (projectName, { templates, output: output2, clean =
236484
236494
  }
236485
236495
  }
236486
236496
  if (newContent.includes("<!-- START executors -->")) {
236487
- const executorsJsonPath = join9(findFilePath(inputFile), "executors.json");
236488
- if (existsSync8(executorsJsonPath)) {
236497
+ const executorsJsonPath = join10(findFilePath(inputFile), "executors.json");
236498
+ if (existsSync9(executorsJsonPath)) {
236489
236499
  const executorsJson = JSON.parse(
236490
236500
  readFileSync6(executorsJsonPath, "utf8") ?? "{}"
236491
236501
  );
@@ -236500,11 +236510,11 @@ var runProjectReadme = async (projectName, { templates, output: output2, clean =
236500
236510
  }
236501
236511
  }
236502
236512
  if (newContent.includes("<!-- START generators -->")) {
236503
- const generatorsJsonPath = join9(
236513
+ const generatorsJsonPath = join10(
236504
236514
  findFilePath(inputFile),
236505
236515
  "generators.json"
236506
236516
  );
236507
- if (existsSync8(generatorsJsonPath)) {
236517
+ if (existsSync9(generatorsJsonPath)) {
236508
236518
  const generatorsJson = JSON.parse(
236509
236519
  readFileSync6(generatorsJsonPath, "utf8") ?? "{}"
236510
236520
  );
@@ -237029,7 +237039,7 @@ function resolveGeneratorData({
237029
237039
  }
237030
237040
 
237031
237041
  // packages/git-tools/src/release/release-config.ts
237032
- import { join as join10, relative as relative3 } from "node:path";
237042
+ import { join as join11, relative as relative3 } from "node:path";
237033
237043
  import { joinPathFragments as joinPathFragments2 } from "nx/src/devkit-exports.js";
237034
237044
  import { readJsonFile } from "nx/src/utils/fileutils.js";
237035
237045
  import { findMatchingProjects } from "nx/src/utils/find-matching-projects.js";
@@ -237286,12 +237296,12 @@ async function getDefaultProjects(projectGraph, projectFileMap) {
237286
237296
  }
237287
237297
  function isProjectPublic(project, projectGraph, projectFileMap) {
237288
237298
  const projectNode = projectGraph.nodes[project];
237289
- const packageJsonPath = join10(projectNode.data.root, "package.json");
237299
+ const packageJsonPath = join11(projectNode.data.root, "package.json");
237290
237300
  if (!projectFileMap[project]?.find((f7) => f7.file === packageJsonPath)) {
237291
237301
  return false;
237292
237302
  }
237293
237303
  try {
237294
- const fullPackageJsonPath = join10(workspaceRoot2, packageJsonPath);
237304
+ const fullPackageJsonPath = join11(workspaceRoot2, packageJsonPath);
237295
237305
  const packageJson = readJsonFile(fullPackageJsonPath);
237296
237306
  return !(packageJson.private === true);
237297
237307
  } catch (e3) {
@@ -237839,7 +237849,7 @@ void (async () => {
237839
237849
  try {
237840
237850
  handleProcess(config2);
237841
237851
  const compilerOptions = (0, import_fs_extra.readJsonSync)(
237842
- join11(config2.workspaceRoot ?? "./", "tsconfig.base.json")
237852
+ join12(config2.workspaceRoot ?? "./", "tsconfig.base.json")
237843
237853
  ).compilerOptions;
237844
237854
  (0, import_tsconfig_paths.register)(compilerOptions);
237845
237855
  const program2 = createProgram2(config2);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/git-tools",
3
- "version": "2.38.2",
3
+ "version": "2.39.0",
4
4
  "type": "module",
5
5
  "description": "⚡ A package containing various git tools used in Storm workspaces.",
6
6
  "repository": {
package/src/cli/index.js CHANGED
@@ -1488,7 +1488,7 @@ var require_jiti = __commonJS({
1488
1488
  if (0 === path13.length) return ".";
1489
1489
  const isUNCPath = (path13 = normalizeWindowsPath2(path13)).match(_UNC_REGEX2), isPathAbsolute = isAbsolute3(path13), trailingSeparator = "/" === path13[path13.length - 1];
1490
1490
  return 0 === (path13 = normalizeString2(path13, !isPathAbsolute)).length ? isPathAbsolute ? "/" : trailingSeparator ? "./" : "." : (trailingSeparator && (path13 += "/"), _DRIVE_LETTER_RE2.test(path13) && (path13 += "/"), isUNCPath ? isPathAbsolute ? `//${path13}` : `//./${path13}` : isPathAbsolute && !isAbsolute3(path13) ? `/${path13}` : path13);
1491
- }, join11 = function(...arguments_) {
1491
+ }, join12 = function(...arguments_) {
1492
1492
  if (0 === arguments_.length) return ".";
1493
1493
  let joined;
1494
1494
  for (const argument of arguments_) argument && argument.length > 0 && (void 0 === joined ? joined = argument : joined += `/${argument}`);
@@ -4101,13 +4101,13 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
4101
4101
  } catch (_a4) {
4102
4102
  return false;
4103
4103
  }
4104
- }(_filename) && (_filename = join11(_filename, "index.js")), true === opts.cache && (opts.cache = function() {
4104
+ }(_filename) && (_filename = join12(_filename, "index.js")), true === opts.cache && (opts.cache = function() {
4105
4105
  let _tmpDir = (0, external_os_namespaceObject.tmpdir)();
4106
4106
  if (process.env.TMPDIR && _tmpDir === process.cwd() && !process.env.JITI_RESPECT_TMPDIR_ENV) {
4107
4107
  const _env = process.env.TMPDIR;
4108
4108
  delete process.env.TMPDIR, _tmpDir = (0, external_os_namespaceObject.tmpdir)(), process.env.TMPDIR = _env;
4109
4109
  }
4110
- return join11(_tmpDir, "node-jiti");
4110
+ return join12(_tmpDir, "node-jiti");
4111
4111
  }()), opts.cache) try {
4112
4112
  if ((0, external_fs_.mkdirSync)(opts.cache, { recursive: true }), !function(filename) {
4113
4113
  try {
@@ -4132,7 +4132,7 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
4132
4132
  for (const [alias2, to3] of Object.entries(aliases2)) {
4133
4133
  if (!_path.startsWith(alias2)) continue;
4134
4134
  const _alias = hasTrailingSlash2(alias2) ? alias2.slice(0, -1) : alias2;
4135
- if (hasTrailingSlash2(_path[_alias.length])) return join11(to3, _path.slice(alias2.length));
4135
+ if (hasTrailingSlash2(_path[_alias.length])) return join12(to3, _path.slice(alias2.length));
4136
4136
  }
4137
4137
  return _path;
4138
4138
  }(id, alias)), opts.esmResolve) {
@@ -4160,7 +4160,7 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
4160
4160
  function transform3(topts) {
4161
4161
  let code = function(filename, source2, get3) {
4162
4162
  if (!opts.cache || !filename) return get3();
4163
- const sourceHash = ` /* v${opts.cacheVersion}-${md5(source2, 16)} */`, filebase = basename2(pathe_ff20891b_dirname(filename)) + "-" + basename2(filename), cacheFile = join11(opts.cache, filebase + "." + md5(filename) + ".js");
4163
+ const sourceHash = ` /* v${opts.cacheVersion}-${md5(source2, 16)} */`, filebase = basename2(pathe_ff20891b_dirname(filename)) + "-" + basename2(filename), cacheFile = join12(opts.cache, filebase + "." + md5(filename) + ".js");
4164
4164
  if ((0, external_fs_.existsSync)(cacheFile)) {
4165
4165
  const cacheSource = (0, external_fs_.readFileSync)(cacheFile, "utf8");
4166
4166
  if (cacheSource.endsWith(sourceHash)) return debug2("[cache hit]", filename, "~>", cacheFile), cacheSource;
@@ -4217,9 +4217,9 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
4217
4217
  var _a4;
4218
4218
  const id = evalOptions.id || (evalOptions.filename ? basename2(evalOptions.filename) : `_jitiEval.${evalOptions.ext || ".js"}`), filename = evalOptions.filename || _resolve3(id), ext = evalOptions.ext || extname5(filename), cache4 = evalOptions.cache || parentCache || {}, isTypescript = ".ts" === ext || ".mts" === ext || ".cts" === ext, isNativeModule = ".mjs" === ext || ".js" === ext && "module" === (null === (_a4 = function(path13) {
4219
4219
  for (; path13 && "." !== path13 && "/" !== path13; ) {
4220
- path13 = join11(path13, "..");
4220
+ path13 = join12(path13, "..");
4221
4221
  try {
4222
- const pkg = (0, external_fs_.readFileSync)(join11(path13, "package.json"), "utf8");
4222
+ const pkg = (0, external_fs_.readFileSync)(join12(path13, "package.json"), "utf8");
4223
4223
  try {
4224
4224
  return JSON.parse(pkg);
4225
4225
  } catch (_a5) {
@@ -37762,7 +37762,7 @@ var require_path_reservations = __commonJS({
37762
37762
  var assert7 = __require("assert");
37763
37763
  var normalize2 = require_normalize_unicode();
37764
37764
  var stripSlashes = require_strip_trailing_slashes();
37765
- var { join: join11 } = __require("path");
37765
+ var { join: join12 } = __require("path");
37766
37766
  var platform = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
37767
37767
  var isWindows = platform === "win32";
37768
37768
  module.exports = () => {
@@ -37771,7 +37771,7 @@ var require_path_reservations = __commonJS({
37771
37771
  const getDirs = (path13) => {
37772
37772
  const dirs = path13.split("/").slice(0, -1).reduce((set3, path14) => {
37773
37773
  if (set3.length) {
37774
- path14 = join11(set3[set3.length - 1], path14);
37774
+ path14 = join12(set3[set3.length - 1], path14);
37775
37775
  }
37776
37776
  set3.push(path14 || "/");
37777
37777
  return set3;
@@ -37839,7 +37839,7 @@ var require_path_reservations = __commonJS({
37839
37839
  };
37840
37840
  const reserve = (paths, fn7) => {
37841
37841
  paths = isWindows ? ["win32 parallelization disabled"] : paths.map((p4) => {
37842
- return stripSlashes(join11(normalize2(p4))).toLowerCase();
37842
+ return stripSlashes(join12(normalize2(p4))).toLowerCase();
37843
37843
  });
37844
37844
  const dirs = new Set(
37845
37845
  paths.map((path13) => getDirs(path13)).reduce((a3, b11) => a3.concat(b11))
@@ -73786,7 +73786,7 @@ var require_buffer_list = __commonJS({
73786
73786
  }
73787
73787
  }, {
73788
73788
  key: "join",
73789
- value: function join11(s3) {
73789
+ value: function join12(s3) {
73790
73790
  if (this.length === 0) return "";
73791
73791
  var p4 = this.head;
73792
73792
  var ret = "" + p4.data;
@@ -106602,7 +106602,7 @@ function lineSuffix(contents) {
106602
106602
  assertDoc(contents);
106603
106603
  return { type: DOC_TYPE_LINE_SUFFIX, contents };
106604
106604
  }
106605
- function join8(separator, docs) {
106605
+ function join9(separator, docs) {
106606
106606
  assertDoc(separator);
106607
106607
  assertDocArray(docs);
106608
106608
  const parts = [];
@@ -106962,7 +106962,7 @@ function cleanDoc(doc) {
106962
106962
  return mapDoc(doc, (currentDoc) => cleanDocFn(currentDoc));
106963
106963
  }
106964
106964
  function replaceEndOfLine(doc, replacement = literalline) {
106965
- return mapDoc(doc, (currentDoc) => typeof currentDoc === "string" ? join8(replacement, currentDoc.split("\n")) : currentDoc);
106965
+ return mapDoc(doc, (currentDoc) => typeof currentDoc === "string" ? join9(replacement, currentDoc.split("\n")) : currentDoc);
106966
106966
  }
106967
106967
  function canBreakFn(doc) {
106968
106968
  if (doc.type === DOC_TYPE_LINE) {
@@ -107659,7 +107659,7 @@ var init_doc = __esm({
107659
107659
  MODE_FLAT = Symbol("MODE_FLAT");
107660
107660
  CURSOR_PLACEHOLDER = Symbol("cursor");
107661
107661
  builders = {
107662
- join: join8,
107662
+ join: join9,
107663
107663
  line,
107664
107664
  softline,
107665
107665
  hardline,
@@ -228035,16 +228035,18 @@ var runCommit = async (commitConfig = "@storm-software/git-tools/commit/config.j
228035
228035
  };
228036
228036
 
228037
228037
  // packages/git-tools/src/commitlint/run-lint.ts
228038
+ import { existsSync as existsSync7 } from "fs";
228038
228039
  import { readFile as readFile4 } from "fs/promises";
228039
228040
  import childProcess2 from "node:child_process";
228041
+ import { join as join5 } from "node:path";
228040
228042
  var COMMIT_EDITMSG_PATH = ".git/COMMIT_EDITMSG";
228041
228043
  var runCommitLint = async (commitMessageArg) => {
228042
228044
  const config2 = await loadStormConfig();
228043
228045
  let commitMessage;
228044
228046
  if (commitMessageArg && commitMessageArg !== COMMIT_EDITMSG_PATH) {
228045
228047
  commitMessage = commitMessageArg;
228046
- } else if (commitMessageArg !== COMMIT_EDITMSG_PATH) {
228047
- commitMessage = await readCommitMessageFile();
228048
+ } else if (existsSync7(join5(config2.workspaceRoot, COMMIT_EDITMSG_PATH))) {
228049
+ commitMessage = await readCommitMessageFile(config2.workspaceRoot);
228048
228050
  }
228049
228051
  if (!commitMessage) {
228050
228052
  let gitLogCmd = "git log -1 --no-merges";
@@ -228055,21 +228057,29 @@ var runCommitLint = async (commitMessageArg) => {
228055
228057
  if (upstreamRemote) {
228056
228058
  const upstreamRemoteIdentifier = upstreamRemote.split(" ")[0]?.trim();
228057
228059
  if (!upstreamRemoteIdentifier) {
228058
- throw new Error(
228059
- `No upstream remote found for ${config2.name}.git. Skipping comparison.`
228060
+ writeWarning(
228061
+ `No upstream remote found for ${config2.name}.git. Skipping comparison.`,
228062
+ config2
228060
228063
  );
228064
+ return;
228061
228065
  }
228062
228066
  writeDebug(`Comparing against remote ${upstreamRemoteIdentifier}`);
228063
228067
  const currentBranch = childProcess2.execSync("git branch --show-current").toString().trim();
228064
228068
  gitLogCmd = gitLogCmd + ` ${currentBranch} ^${upstreamRemoteIdentifier}/main`;
228065
228069
  } else {
228066
- throw new Error(
228067
- `No upstream remote found for ${config2.name}.git. Skipping comparison against upstream main.`
228070
+ writeWarning(
228071
+ `No upstream remote found for ${config2.name}.git. Skipping comparison against upstream main.`,
228072
+ config2
228068
228073
  );
228074
+ return;
228069
228075
  }
228070
228076
  commitMessage = childProcess2.execSync(gitLogCmd).toString().trim();
228071
228077
  if (!commitMessage) {
228072
- throw new Error("No commits found. Skipping commit message validation.");
228078
+ writeWarning(
228079
+ "No commits found. Skipping commit message validation.",
228080
+ config2
228081
+ );
228082
+ return;
228073
228083
  }
228074
228084
  }
228075
228085
  const allowedTypes = Object.keys(
@@ -228094,26 +228104,26 @@ possible scopes: ${allowedScopes} (if unsure use "core")`;
228094
228104
  throw new Error(errorMessage);
228095
228105
  }
228096
228106
  };
228097
- var readCommitMessageFile = async () => {
228098
- return (await readFile4(COMMIT_EDITMSG_PATH, "utf8"))?.trim();
228107
+ var readCommitMessageFile = async (workspaceRoot3) => {
228108
+ return (await readFile4(join5(workspaceRoot3, COMMIT_EDITMSG_PATH), "utf8"))?.trim();
228099
228109
  };
228100
228110
 
228101
228111
  // packages/git-tools/src/readme/index.ts
228102
228112
  import {
228103
- existsSync as existsSync8,
228113
+ existsSync as existsSync9,
228104
228114
  readFileSync as readFileSync6,
228105
228115
  readdirSync as readdirSync3,
228106
228116
  rmSync,
228107
228117
  writeFileSync as writeFileSync3
228108
228118
  } from "node:fs";
228109
- import { join as join9 } from "node:path";
228119
+ import { join as join10 } from "node:path";
228110
228120
  import {
228111
228121
  createProjectGraphAsync as createProjectGraphAsync2,
228112
228122
  readProjectsConfigurationFromProjectGraph as readProjectsConfigurationFromProjectGraph2
228113
228123
  } from "nx/src/project-graph/project-graph.js";
228114
228124
 
228115
228125
  // packages/git-tools/src/utilities/file-utils.ts
228116
- import Path, { dirname as dirname3, isAbsolute as isAbsolute2, join as join5 } from "node:path";
228126
+ import Path, { dirname as dirname3, isAbsolute as isAbsolute2, join as join6 } from "node:path";
228117
228127
  function findFileName(filePath) {
228118
228128
  return filePath?.split(filePath?.includes(Path.sep) ? Path.sep : filePath?.includes("/") ? "/" : "\\")?.pop() ?? "";
228119
228129
  }
@@ -228123,7 +228133,7 @@ function findFilePath(filePath) {
228123
228133
 
228124
228134
  // packages/git-tools/src/readme/doctoc.ts
228125
228135
  import { readFileSync as readFileSync4, readdirSync as readdirSync2, statSync as statSync3, writeFileSync as writeFileSync2 } from "node:fs";
228126
- import { extname as extname3, join as join6 } from "node:path";
228136
+ import { extname as extname3, join as join7 } from "node:path";
228127
228137
 
228128
228138
  // node_modules/.pnpm/underscore@1.13.6/node_modules/underscore/modules/index.js
228129
228139
  var modules_exports = {};
@@ -231891,7 +231901,7 @@ function separateFilesAndDirs(fileInfos) {
231891
231901
  }
231892
231902
  function findMarkdownFiles(currentPath) {
231893
231903
  function getFileInfo3(entry) {
231894
- const target = join6(currentPath, entry);
231904
+ const target = join7(currentPath, entry);
231895
231905
  return {
231896
231906
  name: entry,
231897
231907
  path: target
@@ -231919,8 +231929,8 @@ function findMarkdownFiles(currentPath) {
231919
231929
  }
231920
231930
 
231921
231931
  // packages/git-tools/src/readme/nx-docs.ts
231922
- import { existsSync as existsSync7, readFileSync as readFileSync5 } from "node:fs";
231923
- import { join as join7 } from "node:path";
231932
+ import { existsSync as existsSync8, readFileSync as readFileSync5 } from "node:fs";
231933
+ import { join as join8 } from "node:path";
231924
231934
  var getExecutorMarkdown = (_packageName, executorsJsonFile, executorsJson) => {
231925
231935
  if (!executorsJson?.executors) {
231926
231936
  return "";
@@ -231934,8 +231944,8 @@ var getExecutorMarkdown = (_packageName, executorsJsonFile, executorsJson) => {
231934
231944
  let description = "";
231935
231945
  let required = [];
231936
231946
  if (executor.schema) {
231937
- const schemaJsonPath = join7(findFilePath(executorsJsonFile), executor.schema);
231938
- if (existsSync7(schemaJsonPath)) {
231947
+ const schemaJsonPath = join8(findFilePath(executorsJsonFile), executor.schema);
231948
+ if (existsSync8(schemaJsonPath)) {
231939
231949
  const schemaJson = JSON.parse(readFileSync5(schemaJsonPath, "utf8") ?? "{}");
231940
231950
  if (schemaJson.title) {
231941
231951
  title = `## ${schemaJson.title}
@@ -232027,8 +232037,8 @@ var getGeneratorMarkdown = (packageName, generatorsJsonFile, generatorsJson) =>
232027
232037
  let example = "";
232028
232038
  const required = [];
232029
232039
  if (generator.schema) {
232030
- const schemaJsonPath = join7(findFilePath(generatorsJsonFile), generator.schema);
232031
- if (existsSync7(schemaJsonPath)) {
232040
+ const schemaJsonPath = join8(findFilePath(generatorsJsonFile), generator.schema);
232041
+ if (existsSync8(schemaJsonPath)) {
232032
232042
  const schemaJson = JSON.parse(readFileSync5(schemaJsonPath, "utf8") ?? "{}");
232033
232043
  if (schemaJson.title) {
232034
232044
  title = `## ${schemaJson.title}
@@ -232230,11 +232240,11 @@ var runProjectReadme = async (projectName, { templates, output: output2, clean =
232230
232240
  });
232231
232241
  const projectConfigs = readProjectsConfigurationFromProjectGraph2(projectGraph);
232232
232242
  const project = projectConfigs.projects[projectName];
232233
- const inputFile = join9(project?.root ?? "./", "README.md");
232234
- if (existsSync8(inputFile)) {
232243
+ const inputFile = join10(project?.root ?? "./", "README.md");
232244
+ if (existsSync9(inputFile)) {
232235
232245
  console.info(`Formatting ${projectName}'s README file at "${inputFile}"`);
232236
- const outputFilePath = output2 ? output2.includes("README.md") ? output2 : join9(findFilePath(output2), "README.md") : inputFile;
232237
- if (clean && existsSync8(outputFilePath)) {
232246
+ const outputFilePath = output2 ? output2.includes("README.md") ? output2 : join10(findFilePath(output2), "README.md") : inputFile;
232247
+ if (clean && existsSync9(outputFilePath)) {
232238
232248
  if (outputFilePath === inputFile) {
232239
232249
  console.warn(
232240
232250
  "Skipping cleaning since output directory + file name is the same as input directory + file name."
@@ -232249,7 +232259,7 @@ var runProjectReadme = async (projectName, { templates, output: output2, clean =
232249
232259
  let newContent = readdirSync3(templates).reduce(
232250
232260
  (ret, fileName) => {
232251
232261
  console.info(`Using template "${fileName}" to format file...`);
232252
- const templateFilePath = join9(templates, fileName);
232262
+ const templateFilePath = join10(templates, fileName);
232253
232263
  const templateContent = readFileSync6(templateFilePath, "utf8");
232254
232264
  const section = findFileName(templateFilePath).replace(templates, "").replace("README.", "").replace(".md", "");
232255
232265
  return formatReadMeFromSectionName(section, templateContent, ret);
@@ -232257,8 +232267,8 @@ var runProjectReadme = async (projectName, { templates, output: output2, clean =
232257
232267
  readFileSync6(inputFile, "utf8")
232258
232268
  );
232259
232269
  let packageName = projectName;
232260
- const packageJsonPath = join9(findFilePath(inputFile), "package.json");
232261
- if (existsSync8(packageJsonPath)) {
232270
+ const packageJsonPath = join10(findFilePath(inputFile), "package.json");
232271
+ if (existsSync9(packageJsonPath)) {
232262
232272
  const packageJson = JSON.parse(
232263
232273
  readFileSync6(packageJsonPath, "utf8") ?? "{}"
232264
232274
  );
@@ -232274,8 +232284,8 @@ var runProjectReadme = async (projectName, { templates, output: output2, clean =
232274
232284
  }
232275
232285
  }
232276
232286
  if (newContent.includes("<!-- START executors -->")) {
232277
- const executorsJsonPath = join9(findFilePath(inputFile), "executors.json");
232278
- if (existsSync8(executorsJsonPath)) {
232287
+ const executorsJsonPath = join10(findFilePath(inputFile), "executors.json");
232288
+ if (existsSync9(executorsJsonPath)) {
232279
232289
  const executorsJson = JSON.parse(
232280
232290
  readFileSync6(executorsJsonPath, "utf8") ?? "{}"
232281
232291
  );
@@ -232290,11 +232300,11 @@ var runProjectReadme = async (projectName, { templates, output: output2, clean =
232290
232300
  }
232291
232301
  }
232292
232302
  if (newContent.includes("<!-- START generators -->")) {
232293
- const generatorsJsonPath = join9(
232303
+ const generatorsJsonPath = join10(
232294
232304
  findFilePath(inputFile),
232295
232305
  "generators.json"
232296
232306
  );
232297
- if (existsSync8(generatorsJsonPath)) {
232307
+ if (existsSync9(generatorsJsonPath)) {
232298
232308
  const generatorsJson = JSON.parse(
232299
232309
  readFileSync6(generatorsJsonPath, "utf8") ?? "{}"
232300
232310
  );
@@ -232819,7 +232829,7 @@ function resolveGeneratorData({
232819
232829
  }
232820
232830
 
232821
232831
  // packages/git-tools/src/release/release-config.ts
232822
- import { join as join10, relative as relative3 } from "node:path";
232832
+ import { join as join11, relative as relative3 } from "node:path";
232823
232833
  import { joinPathFragments as joinPathFragments2 } from "nx/src/devkit-exports.js";
232824
232834
  import { readJsonFile } from "nx/src/utils/fileutils.js";
232825
232835
  import { findMatchingProjects } from "nx/src/utils/find-matching-projects.js";
@@ -233076,12 +233086,12 @@ async function getDefaultProjects(projectGraph, projectFileMap) {
233076
233086
  }
233077
233087
  function isProjectPublic(project, projectGraph, projectFileMap) {
233078
233088
  const projectNode = projectGraph.nodes[project];
233079
- const packageJsonPath = join10(projectNode.data.root, "package.json");
233089
+ const packageJsonPath = join11(projectNode.data.root, "package.json");
233080
233090
  if (!projectFileMap[project]?.find((f7) => f7.file === packageJsonPath)) {
233081
233091
  return false;
233082
233092
  }
233083
233093
  try {
233084
- const fullPackageJsonPath = join10(workspaceRoot2, packageJsonPath);
233094
+ const fullPackageJsonPath = join11(workspaceRoot2, packageJsonPath);
233085
233095
  const packageJson = readJsonFile(fullPackageJsonPath);
233086
233096
  return !(packageJson.private === true);
233087
233097
  } catch (e3) {
package/src/index.js CHANGED
@@ -1488,7 +1488,7 @@ var require_jiti = __commonJS({
1488
1488
  if (0 === path13.length) return ".";
1489
1489
  const isUNCPath = (path13 = normalizeWindowsPath2(path13)).match(_UNC_REGEX2), isPathAbsolute = isAbsolute3(path13), trailingSeparator = "/" === path13[path13.length - 1];
1490
1490
  return 0 === (path13 = normalizeString2(path13, !isPathAbsolute)).length ? isPathAbsolute ? "/" : trailingSeparator ? "./" : "." : (trailingSeparator && (path13 += "/"), _DRIVE_LETTER_RE2.test(path13) && (path13 += "/"), isUNCPath ? isPathAbsolute ? `//${path13}` : `//./${path13}` : isPathAbsolute && !isAbsolute3(path13) ? `/${path13}` : path13);
1491
- }, join11 = function(...arguments_) {
1491
+ }, join12 = function(...arguments_) {
1492
1492
  if (0 === arguments_.length) return ".";
1493
1493
  let joined;
1494
1494
  for (const argument of arguments_) argument && argument.length > 0 && (void 0 === joined ? joined = argument : joined += `/${argument}`);
@@ -4101,13 +4101,13 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
4101
4101
  } catch (_a4) {
4102
4102
  return false;
4103
4103
  }
4104
- }(_filename) && (_filename = join11(_filename, "index.js")), true === opts.cache && (opts.cache = function() {
4104
+ }(_filename) && (_filename = join12(_filename, "index.js")), true === opts.cache && (opts.cache = function() {
4105
4105
  let _tmpDir = (0, external_os_namespaceObject.tmpdir)();
4106
4106
  if (process.env.TMPDIR && _tmpDir === process.cwd() && !process.env.JITI_RESPECT_TMPDIR_ENV) {
4107
4107
  const _env = process.env.TMPDIR;
4108
4108
  delete process.env.TMPDIR, _tmpDir = (0, external_os_namespaceObject.tmpdir)(), process.env.TMPDIR = _env;
4109
4109
  }
4110
- return join11(_tmpDir, "node-jiti");
4110
+ return join12(_tmpDir, "node-jiti");
4111
4111
  }()), opts.cache) try {
4112
4112
  if ((0, external_fs_.mkdirSync)(opts.cache, { recursive: true }), !function(filename) {
4113
4113
  try {
@@ -4132,7 +4132,7 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
4132
4132
  for (const [alias2, to3] of Object.entries(aliases2)) {
4133
4133
  if (!_path.startsWith(alias2)) continue;
4134
4134
  const _alias = hasTrailingSlash2(alias2) ? alias2.slice(0, -1) : alias2;
4135
- if (hasTrailingSlash2(_path[_alias.length])) return join11(to3, _path.slice(alias2.length));
4135
+ if (hasTrailingSlash2(_path[_alias.length])) return join12(to3, _path.slice(alias2.length));
4136
4136
  }
4137
4137
  return _path;
4138
4138
  }(id, alias)), opts.esmResolve) {
@@ -4160,7 +4160,7 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
4160
4160
  function transform3(topts) {
4161
4161
  let code = function(filename, source2, get3) {
4162
4162
  if (!opts.cache || !filename) return get3();
4163
- const sourceHash = ` /* v${opts.cacheVersion}-${md5(source2, 16)} */`, filebase = basename2(pathe_ff20891b_dirname(filename)) + "-" + basename2(filename), cacheFile = join11(opts.cache, filebase + "." + md5(filename) + ".js");
4163
+ const sourceHash = ` /* v${opts.cacheVersion}-${md5(source2, 16)} */`, filebase = basename2(pathe_ff20891b_dirname(filename)) + "-" + basename2(filename), cacheFile = join12(opts.cache, filebase + "." + md5(filename) + ".js");
4164
4164
  if ((0, external_fs_.existsSync)(cacheFile)) {
4165
4165
  const cacheSource = (0, external_fs_.readFileSync)(cacheFile, "utf8");
4166
4166
  if (cacheSource.endsWith(sourceHash)) return debug2("[cache hit]", filename, "~>", cacheFile), cacheSource;
@@ -4217,9 +4217,9 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
4217
4217
  var _a4;
4218
4218
  const id = evalOptions.id || (evalOptions.filename ? basename2(evalOptions.filename) : `_jitiEval.${evalOptions.ext || ".js"}`), filename = evalOptions.filename || _resolve3(id), ext = evalOptions.ext || extname5(filename), cache4 = evalOptions.cache || parentCache || {}, isTypescript = ".ts" === ext || ".mts" === ext || ".cts" === ext, isNativeModule = ".mjs" === ext || ".js" === ext && "module" === (null === (_a4 = function(path13) {
4219
4219
  for (; path13 && "." !== path13 && "/" !== path13; ) {
4220
- path13 = join11(path13, "..");
4220
+ path13 = join12(path13, "..");
4221
4221
  try {
4222
- const pkg = (0, external_fs_.readFileSync)(join11(path13, "package.json"), "utf8");
4222
+ const pkg = (0, external_fs_.readFileSync)(join12(path13, "package.json"), "utf8");
4223
4223
  try {
4224
4224
  return JSON.parse(pkg);
4225
4225
  } catch (_a5) {
@@ -37762,7 +37762,7 @@ var require_path_reservations = __commonJS({
37762
37762
  var assert7 = __require("assert");
37763
37763
  var normalize2 = require_normalize_unicode();
37764
37764
  var stripSlashes = require_strip_trailing_slashes();
37765
- var { join: join11 } = __require("path");
37765
+ var { join: join12 } = __require("path");
37766
37766
  var platform = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
37767
37767
  var isWindows = platform === "win32";
37768
37768
  module.exports = () => {
@@ -37771,7 +37771,7 @@ var require_path_reservations = __commonJS({
37771
37771
  const getDirs = (path13) => {
37772
37772
  const dirs = path13.split("/").slice(0, -1).reduce((set3, path14) => {
37773
37773
  if (set3.length) {
37774
- path14 = join11(set3[set3.length - 1], path14);
37774
+ path14 = join12(set3[set3.length - 1], path14);
37775
37775
  }
37776
37776
  set3.push(path14 || "/");
37777
37777
  return set3;
@@ -37839,7 +37839,7 @@ var require_path_reservations = __commonJS({
37839
37839
  };
37840
37840
  const reserve = (paths, fn7) => {
37841
37841
  paths = isWindows ? ["win32 parallelization disabled"] : paths.map((p4) => {
37842
- return stripSlashes(join11(normalize2(p4))).toLowerCase();
37842
+ return stripSlashes(join12(normalize2(p4))).toLowerCase();
37843
37843
  });
37844
37844
  const dirs = new Set(
37845
37845
  paths.map((path13) => getDirs(path13)).reduce((a3, b11) => a3.concat(b11))
@@ -73786,7 +73786,7 @@ var require_buffer_list = __commonJS({
73786
73786
  }
73787
73787
  }, {
73788
73788
  key: "join",
73789
- value: function join11(s3) {
73789
+ value: function join12(s3) {
73790
73790
  if (this.length === 0) return "";
73791
73791
  var p4 = this.head;
73792
73792
  var ret = "" + p4.data;
@@ -106602,7 +106602,7 @@ function lineSuffix(contents) {
106602
106602
  assertDoc(contents);
106603
106603
  return { type: DOC_TYPE_LINE_SUFFIX, contents };
106604
106604
  }
106605
- function join8(separator, docs) {
106605
+ function join9(separator, docs) {
106606
106606
  assertDoc(separator);
106607
106607
  assertDocArray(docs);
106608
106608
  const parts = [];
@@ -106962,7 +106962,7 @@ function cleanDoc(doc) {
106962
106962
  return mapDoc(doc, (currentDoc) => cleanDocFn(currentDoc));
106963
106963
  }
106964
106964
  function replaceEndOfLine(doc, replacement = literalline) {
106965
- return mapDoc(doc, (currentDoc) => typeof currentDoc === "string" ? join8(replacement, currentDoc.split("\n")) : currentDoc);
106965
+ return mapDoc(doc, (currentDoc) => typeof currentDoc === "string" ? join9(replacement, currentDoc.split("\n")) : currentDoc);
106966
106966
  }
106967
106967
  function canBreakFn(doc) {
106968
106968
  if (doc.type === DOC_TYPE_LINE) {
@@ -107659,7 +107659,7 @@ var init_doc = __esm({
107659
107659
  MODE_FLAT = Symbol("MODE_FLAT");
107660
107660
  CURSOR_PLACEHOLDER = Symbol("cursor");
107661
107661
  builders = {
107662
- join: join8,
107662
+ join: join9,
107663
107663
  line,
107664
107664
  softline,
107665
107665
  hardline,
@@ -228137,16 +228137,18 @@ var runCommit = async (commitConfig = "@storm-software/git-tools/commit/config.j
228137
228137
  };
228138
228138
 
228139
228139
  // packages/git-tools/src/commitlint/run-lint.ts
228140
+ import { existsSync as existsSync7 } from "fs";
228140
228141
  import { readFile as readFile4 } from "fs/promises";
228141
228142
  import childProcess2 from "node:child_process";
228143
+ import { join as join5 } from "node:path";
228142
228144
  var COMMIT_EDITMSG_PATH = ".git/COMMIT_EDITMSG";
228143
228145
  var runCommitLint = async (commitMessageArg) => {
228144
228146
  const config2 = await loadStormConfig();
228145
228147
  let commitMessage;
228146
228148
  if (commitMessageArg && commitMessageArg !== COMMIT_EDITMSG_PATH) {
228147
228149
  commitMessage = commitMessageArg;
228148
- } else if (commitMessageArg !== COMMIT_EDITMSG_PATH) {
228149
- commitMessage = await readCommitMessageFile();
228150
+ } else if (existsSync7(join5(config2.workspaceRoot, COMMIT_EDITMSG_PATH))) {
228151
+ commitMessage = await readCommitMessageFile(config2.workspaceRoot);
228150
228152
  }
228151
228153
  if (!commitMessage) {
228152
228154
  let gitLogCmd = "git log -1 --no-merges";
@@ -228157,21 +228159,29 @@ var runCommitLint = async (commitMessageArg) => {
228157
228159
  if (upstreamRemote) {
228158
228160
  const upstreamRemoteIdentifier = upstreamRemote.split(" ")[0]?.trim();
228159
228161
  if (!upstreamRemoteIdentifier) {
228160
- throw new Error(
228161
- `No upstream remote found for ${config2.name}.git. Skipping comparison.`
228162
+ writeWarning(
228163
+ `No upstream remote found for ${config2.name}.git. Skipping comparison.`,
228164
+ config2
228162
228165
  );
228166
+ return;
228163
228167
  }
228164
228168
  writeDebug(`Comparing against remote ${upstreamRemoteIdentifier}`);
228165
228169
  const currentBranch = childProcess2.execSync("git branch --show-current").toString().trim();
228166
228170
  gitLogCmd = gitLogCmd + ` ${currentBranch} ^${upstreamRemoteIdentifier}/main`;
228167
228171
  } else {
228168
- throw new Error(
228169
- `No upstream remote found for ${config2.name}.git. Skipping comparison against upstream main.`
228172
+ writeWarning(
228173
+ `No upstream remote found for ${config2.name}.git. Skipping comparison against upstream main.`,
228174
+ config2
228170
228175
  );
228176
+ return;
228171
228177
  }
228172
228178
  commitMessage = childProcess2.execSync(gitLogCmd).toString().trim();
228173
228179
  if (!commitMessage) {
228174
- throw new Error("No commits found. Skipping commit message validation.");
228180
+ writeWarning(
228181
+ "No commits found. Skipping commit message validation.",
228182
+ config2
228183
+ );
228184
+ return;
228175
228185
  }
228176
228186
  }
228177
228187
  const allowedTypes = Object.keys(
@@ -228196,26 +228206,26 @@ possible scopes: ${allowedScopes} (if unsure use "core")`;
228196
228206
  throw new Error(errorMessage);
228197
228207
  }
228198
228208
  };
228199
- var readCommitMessageFile = async () => {
228200
- return (await readFile4(COMMIT_EDITMSG_PATH, "utf8"))?.trim();
228209
+ var readCommitMessageFile = async (workspaceRoot3) => {
228210
+ return (await readFile4(join5(workspaceRoot3, COMMIT_EDITMSG_PATH), "utf8"))?.trim();
228201
228211
  };
228202
228212
 
228203
228213
  // packages/git-tools/src/readme/index.ts
228204
228214
  import {
228205
- existsSync as existsSync8,
228215
+ existsSync as existsSync9,
228206
228216
  readFileSync as readFileSync6,
228207
228217
  readdirSync as readdirSync3,
228208
228218
  rmSync,
228209
228219
  writeFileSync as writeFileSync3
228210
228220
  } from "node:fs";
228211
- import { join as join9 } from "node:path";
228221
+ import { join as join10 } from "node:path";
228212
228222
  import {
228213
228223
  createProjectGraphAsync as createProjectGraphAsync2,
228214
228224
  readProjectsConfigurationFromProjectGraph as readProjectsConfigurationFromProjectGraph2
228215
228225
  } from "nx/src/project-graph/project-graph.js";
228216
228226
 
228217
228227
  // packages/git-tools/src/utilities/file-utils.ts
228218
- import Path, { dirname as dirname3, isAbsolute as isAbsolute2, join as join5 } from "node:path";
228228
+ import Path, { dirname as dirname3, isAbsolute as isAbsolute2, join as join6 } from "node:path";
228219
228229
  function findFileName(filePath) {
228220
228230
  return filePath?.split(filePath?.includes(Path.sep) ? Path.sep : filePath?.includes("/") ? "/" : "\\")?.pop() ?? "";
228221
228231
  }
@@ -228227,7 +228237,7 @@ function resolvePath2(filePath, basePath) {
228227
228237
  return filePath;
228228
228238
  }
228229
228239
  if (basePath) {
228230
- return join5(dirname3(basePath), filePath);
228240
+ return join6(dirname3(basePath), filePath);
228231
228241
  }
228232
228242
  return null;
228233
228243
  }
@@ -228238,7 +228248,7 @@ function renameFile(filePath, newFileName) {
228238
228248
 
228239
228249
  // packages/git-tools/src/readme/doctoc.ts
228240
228250
  import { readFileSync as readFileSync4, readdirSync as readdirSync2, statSync as statSync3, writeFileSync as writeFileSync2 } from "node:fs";
228241
- import { extname as extname3, join as join6 } from "node:path";
228251
+ import { extname as extname3, join as join7 } from "node:path";
228242
228252
 
228243
228253
  // node_modules/.pnpm/underscore@1.13.6/node_modules/underscore/modules/index.js
228244
228254
  var modules_exports = {};
@@ -232006,7 +232016,7 @@ function separateFilesAndDirs(fileInfos) {
232006
232016
  }
232007
232017
  function findMarkdownFiles(currentPath) {
232008
232018
  function getFileInfo3(entry) {
232009
- const target = join6(currentPath, entry);
232019
+ const target = join7(currentPath, entry);
232010
232020
  return {
232011
232021
  name: entry,
232012
232022
  path: target
@@ -232034,8 +232044,8 @@ function findMarkdownFiles(currentPath) {
232034
232044
  }
232035
232045
 
232036
232046
  // packages/git-tools/src/readme/nx-docs.ts
232037
- import { existsSync as existsSync7, readFileSync as readFileSync5 } from "node:fs";
232038
- import { join as join7 } from "node:path";
232047
+ import { existsSync as existsSync8, readFileSync as readFileSync5 } from "node:fs";
232048
+ import { join as join8 } from "node:path";
232039
232049
  var getExecutorMarkdown = (_packageName, executorsJsonFile, executorsJson) => {
232040
232050
  if (!executorsJson?.executors) {
232041
232051
  return "";
@@ -232049,8 +232059,8 @@ var getExecutorMarkdown = (_packageName, executorsJsonFile, executorsJson) => {
232049
232059
  let description = "";
232050
232060
  let required = [];
232051
232061
  if (executor.schema) {
232052
- const schemaJsonPath = join7(findFilePath(executorsJsonFile), executor.schema);
232053
- if (existsSync7(schemaJsonPath)) {
232062
+ const schemaJsonPath = join8(findFilePath(executorsJsonFile), executor.schema);
232063
+ if (existsSync8(schemaJsonPath)) {
232054
232064
  const schemaJson = JSON.parse(readFileSync5(schemaJsonPath, "utf8") ?? "{}");
232055
232065
  if (schemaJson.title) {
232056
232066
  title = `## ${schemaJson.title}
@@ -232142,8 +232152,8 @@ var getGeneratorMarkdown = (packageName, generatorsJsonFile, generatorsJson) =>
232142
232152
  let example = "";
232143
232153
  const required = [];
232144
232154
  if (generator.schema) {
232145
- const schemaJsonPath = join7(findFilePath(generatorsJsonFile), generator.schema);
232146
- if (existsSync7(schemaJsonPath)) {
232155
+ const schemaJsonPath = join8(findFilePath(generatorsJsonFile), generator.schema);
232156
+ if (existsSync8(schemaJsonPath)) {
232147
232157
  const schemaJson = JSON.parse(readFileSync5(schemaJsonPath, "utf8") ?? "{}");
232148
232158
  if (schemaJson.title) {
232149
232159
  title = `## ${schemaJson.title}
@@ -232345,11 +232355,11 @@ var runProjectReadme = async (projectName, { templates, output: output2, clean =
232345
232355
  });
232346
232356
  const projectConfigs = readProjectsConfigurationFromProjectGraph2(projectGraph);
232347
232357
  const project = projectConfigs.projects[projectName];
232348
- const inputFile = join9(project?.root ?? "./", "README.md");
232349
- if (existsSync8(inputFile)) {
232358
+ const inputFile = join10(project?.root ?? "./", "README.md");
232359
+ if (existsSync9(inputFile)) {
232350
232360
  console.info(`Formatting ${projectName}'s README file at "${inputFile}"`);
232351
- const outputFilePath = output2 ? output2.includes("README.md") ? output2 : join9(findFilePath(output2), "README.md") : inputFile;
232352
- if (clean && existsSync8(outputFilePath)) {
232361
+ const outputFilePath = output2 ? output2.includes("README.md") ? output2 : join10(findFilePath(output2), "README.md") : inputFile;
232362
+ if (clean && existsSync9(outputFilePath)) {
232353
232363
  if (outputFilePath === inputFile) {
232354
232364
  console.warn(
232355
232365
  "Skipping cleaning since output directory + file name is the same as input directory + file name."
@@ -232364,7 +232374,7 @@ var runProjectReadme = async (projectName, { templates, output: output2, clean =
232364
232374
  let newContent = readdirSync3(templates).reduce(
232365
232375
  (ret, fileName) => {
232366
232376
  console.info(`Using template "${fileName}" to format file...`);
232367
- const templateFilePath = join9(templates, fileName);
232377
+ const templateFilePath = join10(templates, fileName);
232368
232378
  const templateContent = readFileSync6(templateFilePath, "utf8");
232369
232379
  const section = findFileName(templateFilePath).replace(templates, "").replace("README.", "").replace(".md", "");
232370
232380
  return formatReadMeFromSectionName(section, templateContent, ret);
@@ -232372,8 +232382,8 @@ var runProjectReadme = async (projectName, { templates, output: output2, clean =
232372
232382
  readFileSync6(inputFile, "utf8")
232373
232383
  );
232374
232384
  let packageName = projectName;
232375
- const packageJsonPath = join9(findFilePath(inputFile), "package.json");
232376
- if (existsSync8(packageJsonPath)) {
232385
+ const packageJsonPath = join10(findFilePath(inputFile), "package.json");
232386
+ if (existsSync9(packageJsonPath)) {
232377
232387
  const packageJson = JSON.parse(
232378
232388
  readFileSync6(packageJsonPath, "utf8") ?? "{}"
232379
232389
  );
@@ -232389,8 +232399,8 @@ var runProjectReadme = async (projectName, { templates, output: output2, clean =
232389
232399
  }
232390
232400
  }
232391
232401
  if (newContent.includes("<!-- START executors -->")) {
232392
- const executorsJsonPath = join9(findFilePath(inputFile), "executors.json");
232393
- if (existsSync8(executorsJsonPath)) {
232402
+ const executorsJsonPath = join10(findFilePath(inputFile), "executors.json");
232403
+ if (existsSync9(executorsJsonPath)) {
232394
232404
  const executorsJson = JSON.parse(
232395
232405
  readFileSync6(executorsJsonPath, "utf8") ?? "{}"
232396
232406
  );
@@ -232405,11 +232415,11 @@ var runProjectReadme = async (projectName, { templates, output: output2, clean =
232405
232415
  }
232406
232416
  }
232407
232417
  if (newContent.includes("<!-- START generators -->")) {
232408
- const generatorsJsonPath = join9(
232418
+ const generatorsJsonPath = join10(
232409
232419
  findFilePath(inputFile),
232410
232420
  "generators.json"
232411
232421
  );
232412
- if (existsSync8(generatorsJsonPath)) {
232422
+ if (existsSync9(generatorsJsonPath)) {
232413
232423
  const generatorsJson = JSON.parse(
232414
232424
  readFileSync6(generatorsJsonPath, "utf8") ?? "{}"
232415
232425
  );
@@ -232934,7 +232944,7 @@ function resolveGeneratorData({
232934
232944
  }
232935
232945
 
232936
232946
  // packages/git-tools/src/release/release-config.ts
232937
- import { join as join10, relative as relative3 } from "node:path";
232947
+ import { join as join11, relative as relative3 } from "node:path";
232938
232948
  import { joinPathFragments as joinPathFragments2 } from "nx/src/devkit-exports.js";
232939
232949
  import { readJsonFile } from "nx/src/utils/fileutils.js";
232940
232950
  import { findMatchingProjects } from "nx/src/utils/find-matching-projects.js";
@@ -233191,12 +233201,12 @@ async function getDefaultProjects(projectGraph, projectFileMap) {
233191
233201
  }
233192
233202
  function isProjectPublic(project, projectGraph, projectFileMap) {
233193
233203
  const projectNode = projectGraph.nodes[project];
233194
- const packageJsonPath = join10(projectNode.data.root, "package.json");
233204
+ const packageJsonPath = join11(projectNode.data.root, "package.json");
233195
233205
  if (!projectFileMap[project]?.find((f7) => f7.file === packageJsonPath)) {
233196
233206
  return false;
233197
233207
  }
233198
233208
  try {
233199
- const fullPackageJsonPath = join10(workspaceRoot2, packageJsonPath);
233209
+ const fullPackageJsonPath = join11(workspaceRoot2, packageJsonPath);
233200
233210
  const packageJson = readJsonFile(fullPackageJsonPath);
233201
233211
  return !(packageJson.private === true);
233202
233212
  } catch (e3) {