Skip to content

Commit 5998e07

Browse files
committed
fix: address commander-fork audit findings with critical bug fixes and tests
Fixed 5 critical bugs identified in comprehensive audit: - version() event name extraction now handles short-only, long-only, and combined flags using attributeName() - help event emission now fires both dynamic flag event AND stable 'help' event for compatibility - EventEmitter.call(this) added to Command constructor for proper inheritance - Option.negate detection tightened from indexOf to regex /(^|[\s,|])--no-/ - Option.name() now strips both -- and - prefixes for short-only flags Added 5 comprehensive test files (24 tests total): - test.version.short-only.spec.ts (3 tests) - test.help.override.spec.ts (4 tests) - test.unknown.attached.spec.ts (9 tests) - test.eventemitter.early.spec.ts (4 tests) - test.opts.custom-version.spec.ts (5 tests) Updated documentation to accurately reflect fork as deliberately reduced subset: - README.md: Added warning banner, compatibility matrix, supported API surface - Removed FORK_NOTICE.md and FORK_PLAN.md (consolidated into README) - README now clearly states "NOT a drop-in replacement" All 199 tests passing.
1 parent d8c2ae7 commit 5998e07

File tree

9 files changed

+375
-553
lines changed

9 files changed

+375
-553
lines changed

src/commander-fork/FORK_NOTICE.md

Lines changed: 0 additions & 142 deletions
This file was deleted.

0 commit comments

Comments
 (0)