feat(GitRepo): Add glob-pattern exclusions for getUncommittedDiff and add minimatch; bump dependencies
This commit is contained in:
@@ -1,5 +1,14 @@
|
||||
# Changelog
|
||||
|
||||
## 2025-11-04 - 3.3.0 - feat(GitRepo)
|
||||
Add glob-pattern exclusions for getUncommittedDiff and add minimatch; bump dependencies
|
||||
|
||||
- getUncommittedDiff now supports glob patterns for excluded files via minimatch (skip files when filepath matches exact or glob pattern).
|
||||
- Expose minimatch through plugins (ts/smartgit.plugins.ts) so plugin code can use glob matching consistently.
|
||||
- Add minimatch to dependencies (minimatch ^10.1.1).
|
||||
- Bump several dependencies: @push.rocks/smartenv to ^6.0.0, @push.rocks/smartfile to ^11.2.7, @push.rocks/smartshell to ^3.3.0, @push.rocks/smartstring to ^4.1.0, isomorphic-git to ^1.34.2.
|
||||
- Bump devDependencies for build/test tooling: @git.zone/tsbuild ^2.7.1, @git.zone/tsrun ^1.6.2, @git.zone/tstest ^2.7.0.
|
||||
|
||||
## 2025-01-04 - 3.2.0 - feat(core)
|
||||
Enhanced error handling, type safety, and documentation
|
||||
|
||||
|
||||
17
package.json
17
package.json
@@ -32,21 +32,22 @@
|
||||
},
|
||||
"homepage": "https://code.foss.global/push.rocks/smartgit",
|
||||
"dependencies": {
|
||||
"@push.rocks/smartenv": "^5.0.13",
|
||||
"@push.rocks/smartfile": "^11.2.5",
|
||||
"@push.rocks/smartenv": "^6.0.0",
|
||||
"@push.rocks/smartfile": "^11.2.7",
|
||||
"@push.rocks/smartpath": "^6.0.0",
|
||||
"@push.rocks/smartpromise": "^4.2.3",
|
||||
"@push.rocks/smartshell": "^3.2.3",
|
||||
"@push.rocks/smartstring": "^4.0.15",
|
||||
"@push.rocks/smartshell": "^3.3.0",
|
||||
"@push.rocks/smartstring": "^4.1.0",
|
||||
"@push.rocks/smarttime": "^4.1.1",
|
||||
"@types/diff": "^8.0.0",
|
||||
"diff": "^8.0.2",
|
||||
"isomorphic-git": "^1.32.2"
|
||||
"isomorphic-git": "^1.34.2",
|
||||
"minimatch": "^10.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@git.zone/tsbuild": "^2.6.4",
|
||||
"@git.zone/tsrun": "^1.3.3",
|
||||
"@git.zone/tstest": "^2.3.2"
|
||||
"@git.zone/tsbuild": "^2.7.1",
|
||||
"@git.zone/tsrun": "^1.6.2",
|
||||
"@git.zone/tstest": "^2.7.0"
|
||||
},
|
||||
"private": false,
|
||||
"files": [
|
||||
|
||||
4939
pnpm-lock.yaml
generated
4939
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@push.rocks/smartgit',
|
||||
version: '3.1.1',
|
||||
version: '3.3.0',
|
||||
description: 'A smart wrapper for nodegit that simplifies Git operations in Node.js.'
|
||||
}
|
||||
|
||||
@@ -122,8 +122,8 @@ export class GitRepo {
|
||||
const diffs: string[] = [];
|
||||
for (const row of statusMatrix) {
|
||||
const [filepath, head, workdir] = row;
|
||||
if (excludeFiles.includes(filepath)) {
|
||||
continue; // Skip excluded files
|
||||
if (excludeFiles.some(pattern => filepath === pattern || plugins.minimatch(filepath, pattern))) {
|
||||
continue; // Skip excluded files (supports exact matches and glob patterns)
|
||||
}
|
||||
|
||||
let headContent = '';
|
||||
|
||||
@@ -15,5 +15,6 @@ export { smartenv, smartfile, smartpath, smartpromise, smartstring, smarttime };
|
||||
// third party
|
||||
import * as diff from 'diff';
|
||||
import isomorphicGit from 'isomorphic-git';
|
||||
import { minimatch } from 'minimatch';
|
||||
|
||||
export { diff, isomorphicGit };
|
||||
export { diff, isomorphicGit, minimatch };
|
||||
|
||||
Reference in New Issue
Block a user