()
| 157 | }) |
| 158 | |
| 159 | export function clearPluginHookCache(): void { |
| 160 | // Only invalidate the memoize — do NOT wipe STATE.registeredHooks here. |
| 161 | // Wiping here left plugin hooks dead between clearAllCaches() and the next |
| 162 | // loadPluginHooks() call, which for Stop hooks might never happen |
| 163 | // (gh-29767). The clear now lives inside loadPluginHooks() as an atomic |
| 164 | // clear-then-register, so old hooks stay valid until the fresh load swaps |
| 165 | // them out. |
| 166 | loadPluginHooks.cache?.clear?.() |
| 167 | } |
| 168 | |
| 169 | /** |
| 170 | * Remove hooks from plugins no longer in the enabled set, without adding |
no test coverage detected