fix(hooks): remove dead delegate-task-english-directive hook
This commit is contained in:
@@ -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> = {
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user