API Surface Issue
Category
Unused export
Summary
- File:
src/commands/test-helpers.test-utils.ts
- Symbol:
EMPTY_STATS
- Issue: Exported constant that is only used internally within the same file
Evidence
The EMPTY_STATS constant is exported on line 11 but is never imported by any other module:
export const EMPTY_STATS: AggregatedStats = {
totalRequests: 0,
allowedRequests: 0,
deniedRequests: 0,
uniqueDomains: 0,
byDomain: new Map(),
timeRange: null,
};
Internal usage only: The constant is used within the same file on line 22 in the createEmptyStats() helper function:
function createEmptyStats(): AggregatedStats {
return {
...EMPTY_STATS,
byDomain: new Map(),
};
}
Verification: A comprehensive search across the codebase confirms no external imports:
$ grep -r "import.*EMPTY_STATS" src/ tests/ --include="*.ts"
(no results)
Recommended Fix
Remove the export keyword from the constant declaration since it's only used internally:
const EMPTY_STATS: AggregatedStats = {
totalRequests: 0,
allowedRequests: 0,
deniedRequests: 0,
uniqueDomains: 0,
byDomain: new Map(),
timeRange: null,
};
This keeps the internal helper clean while removing unnecessary API surface area.
Impact
- Dead code risk: Low — The constant is being used, just not exported
- Maintenance burden: Low — Simple one-word fix
- API clarity: Medium — Reduces public API surface by removing unused export
Detected by Export Audit workflow. Triggered by push to main on 2026-05-23
Generated by API Surface & Export Audit · ● 5M · ◷
API Surface Issue
Category
Unused export
Summary
src/commands/test-helpers.test-utils.tsEMPTY_STATSEvidence
The
EMPTY_STATSconstant is exported on line 11 but is never imported by any other module:Internal usage only: The constant is used within the same file on line 22 in the
createEmptyStats()helper function:Verification: A comprehensive search across the codebase confirms no external imports:
Recommended Fix
Remove the
exportkeyword from the constant declaration since it's only used internally:This keeps the internal helper clean while removing unnecessary API surface area.
Impact
Detected by Export Audit workflow. Triggered by push to main on 2026-05-23