Compare commits

...

2 Commits

Author SHA1 Message Date
jkunz db3b75a65d v2.19.3
Default (tags) / security (push) Failing after 1s
Default (tags) / test (push) Failing after 0s
Default (tags) / release (push) Has been skipped
Default (tags) / metadata (push) Has been skipped
2026-05-24 05:22:14 +00:00
jkunz d5027174dd fix(commit): handle no-change analysis 2026-05-24 05:21:47 +00:00
5 changed files with 1850 additions and 188 deletions
+8
View File
@@ -3,6 +3,14 @@
## Pending
## 2026-05-24 - 2.19.3
### Fixes
- handle empty commit analysis as a clean no-op
- Uses `@git.zone/tsdoc`'s explicit `NoChangesError` signal.
- Makes `gitzone commit` and `gitzone commit recommend --json` return cleanly when no uncommitted changes exist.
## 2026-05-23 - 2.19.2
### Fixes
+2 -2
View File
@@ -1,7 +1,7 @@
{
"name": "@git.zone/cli",
"private": false,
"version": "2.19.2",
"version": "2.19.3",
"description": "A comprehensive CLI tool for enhancing and managing local development workflows with gitzone utilities, focusing on project setup, version control, code formatting, and template management.",
"main": "dist_ts/index.js",
"typings": "dist_ts/index.d.ts",
@@ -63,7 +63,7 @@
"@types/node": "^25.4.0"
},
"dependencies": {
"@git.zone/tsdoc": "^2.0.0",
"@git.zone/tsdoc": "^2.0.6",
"@git.zone/tspublish": "^1.11.2",
"@push.rocks/commitinfo": "^1.0.12",
"@push.rocks/early": "^4.0.4",
+1807 -181
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@git.zone/cli',
version: '2.19.2',
version: '2.19.3',
description: 'A comprehensive CLI tool for enhancing and managing local development workflows with gitzone utilities, focusing on project setup, version control, code formatting, and template management.'
}
+32 -4
View File
@@ -9,6 +9,13 @@ import { getCliMode, printJson, runWithSuppressedOutput } from "../helpers.climo
import { appendPendingChangelogEntry } from "../helpers.changelog.js";
import { resolveCommitWorkflow, type IResolvedCommitWorkflow } from "../helpers.workflow.js";
const isNoChangesError = (error: unknown): boolean => {
return (
error instanceof plugins.tsdoc.NoChangesError ||
(error instanceof Error && error.name === "NoChangesError")
);
};
export const run = async (argvArg: any) => {
const mode = await getCliMode(argvArg);
const subcommand = argvArg._?.[1];
@@ -65,7 +72,15 @@ export const run = async (argvArg: any) => {
await runCommandStep(smartshellInstance, "Running build", workflow.buildCommand);
break;
case "analyze":
nextCommitObject = await runAnalyzeStep();
try {
nextCommitObject = await runAnalyzeStep();
} catch (error) {
if (isNoChangesError(error)) {
logger.log("info", "No uncommitted changes found. Nothing to commit.");
return;
}
throw error;
}
answerBucket = await buildAnswerBucket(nextCommitObject, workflow, mode, argvArg);
break;
case "changelog":
@@ -284,9 +299,22 @@ async function handleRecommend(mode: ICliMode): Promise<void> {
}
};
const recommendation = mode.json
? await runWithSuppressedOutput(recommendationBuilder)
: await recommendationBuilder();
let recommendation: any;
try {
recommendation = mode.json
? await runWithSuppressedOutput(recommendationBuilder)
: await recommendationBuilder();
} catch (error) {
if (isNoChangesError(error)) {
if (mode.json) {
printJson({ ok: true, noChanges: true });
} else {
logger.log("info", "No uncommitted changes found.");
}
return;
}
throw error;
}
if (mode.json) {
printJson(recommendation);