@chahuadev/junk-sweeper-app 1.0.1 β 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -41,7 +41,7 @@ junk-sweeper
|
|
|
41
41
|
|
|
42
42
|
While standard linters look for syntax errors, **Chahuadev Junk Sweeper** uses deep AST analysis to understand the *context* and *architecture* of your entire project.
|
|
43
43
|
|
|
44
|
-
### π Silent Bug Catcher
|
|
44
|
+
### π Silent Bug Catcher β 8 patterns
|
|
45
45
|
Detects logical flaws that compile fine but silently break business logic:
|
|
46
46
|
|
|
47
47
|
| Pattern | What It Catches |
|
|
@@ -50,11 +50,35 @@ Detects logical flaws that compile fine but silently break business logic:
|
|
|
50
50
|
| **Zombie Event Listeners** | `.addEventListener()` without `.removeEventListener()` β memory leaks |
|
|
51
51
|
| **Scope Shadowing** | Inner variable re-declaring an outer name β wrong value runs silently |
|
|
52
52
|
| **Floating Promises** | `async` calls without `await` inside `try/catch` β rejections go unhandled |
|
|
53
|
+
| **Orphaned Timers** | `setTimeout`/`setInterval` without cleanup reference β phantom callbacks |
|
|
54
|
+
| **Uncaught Promise Chains** | `.then()` without `.catch()` β unhandled rejections |
|
|
55
|
+
| **Naked JSON.parse** | `JSON.parse()` outside `try/catch` β crashes on malformed input |
|
|
56
|
+
| **Await in Loop** | `await` inside `for`/`forEach` β accidental serial execution instead of parallel |
|
|
57
|
+
|
|
58
|
+
### π οΈ Code Quality Auditor β 10 patterns
|
|
59
|
+
Catches patterns that compile and run today, but rot the codebase over time:
|
|
60
|
+
|
|
61
|
+
| Pattern | What It Catches |
|
|
62
|
+
|---|---|
|
|
63
|
+
| **debugger statement** | Debug pause left in production code |
|
|
64
|
+
| **eval() / new Function(string)** | Arbitrary code execution β security + performance risk |
|
|
65
|
+
| **NaN comparison** | `x === NaN` always evaluates to `false` β use `Number.isNaN()` |
|
|
66
|
+
| **Assignment in condition** | `if (x = foo())` β likely a typo of `===` |
|
|
67
|
+
| **parseInt without radix** | Octal parsing surprises in legacy engines |
|
|
68
|
+
| **var declaration** | Function-scoped hoisting footgun β use `const`/`let` |
|
|
69
|
+
| **console.\* debug logging** | Debug output left in production build |
|
|
70
|
+
| **Prototype mutation** | `__proto__` / built-in `.prototype` mutation β attack vector |
|
|
71
|
+
| **Overly long functions** | Functions >60 lines β complexity & maintainability risk |
|
|
72
|
+
| **TODO / FIXME / HACK markers** | Unresolved technical debt accumulating in comments |
|
|
73
|
+
|
|
74
|
+
### β¨ Live AST Recommendations
|
|
75
|
+
Every finding includes a **live recommendation** generated from your actual code β real variable names, the exact problematic source line, and a concrete before/after fix example. No hardcoded template strings.
|
|
53
76
|
|
|
54
77
|
### πΊοΈ Interactive Architecture Map (n8n-style)
|
|
55
78
|
- **Left-to-Right auto-layout** β see cross-file dependency flow instantly
|
|
56
79
|
- **Drag nodes freely** β organise your architecture your way
|
|
57
80
|
- **Save / Load / Copy Layout** β positions persist across sessions
|
|
81
|
+
- **Collapsible Node Status legend** β click to collapse/expand; state remembered in localStorage
|
|
58
82
|
- **Bidirectional issue β map linking** β click an issue to fly to its node; click a node to filter issues
|
|
59
83
|
|
|
60
84
|
### β‘ One-Click VS Code Integration
|
|
@@ -83,6 +107,25 @@ The only files the app ever writes are its **own** layout cache (`%APPDATA%\Junk
|
|
|
83
107
|
|
|
84
108
|
---
|
|
85
109
|
|
|
110
|
+
## π Changelog
|
|
111
|
+
|
|
112
|
+
### v1.0.0 β Initial Release
|
|
113
|
+
- Read-only AST analysis β JSON/HTML/CSV export
|
|
114
|
+
- Interactive n8n-style Project Map with Layout Memory
|
|
115
|
+
- 5 AST detectors: Unused Variables, Unused Imports, Dead Code, Duplicate Functions, Silent Bugs
|
|
116
|
+
- 7-Layer Security Gateway + SHA-256 checksum integrity verification
|
|
117
|
+
- One-Click VS Code Go-to-Line integration
|
|
118
|
+
- Worker Thread architecture β UI stays responsive during large scans
|
|
119
|
+
|
|
120
|
+
### v1.0.1 β AST Recommendations & Code Quality Auditor
|
|
121
|
+
- **6th detector:** `ast-code-quality-detector.js` β 10 production-safety patterns (debugger, eval, NaN comparison, assignment-in-condition, parseInt radix, var, console.\*, prototype mutation, long functions, TODO markers)
|
|
122
|
+
- **Silent Bugs expanded to 8 patterns:** Orphaned Timers, Uncaught Promise Chains, Naked `JSON.parse`, Await-in-Loop
|
|
123
|
+
- **Live AST-driven recommendations** across all 6 detectors β every finding shows the actual code line from your source, real variable/function names from the AST, and a concrete before/after fix example
|
|
124
|
+
- **Collapsible Node Status legend** in Project Map β collapse to save screen space; state persists in localStorage
|
|
125
|
+
- **Terminal boot sequence** shows all 7 security layers and all 6 active detectors on launch
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
86
129
|
## π¦ Platform Support
|
|
87
130
|
|
|
88
131
|
| Platform | Architecture | Status |
|
package/package.json
CHANGED