fix(hooks): remove dead delegate-task-english-directive hook

This commit is contained in:
YeonGyu-Kim
2026-03-14 13:43:56 +09:00
parent 2b8ae214b6
commit 674df1b1b8
11 changed files with 31 additions and 138 deletions
+13
View File
@@ -1,3 +1,5 @@
/// <reference types="bun-types" />
import { describe, test, expect, afterEach } from "bun:test"
import * as fs from "fs"
import * as path from "path"
@@ -400,6 +402,17 @@ describe("migrateConfigFile", () => {
expect(rawConfig.disabled_hooks).not.toContain("anthropic-auto-compact")
})
test("removes deleted hook names from disabled_hooks", () => {
const rawConfig: Record<string, unknown> = {
disabled_hooks: ["delegate-task-english-directive", "comment-checker"],
}
const needsWrite = migrateConfigFile(testConfigPath, rawConfig)
expect(needsWrite).toBe(true)
expect(rawConfig.disabled_hooks).toEqual(["comment-checker"])
})
test("does not write if no migration needed", () => {
// given: Config with current names
const rawConfig: Record<string, unknown> = {
+1
View File
@@ -9,6 +9,7 @@ export const HOOK_NAME_MAP: Record<string, string | null> = {
// Removed hooks (v3.0.0) - will be filtered out and user warned
"empty-message-sanitizer": null,
"delegate-task-english-directive": null,
}
export function migrateHookNames(