Repository navigation
fix(cursor-hooks): preserve similarly named user hooks - #1052
DietrichGebert merged 4 commits into
Conversation
|
I ran this locally. A small suggestion, feel free to ignore it: the existing regex can do this in one line, and const PONYTAIL_HOOK = /[\\/]hooks[\\/]ponytail-[\w-]+\.js(?=["'\s]|$)/;Your test passes with it too. It also handles a case the Looks good to me either way. |
|
Thanks for the review — I incorporated your regex suggestion and restored I also added a regression test for the edge case you pointed out:
Thanks for catching that. |
Problem
Cursor hook cleanup currently treats any matching ponytail-*.js fragment as Ponytail-owned, so an unrelated user hook such as ./hooks/my-ponytail-logger.js can be removed during install/uninstall.
Fixes #1051
Related: #898
Change
Validation
All three pass against upstream main at 552acd5.
The branch is based directly on upstream main and changes only: