Compare commits

...

2 Commits

Author SHA1 Message Date
27d5cdca35 v2.9.0
Some checks failed
Default (tags) / security (push) Failing after 0s
Default (tags) / test (push) Failing after 0s
Default (tags) / release (push) Has been skipped
Default (tags) / metadata (push) Has been skipped
2025-12-15 12:00:10 +00:00
3ebf072bfb feat(format): Add --diff option to format command to display file diffs; pass flag through CLI and show formatter diffs. Bump @git.zone/tsdoc to ^1.11.0. 2025-12-15 12:00:10 +00:00
6 changed files with 102 additions and 12 deletions

View File

@@ -1,5 +1,13 @@
# Changelog # Changelog
## 2025-12-15 - 2.9.0 - feat(format)
Add --diff option to format command to display file diffs; pass flag through CLI and show formatter diffs. Bump @git.zone/tsdoc to ^1.11.0.
- Add a diff boolean option to mod_format to enable showing file diffs during format operations.
- CLI change: pass argvArg.diff into the options so the --diff flag is honored by the format command.
- When diff is enabled, run formatter.check() for each active formatter and call displayAllDiffs() for those with differences, with informational logging.
- Update dependency @git.zone/tsdoc from ^1.10.2 to ^1.11.0.
## 2025-12-15 - 2.8.0 - feat(commit) ## 2025-12-15 - 2.8.0 - feat(commit)
Add commit configuration and automatic pre-commit tests Add commit configuration and automatic pre-commit tests

View File

