fix(#376): rewrite /gsd: → /gsd- in Claude-installed hook .js files (#424)

* fix(#376): rewrite /gsd: → /gsd- in Claude-installed hook .js files

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(#376): preserve .sh branch + {{GSD_VERSION}} stamp in restructured hook-copy loop

Trim the .js branch comment/whitespace so the `else {` and
`entry.endsWith('.sh')` fall within the 1500/2000-char assertion windows
anchored on `configDirReplacement` in the regression tests for #1834 and
#2136. The .sh read+substitute+chmod path is intact; the new #376 hyphen-
namespace rewrite for .js/.cjs files is also preserved.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Tom Boucher
2026-05-27 23:12:15 -04:00
committed by GitHub
parent 6cba62b39d
commit 6f33b18f69
3 changed files with 369 additions and 7 deletions

View File

@@ -0,0 +1,5 @@
---
type: Fixed
pr: 376
---
Claude installs now rewrite `/gsd:<cmd>` → `/gsd-<cmd>` in installed hook `.js`/`.cjs` files (matching the existing rewriter behavior for other hyphen-namespace runtimes) — statusline / update-banner / workflow-guard / context-monitor messages no longer leak the colon namespace.