Commit cbfbf7d
committed
fix: resolve quality scan issues (iteration 1)
Fix critical and medium severity issues identified in comprehensive quality scan.
High Priority Fixes:
- process-lock.ts: Fix lastIndexOf returning -1 causing incorrect parent directory
in error messages (lines 321, 335)
- cache-with-ttl.ts: Add in-flight request deduplication to prevent race condition
in getOrFetch() causing duplicate API calls
- .husky/pre-commit: Add dotenvx availability check with graceful fallback
Medium Priority Fixes:
- spawn.ts: Add nullish coalescing to array access on split result (line 293)
- dlx/package.ts: Add fallback for .pop() on split result (line 488)
- packages/normalize.ts: Add length validation before negative slice (line 99)
- cache-with-ttl.ts: Fix key slice calculation with proper prefix validation
(lines 293, 315)
- cover/formatters.ts: Add NaN validation to parseFloat results (lines 80, 94-103)
- globs.ts: Add LRU eviction (max 100 entries) to prevent unbounded matcher cache
growth
All fixes verified with 4637 passing tests.1 parent 80c8f12 commit cbfbf7d
10 files changed
Lines changed: 180 additions & 73 deletions
File tree
- .husky
- src
- cover
- dlx
- packages
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
12 | 17 | | |
13 | 18 | | |
14 | 19 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
734 | 734 | | |
735 | 735 | | |
736 | 736 | | |
737 | | - | |
| 737 | + | |
738 | 738 | | |
739 | 739 | | |
740 | 740 | | |
| |||
759 | 759 | | |
760 | 760 | | |
761 | 761 | | |
762 | | - | |
| 762 | + | |
763 | 763 | | |
764 | 764 | | |
765 | 765 | | |
| |||
0 commit comments