hookset 1.4.0 → 1.4.1
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/dist/worktrees.js +3 -4
- package/package.json +2 -2
package/dist/worktrees.js
CHANGED
|
@@ -80,8 +80,7 @@ async function inspect(l, main, o) {
|
|
|
80
80
|
if (!main && !current)
|
|
81
81
|
facts.idleDays = Math.max(0, (o.now - newestUnder(l.path)) / DAY_MS);
|
|
82
82
|
}
|
|
83
|
-
|
|
84
|
-
return { ...facts, ...sized, keep: keepReason(facts, o.olderThanDays, o.keepLocalCommits), removed: false };
|
|
83
|
+
return { ...facts, keep: keepReason(facts, o.olderThanDays, o.keepLocalCommits), removed: false };
|
|
85
84
|
}
|
|
86
85
|
async function prune(repo, worktrees, git) {
|
|
87
86
|
for (const w of worktrees.filter((t) => t.keep === undefined)) {
|
|
@@ -102,11 +101,11 @@ export async function sweepWorktrees(repo, options = {}) {
|
|
|
102
101
|
git,
|
|
103
102
|
top: (await git(repo, ['rev-parse', '--show-toplevel'])).out.trim(),
|
|
104
103
|
now: options.now ?? Date.now(),
|
|
105
|
-
size: options.size === true,
|
|
106
104
|
olderThanDays: options.olderThanDays ?? DEFAULT_OLDER_THAN_DAYS,
|
|
107
105
|
keepLocalCommits: options.keepLocalCommits ?? true,
|
|
108
106
|
};
|
|
109
|
-
const
|
|
107
|
+
const inspected = await Promise.all(parseWorktrees(listed.out).map((l, index) => inspect(l, index === 0, o)));
|
|
108
|
+
const worktrees = options.size === true ? inspected.map((w) => (w.missing ? w : { ...w, bytes: bytesUnder(w.path) })) : inspected;
|
|
110
109
|
const pruned = options.prune === true && (await prune(repo, worktrees, git));
|
|
111
110
|
const failed = worktrees.filter((w) => w.error !== undefined).map((w) => w.path);
|
|
112
111
|
const result = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hookset",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Git hooks presets for AI coding agents: lefthook presets pulled by a pinned tag, a Claude Code hook pack that denies skipped hooks, and `hookset init` and `check`. No dependency outside the burgee family. A husky migration path.",
|
|
6
6
|
"keywords": [
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"bellpull": "^2.0.3",
|
|
61
|
-
"burgee": "^2.2.
|
|
61
|
+
"burgee": "^2.2.4"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"vitest": "^5.0.1"
|