@storm-software/git-tools 2.38.1 → 2.38.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/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## 2.38.3 (2024-07-31)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ - **git-tools:** Resolved issue when `commitlint` is called without a `message` parameter ([624b24bc](https://github.com/storm-software/storm-ops/commit/624b24bc))
7
+
8
+ ## 2.38.2 (2024-07-31)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ - **build-tools:** Resolved issue iterating unbuild entry files ([17703513](https://github.com/storm-software/storm-ops/commit/17703513))
14
+
1
15
  ## 2.38.1 (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.0-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.2-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
@@ -232251,40 +232251,43 @@ var COMMIT_EDITMSG_PATH = ".git/COMMIT_EDITMSG";
232251
232251
  var runCommitLint = async (commitMessageArg) => {
232252
232252
  const config2 = await loadStormConfig();
232253
232253
  let commitMessage;
232254
- if (!commitMessageArg) {
232254
+ if (commitMessageArg && commitMessageArg !== COMMIT_EDITMSG_PATH) {
232255
+ commitMessage = commitMessageArg;
232256
+ } else if (commitMessageArg !== COMMIT_EDITMSG_PATH) {
232257
+ commitMessage = await readCommitMessageFile();
232258
+ }
232259
+ if (!commitMessage) {
232255
232260
  let gitLogCmd = "git log -1 --no-merges";
232256
232261
  const gitRemotes = childProcess2.execSync("git remote -v").toString().trim().split("\n");
232257
232262
  const upstreamRemote = gitRemotes.find(
232258
- (remote) => remote.includes(`${config2.namespace}/${config2.name}.git`)
232263
+ (remote) => remote.includes(`${config2.name}.git`)
232259
232264
  );
232260
232265
  if (upstreamRemote) {
232261
232266
  const upstreamRemoteIdentifier = upstreamRemote.split(" ")[0]?.trim();
232262
232267
  if (!upstreamRemoteIdentifier) {
232263
- throw new Error(
232264
- `No upstream remote found for ${config2.namespace}/${config2.name}.git. Skipping comparison.`
232268
+ writeWarning(
232269
+ `No upstream remote found for ${config2.name}.git. Skipping comparison.`,
232270
+ config2
232265
232271
  );
232272
+ return;
232266
232273
  }
232267
232274
  writeDebug(`Comparing against remote ${upstreamRemoteIdentifier}`);
232268
232275
  const currentBranch = childProcess2.execSync("git branch --show-current").toString().trim();
232269
232276
  gitLogCmd = gitLogCmd + ` ${currentBranch} ^${upstreamRemoteIdentifier}/main`;
232270
232277
  } else {
232271
- throw new Error(
232272
- `No upstream remote found for ${config2.namespace}/${config2.name}.git. Skipping comparison against upstream main.`
232278
+ writeWarning(
232279
+ `No upstream remote found for ${config2.name}.git. Skipping comparison against upstream main.`,
232280
+ config2
232273
232281
  );
232282
+ return;
232274
232283
  }
232275
232284
  commitMessage = childProcess2.execSync(gitLogCmd).toString().trim();
232276
232285
  if (!commitMessage) {
232277
- throw new Error("No commits found. Skipping commit message validation.");
232278
- }
232279
- } else if (commitMessageArg !== COMMIT_EDITMSG_PATH) {
232280
- commitMessage = commitMessageArg;
232281
- }
232282
- if (!commitMessage) {
232283
- commitMessage = await readCommitMessageFile();
232284
- if (!commitMessage) {
232285
- throw new Error(
232286
- "No commit message found. Skipping commit message validation."
232286
+ writeWarning(
232287
+ "No commits found. Skipping commit message validation.",
232288
+ config2
232287
232289
  );
232290
+ return;
232288
232291
  }
232289
232292
  }
232290
232293
  const allowedTypes = Object.keys(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/git-tools",
3
- "version": "2.38.1",
3
+ "version": "2.38.3",
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
@@ -228041,40 +228041,43 @@ var COMMIT_EDITMSG_PATH = ".git/COMMIT_EDITMSG";
228041
228041
  var runCommitLint = async (commitMessageArg) => {
228042
228042
  const config2 = await loadStormConfig();
228043
228043
  let commitMessage;
228044
- if (!commitMessageArg) {
228044
+ if (commitMessageArg && commitMessageArg !== COMMIT_EDITMSG_PATH) {
228045
+ commitMessage = commitMessageArg;
228046
+ } else if (commitMessageArg !== COMMIT_EDITMSG_PATH) {
228047
+ commitMessage = await readCommitMessageFile();
228048
+ }
228049
+ if (!commitMessage) {
228045
228050
  let gitLogCmd = "git log -1 --no-merges";
228046
228051
  const gitRemotes = childProcess2.execSync("git remote -v").toString().trim().split("\n");
228047
228052
  const upstreamRemote = gitRemotes.find(
228048
- (remote) => remote.includes(`${config2.namespace}/${config2.name}.git`)
228053
+ (remote) => remote.includes(`${config2.name}.git`)
228049
228054
  );
228050
228055
  if (upstreamRemote) {
228051
228056
  const upstreamRemoteIdentifier = upstreamRemote.split(" ")[0]?.trim();
228052
228057
  if (!upstreamRemoteIdentifier) {
228053
- throw new Error(
228054
- `No upstream remote found for ${config2.namespace}/${config2.name}.git. Skipping comparison.`
228058
+ writeWarning(
228059
+ `No upstream remote found for ${config2.name}.git. Skipping comparison.`,
228060
+ config2
228055
228061
  );
228062
+ return;
228056
228063
  }
228057
228064
  writeDebug(`Comparing against remote ${upstreamRemoteIdentifier}`);
228058
228065
  const currentBranch = childProcess2.execSync("git branch --show-current").toString().trim();
228059
228066
  gitLogCmd = gitLogCmd + ` ${currentBranch} ^${upstreamRemoteIdentifier}/main`;
228060
228067
  } else {
228061
- throw new Error(
228062
- `No upstream remote found for ${config2.namespace}/${config2.name}.git. Skipping comparison against upstream main.`
228068
+ writeWarning(
228069
+ `No upstream remote found for ${config2.name}.git. Skipping comparison against upstream main.`,
228070
+ config2
228063
228071
  );
228072
+ return;
228064
228073
  }
228065
228074
  commitMessage = childProcess2.execSync(gitLogCmd).toString().trim();
228066
228075
  if (!commitMessage) {
228067
- throw new Error("No commits found. Skipping commit message validation.");
228068
- }
228069
- } else if (commitMessageArg !== COMMIT_EDITMSG_PATH) {
228070
- commitMessage = commitMessageArg;
228071
- }
228072
- if (!commitMessage) {
228073
- commitMessage = await readCommitMessageFile();
228074
- if (!commitMessage) {
228075
- throw new Error(
228076
- "No commit message found. Skipping commit message validation."
228076
+ writeWarning(
228077
+ "No commits found. Skipping commit message validation.",
228078
+ config2
228077
228079
  );
228080
+ return;
228078
228081
  }
228079
228082
  }
228080
228083
  const allowedTypes = Object.keys(
package/src/index.js CHANGED
@@ -228143,40 +228143,43 @@ var COMMIT_EDITMSG_PATH = ".git/COMMIT_EDITMSG";
228143
228143
  var runCommitLint = async (commitMessageArg) => {
228144
228144
  const config2 = await loadStormConfig();
228145
228145
  let commitMessage;
228146
- if (!commitMessageArg) {
228146
+ if (commitMessageArg && commitMessageArg !== COMMIT_EDITMSG_PATH) {
228147
+ commitMessage = commitMessageArg;
228148
+ } else if (commitMessageArg !== COMMIT_EDITMSG_PATH) {
228149
+ commitMessage = await readCommitMessageFile();
228150
+ }
228151
+ if (!commitMessage) {
228147
228152
  let gitLogCmd = "git log -1 --no-merges";
228148
228153
  const gitRemotes = childProcess2.execSync("git remote -v").toString().trim().split("\n");
228149
228154
  const upstreamRemote = gitRemotes.find(
228150
- (remote) => remote.includes(`${config2.namespace}/${config2.name}.git`)
228155
+ (remote) => remote.includes(`${config2.name}.git`)
228151
228156
  );
228152
228157
  if (upstreamRemote) {
228153
228158
  const upstreamRemoteIdentifier = upstreamRemote.split(" ")[0]?.trim();
228154
228159
  if (!upstreamRemoteIdentifier) {
228155
- throw new Error(
228156
- `No upstream remote found for ${config2.namespace}/${config2.name}.git. Skipping comparison.`
228160
+ writeWarning(
228161
+ `No upstream remote found for ${config2.name}.git. Skipping comparison.`,
228162
+ config2
228157
228163
  );
228164
+ return;
228158
228165
  }
228159
228166
  writeDebug(`Comparing against remote ${upstreamRemoteIdentifier}`);
228160
228167
  const currentBranch = childProcess2.execSync("git branch --show-current").toString().trim();
228161
228168
  gitLogCmd = gitLogCmd + ` ${currentBranch} ^${upstreamRemoteIdentifier}/main`;
228162
228169
  } else {
228163
- throw new Error(
228164
- `No upstream remote found for ${config2.namespace}/${config2.name}.git. Skipping comparison against upstream main.`
228170
+ writeWarning(
228171
+ `No upstream remote found for ${config2.name}.git. Skipping comparison against upstream main.`,
228172
+ config2
228165
228173
  );
228174
+ return;
228166
228175
  }
228167
228176
  commitMessage = childProcess2.execSync(gitLogCmd).toString().trim();
228168
228177
  if (!commitMessage) {
228169
- throw new Error("No commits found. Skipping commit message validation.");
228170
- }
228171
- } else if (commitMessageArg !== COMMIT_EDITMSG_PATH) {
228172
- commitMessage = commitMessageArg;
228173
- }
228174
- if (!commitMessage) {
228175
- commitMessage = await readCommitMessageFile();
228176
- if (!commitMessage) {
228177
- throw new Error(
228178
- "No commit message found. Skipping commit message validation."
228178
+ writeWarning(
228179
+ "No commits found. Skipping commit message validation.",
228180
+ config2
228179
228181
  );
228182
+ return;
228180
228183
  }
228181
228184
  }
228182
228185
  const allowedTypes = Object.keys(