fix: make plugin hooks run on Node 21+ and green the suite under modern Node (#2184)

ROOT CAUSE: hooks load plugin-hook-bootstrap.js via
`node -e "...; process.argv.splice(1,0,s); require(s)"`. On Node 21+,
require.main is `undefined` under --eval, so the `if (require.main === module)`
guard was false and main() never ran — every plugin hook silently no-op'd
(e.g. the MCP-health PreToolUse hook stopped blocking). CI (Node 18/20) hid
this; it only surfaces on Node 21+. Fix: also run main() when require.main is
undefined (the eval-bootstrap case), while staying dormant on real imports.

Also clears pre-existing main debt the full local suite enforces:
- catalog:sync — README/docs agent+skill counts drifted after recent merges
- tests/ci/supply-chain-watch-workflow: update checkout SHA to the merged v6.0.3 (#2183)
- markdownlint + check-unicode-safety --write across docs/skills

Suite: 2683/2683 green under Node v25; lint + unicode clean.

Co-authored-by: ECC Test <ecc@example.test>
This commit is contained in:
Affaan Mustafa
2026-06-07 16:05:28 +08:00
committed by GitHub
parent eef31ad39c
commit e755c5f72b
36 changed files with 613 additions and 609 deletions
+4 -4
View File
@@ -47,26 +47,26 @@ ECC v2.0.0-rc.1 اس قابل استعمال پرت پر عوامی Hermes آپ
<tr>
<td width="25%" align="center">
<a href="https://ecc.tools/pricing">
<strong>💼 ECC Pro</strong><br />
<strong> ECC Pro</strong><br />
<sub>نجی ریپوز · GitHub App · $19/نشست/ماہ</sub>
</a>
</td>
<td width="25%" align="center">
<a href="https://github.com/sponsors/affaan-m">
<strong>❤️ اسپانسر</strong><br />
<strong> اسپانسر</strong><br />
<sub>OSS کو فنڈ کریں · $5/ماہ سے</sub>
</a>
</td>
<td width="25%" align="center">
<a href="https://github.com/affaan-m/ECC/discussions">
<strong>💬 کمیونٹی</strong>
<strong> کمیونٹی</strong>
<br />
<sub>Discussions · Q&amp;A · Show & Tell</sub>
</a>
</td>
<td width="25%" align="center">
<a href="https://github.com/apps/ecc-tools">
<strong>🤖 GitHub App</strong><br />
<strong> GitHub App</strong><br />
<sub>انسٹال · PR آڈٹس · مفت ٹیئر</sub>
</a>
</td>