@@ -1,7 +1,7 @@
{ {
"name": "@git.zone/cli", "name": "@git.zone/cli",
"private": false, "private": false,
"version": "2.8.0", "version": "2.9.0",
"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.", "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.ts", "main": "dist_ts/index.ts",
"typings": "dist_ts/index.d.ts", "typings": "dist_ts/index.d.ts",
@@ -67,7 +67,7 @@
"@types/node": "^25.0.2" "@types/node": "^25.0.2"
}, },
"dependencies": { "dependencies": {
"@git.zone/tsdoc": "^1.10.2", "@git.zone/tsdoc": "^1.11.0",
"@git.zone/tspublish": "^1.10.3", "@git.zone/tspublish": "^1.10.3",
"@push.rocks/commitinfo": "^1.0.12", "@push.rocks/commitinfo": "^1.0.12",
"@push.rocks/early": "^4.0.4", "@push.rocks/early": "^4.0.4",

83
pnpm-lock.yaml generated
View File

@@ -9,8 +9,8 @@ importers:
.: .:
dependencies: dependencies:
'@git.zone/tsdoc': '@git.zone/tsdoc':
specifier: ^1.10.2 specifier: ^1.11.0
version: 1.10.2(ws@8.18.3)(zod@3.25.76) version: 1.11.0(ws@8.18.3)(zod@3.25.76)
'@git.zone/tspublish': '@git.zone/tspublish':
specifier: ^1.10.3 specifier: ^1.10.3
version: 1.10.3 version: 1.10.3
@@ -520,8 +520,8 @@ packages:
resolution: {integrity: sha512-YD1qMYA/4eOuF57V0ccR+xo6ww1+QOYFA2K5gBPFBDNh9VdfvWxxDhOUybja8lT9PVMoli8PHG5WA5tKJkdXIQ==} resolution: {integrity: sha512-YD1qMYA/4eOuF57V0ccR+xo6ww1+QOYFA2K5gBPFBDNh9VdfvWxxDhOUybja8lT9PVMoli8PHG5WA5tKJkdXIQ==}
hasBin: true hasBin: true
'@git.zone/tsdoc@1.10.2': '@git.zone/tsdoc@1.11.0':
resolution: {integrity: sha512-r4pKv74CH0KtzRvGdLioJd3DznSKmr8ZVE43QPFfGSNftH5P2eLAe5lc5nK8gCWb8mgEkb8WNfqtTL3Lkg+XyQ==} resolution: {integrity: sha512-GUt/FFUwPB7rAdWaJW23YNCnEAJYrWHPcE6gjma8ojcmxc2f4vpofTKKXckLTefy8VMNnwE0EVYUm8iw9rPFtA==}
hasBin: true hasBin: true
'@git.zone/tspublish@1.10.3': '@git.zone/tspublish@1.10.3':
@@ -999,12 +999,18 @@ packages:
'@push.rocks/qenv@6.1.3': '@push.rocks/qenv@6.1.3':
resolution: {integrity: sha512-+z2hsAU/7CIgpYLFqvda8cn9rUBMHqLdQLjsFfRn5jPoD7dJ5rFlpkbhfM4Ws8mHMniwWaxGKo+q/YBhtzRBLg==} resolution: {integrity: sha512-+z2hsAU/7CIgpYLFqvda8cn9rUBMHqLdQLjsFfRn5jPoD7dJ5rFlpkbhfM4Ws8mHMniwWaxGKo+q/YBhtzRBLg==}
'@push.rocks/smartagent@file:../../push.rocks/smartagent':
resolution: {directory: ../../push.rocks/smartagent, type: directory}
'@push.rocks/smartai@0.8.0': '@push.rocks/smartai@0.8.0':
resolution: {integrity: sha512-guzi28meUDc3mydC8kpoA+4pzExRQqygXYFDD4qQSWPpIRHQ7qhpeNqJzrrGezT1yOH5Gb9taPEGwT56hI+nwQ==} resolution: {integrity: sha512-guzi28meUDc3mydC8kpoA+4pzExRQqygXYFDD4qQSWPpIRHQ7qhpeNqJzrrGezT1yOH5Gb9taPEGwT56hI+nwQ==}
'@push.rocks/smartarchive@4.2.4': '@push.rocks/smartarchive@4.2.4':
resolution: {integrity: sha512-uiqVAXPxmr8G5rv3uZvZFMOCt8l7cZC3nzvsy4YQqKf/VkPhKIEX+b7LkAeNlxPSYUiBQUkNRoawg9+5BaMcHg==} resolution: {integrity: sha512-uiqVAXPxmr8G5rv3uZvZFMOCt8l7cZC3nzvsy4YQqKf/VkPhKIEX+b7LkAeNlxPSYUiBQUkNRoawg9+5BaMcHg==}
'@push.rocks/smartarchive@5.0.1':
resolution: {integrity: sha512-x4bie9IIdL9BZqBZLc8Pemp8xZOJGa6mXSVgKJRL4/Rw+E5N4rVHjQOYGRV75nC2mAMJh9GIbixuxLnWjj77ag==}
'@push.rocks/smartarray@1.1.0': '@push.rocks/smartarray@1.1.0':
resolution: {integrity: sha512-b5YgBmUdglOJH8zeUf2ZWdPCoqySgwvkycRi2BhA9zVZHkpASh39Ej0q0fxFJetlUVyYqGfVoMVjbVrLFfFV7g==} resolution: {integrity: sha512-b5YgBmUdglOJH8zeUf2ZWdPCoqySgwvkycRi2BhA9zVZHkpASh39Ej0q0fxFJetlUVyYqGfVoMVjbVrLFfFV7g==}
@@ -1042,6 +1048,9 @@ packages:
'@push.rocks/smartdelay@3.0.5': '@push.rocks/smartdelay@3.0.5':
resolution: {integrity: sha512-mUuI7kj2f7ztjpic96FvRIlf2RsKBa5arw81AHNsndbxO6asRcxuWL8dTVxouEIK8YsBUlj0AsrCkHhMbLQdHw==} resolution: {integrity: sha512-mUuI7kj2f7ztjpic96FvRIlf2RsKBa5arw81AHNsndbxO6asRcxuWL8dTVxouEIK8YsBUlj0AsrCkHhMbLQdHw==}
'@push.rocks/smartdeno@1.2.0':
resolution: {integrity: sha512-6S1plCaMUVOZiRSflfoz9Fqk9phACCuKmc7Z6SfTvfl+p9VcPUmewKgaa/0QiLOpiI6ksfxdfmkS5Rw5HpYeIA==}
'@push.rocks/smartdiff@1.1.0': '@push.rocks/smartdiff@1.1.0':
resolution: {integrity: sha512-AAz/unmko0C+g+60odOoK32PE3Ci3YLoB+zfg1LGLyVRCthcdzjqa1C2Km0MfG7IyJQKPdj8J5HPubtpm3ZeaQ==} resolution: {integrity: sha512-AAz/unmko0C+g+60odOoK32PE3Ci3YLoB+zfg1LGLyVRCthcdzjqa1C2Km0MfG7IyJQKPdj8J5HPubtpm3ZeaQ==}
@@ -2905,8 +2914,8 @@ packages:
resolution: {integrity: sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==} resolution: {integrity: sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==}
engines: {node: '>=16'} engines: {node: '>=16'}
isomorphic-git@1.36.0: isomorphic-git@1.36.1:
resolution: {integrity: sha512-22tU165ptowHYoDEwYJy5EKRzpHiuLMliaR01fH9ZwaUj1z/IqE++tGpjw/pD6eCWoxiOp6TPWX434aJ9zA4Lg==} resolution: {integrity: sha512-fC8SRT8MwoaXDK8G4z5biPEbqf2WyEJUb2MJ2ftSd39/UIlsnoZxLGux+lae0poLZO4AEcx6aUVOh5bV+P8zFA==}
engines: {node: '>=14.17'} engines: {node: '>=14.17'}
hasBin: true hasBin: true
@@ -5060,12 +5069,13 @@ snapshots:
- '@swc/helpers' - '@swc/helpers'
- supports-color - supports-color
'@git.zone/tsdoc@1.10.2(ws@8.18.3)(zod@3.25.76)': '@git.zone/tsdoc@1.11.0(ws@8.18.3)(zod@3.25.76)':
dependencies: dependencies:
'@git.zone/tspublish': 1.10.3 '@git.zone/tspublish': 1.10.3
'@push.rocks/early': 4.0.4 '@push.rocks/early': 4.0.4
'@push.rocks/npmextra': 5.3.3 '@push.rocks/npmextra': 5.3.3
'@push.rocks/qenv': 6.1.3 '@push.rocks/qenv': 6.1.3
'@push.rocks/smartagent': file:../../push.rocks/smartagent(typescript@5.9.3)(ws@8.18.3)(zod@3.25.76)
'@push.rocks/smartai': 0.8.0(typescript@5.9.3)(ws@8.18.3)(zod@3.25.76) '@push.rocks/smartai': 0.8.0(typescript@5.9.3)(ws@8.18.3)(zod@3.25.76)
'@push.rocks/smartcli': 4.0.19 '@push.rocks/smartcli': 4.0.19
'@push.rocks/smartdelay': 3.0.5 '@push.rocks/smartdelay': 3.0.5
@@ -5877,6 +5887,29 @@ snapshots:
'@push.rocks/smartlog': 3.1.10 '@push.rocks/smartlog': 3.1.10
'@push.rocks/smartpath': 6.0.0 '@push.rocks/smartpath': 6.0.0
'@push.rocks/smartagent@file:../../push.rocks/smartagent(typescript@5.9.3)(ws@8.18.3)(zod@3.25.76)':
dependencies:
'@push.rocks/smartai': 0.8.0(typescript@5.9.3)(ws@8.18.3)(zod@3.25.76)
'@push.rocks/smartbrowser': 2.0.8(typescript@5.9.3)
'@push.rocks/smartdeno': 1.2.0
'@push.rocks/smartfs': 1.2.0
'@push.rocks/smartrequest': 5.0.1
'@push.rocks/smartshell': 3.3.0
transitivePeerDependencies:
- '@nuxt/kit'
- aws-crt
- bare-abort-controller
- bare-buffer
- bufferutil
- react
- react-native-b4a
- supports-color
- typescript
- utf-8-validate
- vue
- ws
- zod
'@push.rocks/smartai@0.8.0(typescript@5.9.3)(ws@8.18.3)(zod@3.25.76)': '@push.rocks/smartai@0.8.0(typescript@5.9.3)(ws@8.18.3)(zod@3.25.76)':
dependencies: dependencies:
'@anthropic-ai/sdk': 0.65.0(zod@3.25.76) '@anthropic-ai/sdk': 0.65.0(zod@3.25.76)
@@ -5923,6 +5956,26 @@ snapshots:
- react-native-b4a - react-native-b4a
- supports-color - supports-color
'@push.rocks/smartarchive@5.0.1':
dependencies:
'@push.rocks/smartdelay': 3.0.5
'@push.rocks/smartfile': 13.1.2
'@push.rocks/smartpath': 6.0.0
'@push.rocks/smartpromise': 4.2.3
'@push.rocks/smartrequest': 4.4.2
'@push.rocks/smartrx': 3.0.10
'@push.rocks/smartstream': 3.2.5
'@push.rocks/smartunique': 3.0.9
'@push.rocks/smarturl': 3.1.0
'@types/tar-stream': 3.1.4
fflate: 0.8.2
file-type: 21.1.1
tar-stream: 3.1.7
transitivePeerDependencies:
- bare-abort-controller
- react-native-b4a
- supports-color
'@push.rocks/smartarray@1.1.0': {} '@push.rocks/smartarray@1.1.0': {}
'@push.rocks/smartbrowser@2.0.8(typescript@5.9.3)': '@push.rocks/smartbrowser@2.0.8(typescript@5.9.3)':
@@ -6046,6 +6099,18 @@ snapshots:
dependencies: dependencies:
'@push.rocks/smartpromise': 4.2.3 '@push.rocks/smartpromise': 4.2.3
'@push.rocks/smartdeno@1.2.0':
dependencies:
'@push.rocks/smartarchive': 5.0.1
'@push.rocks/smartfs': 1.2.0
'@push.rocks/smartpath': 6.0.0
'@push.rocks/smartshell': 3.3.0
'@push.rocks/smartunique': 3.0.9
transitivePeerDependencies:
- bare-abort-controller
- react-native-b4a
- supports-color
'@push.rocks/smartdiff@1.1.0': '@push.rocks/smartdiff@1.1.0':
dependencies: dependencies:
diff: 8.0.2 diff: 8.0.2
@@ -6177,7 +6242,7 @@ snapshots:
'@push.rocks/smarttime': 4.1.1 '@push.rocks/smarttime': 4.1.1
'@types/diff': 8.0.0 '@types/diff': 8.0.0
diff: 8.0.2 diff: 8.0.2
isomorphic-git: 1.36.0 isomorphic-git: 1.36.1
minimatch: 10.1.1 minimatch: 10.1.1
'@push.rocks/smartguard@3.1.0': '@push.rocks/smartguard@3.1.0':
@@ -8573,7 +8638,7 @@ snapshots:
isexe@3.1.1: {} isexe@3.1.1: {}
isomorphic-git@1.36.0: isomorphic-git@1.36.1:
dependencies: dependencies:
async-lock: 1.4.1 async-lock: 1.4.1
clean-git-ref: 2.0.1 clean-git-ref: 2.0.1

View File

@@ -3,6 +3,6 @@
*/ */
export const commitinfo = { export const commitinfo = {
name: '@git.zone/cli', name: '@git.zone/cli',
version: '2.8.0', version: '2.9.0',
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.' 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.'
} }

View File

@@ -92,6 +92,7 @@ export let run = async () => {
interactive: argvArg.interactive !== false, interactive: argvArg.interactive !== false,
parallel: argvArg.parallel !== false, parallel: argvArg.parallel !== false,
verbose: argvArg.verbose, verbose: argvArg.verbose,
diff: argvArg.diff,
}); });
}); });

View File

@@ -29,6 +29,7 @@ export let run = async (
interactive?: boolean; interactive?: boolean;
parallel?: boolean; parallel?: boolean;
verbose?: boolean; verbose?: boolean;
diff?: boolean; // Show file diffs
} = {}, } = {},
): Promise<any> => { ): Promise<any> => {
// Set verbose mode if requested // Set verbose mode if requested
@@ -132,6 +133,21 @@ export let run = async (
return; return;
} }
// Show diffs if requested (works in both dry-run and write modes)
if (options.diff) {
logger.log('info', 'Showing file diffs:');
console.log('');
for (const formatter of activeFormatters) {
const checkResult = await formatter.check();
if (checkResult.hasDiff) {
logger.log('info', `[${formatter.name}]`);
formatter.displayAllDiffs(checkResult);
console.log('');
}
}
}
// Dry-run mode (default behavior) // Dry-run mode (default behavior)
if (!shouldWrite) { if (!shouldWrite) {
logger.log('info', 'Dry-run mode - use --write (-w) to apply changes'); logger.log('info', 'Dry-run mode - use --write (-w) to apply changes');