@chahuadev/junk-sweeper-app 1.0.1 β†’ 1.1.0

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.
Files changed (2) hide show
  1. package/README.md +78 -1
  2. 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,12 +50,49 @@ 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
+ - **Node Status legend** β€” Clean / Minor / Critical / npm / Gateway Box with colour coding; collapsible, state remembered in localStorage
58
82
  - **Bidirectional issue ↔ map linking** β€” click an issue to fly to its node; click a node to filter issues
83
+ - **Graph Export (⬆ button)** β€” export in 4 formats: Copy as Mermaid Β· Draw.io XML Β· Excalidraw JSON Β· Graphviz .dot
84
+
85
+ ### πŸ₯ Project Health Score
86
+ After every scan, the sidebar shows an **A–F grade ring** weighted by issue severity and confidence. The grade is also embedded in the HTML export.
87
+
88
+ ### 🚩 Mark as False Positive
89
+ Every issue card has a **"Mark as False Positive"** button that copies the exact suppress comment to clipboard β€” paste it above the flagged line to silence the finding in future scans.
90
+
91
+ ### βš™οΈ Per-Project Config
92
+ Drop `.junksweeper.json` in your project root to tune `minConfidence`, `ignorePatterns`, per-detector toggles, and `excludePatterns` β€” no app restart needed.
93
+
94
+ ### πŸ“€ SARIF 2.1.0 Export
95
+ Export findings in **SARIF 2.1.0** format β€” compatible with GitHub Code Scanning, Azure DevOps, VS Code SARIF Viewer, and any SARIF-aware CI pipeline.
59
96
 
60
97
  ### ⚑ One-Click VS Code Integration
61
98
  Click any filename in the report β†’ VS Code opens at the **exact problematic line**.
@@ -83,6 +120,46 @@ The only files the app ever writes are its **own** layout cache (`%APPDATA%\Junk
83
120
 
84
121
  ---
85
122
 
123
+ ## πŸ“ Changelog
124
+
125
+ ### v1.0.0 β€” Initial Release
126
+ - Read-only AST analysis β€” JSON/HTML/CSV export
127
+ - Interactive n8n-style Project Map with Layout Memory
128
+ - 5 AST detectors: Unused Variables, Unused Imports, Dead Code, Duplicate Functions, Silent Bugs
129
+ - 7-Layer Security Gateway + SHA-256 checksum integrity verification
130
+ - One-Click VS Code Go-to-Line integration
131
+ - Worker Thread architecture β€” UI stays responsive during large scans
132
+
133
+ ### v1.0.1 β€” AST Recommendations & Code Quality Auditor
134
+ - **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)
135
+ - **Silent Bugs expanded to 8 patterns:** Orphaned Timers, Uncaught Promise Chains, Naked `JSON.parse`, Await-in-Loop
136
+ - **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
137
+ - **Collapsible Node Status legend** in Project Map β€” collapse to save screen space; state persists in localStorage
138
+ - **Terminal boot sequence** shows all 7 security layers and all 6 active detectors on launch
139
+
140
+ ### v1.0.2 β€” SAST Security Scanner & Premium Export
141
+ - **SAST Security Scanner** β€” dedicated **SCAN SECURITY** button running `ast-security-detector.js` (6-level L1–L6) in a separate Worker Thread
142
+ - **Security Issues Tab** β€” severity-tagged findings with code snippet, file location, and searchable list
143
+ - **Security Statistics Sidebar** β€” per-severity issue count, toggleable filter badges
144
+ - **PDF Export** β€” A4 PDF via Electron `printToPDF`; no printer required
145
+ - **Premium HTML Export** β€” single-file dark-theme shareable report
146
+ - **Native Save Dialog** β€” all 4 formats (JSON/HTML/CSV/PDF) use `dialog.showSaveDialog` via IPC
147
+
148
+ ### v1.0.3 β€” Health Score, SARIF, Config & QoL
149
+ - **Project Health Score** β€” A–F grade ring in sidebar; embedded in HTML export
150
+ - **SARIF 2.1.0 Export** β€” GitHub Code Scanning, Azure DevOps, VS Code SARIF Viewer compatible
151
+ - **Mark as False Positive** β€” copies exact suppress comment to clipboard for any issue
152
+ - **`.junksweeper.json` config** β€” per-project `minConfidence`, `ignorePatterns`, detector toggles, `excludePatterns`
153
+ - **Issues tab severity chips** β€” ALL / HIGH / MEDIUM / LOW filter chips
154
+
155
+ ### v1.0.4 β€” Security UX, Node Status Legend & Graph Export
156
+ - **Security tab severity chips** β€” ALL / CRITICAL / HIGH / MEDIUM / LOW; synced with sidebar badge filter
157
+ - **Security ⚠N badge** repositioned on map cards β€” no longer overlaps Electron role badge
158
+ - **Node Status legend** reorganised β€” Clean / Minor / Critical / npm / Gateway Box with accurate colours
159
+ - **Graph Export button** (⬆ in map toolbar) β€” Mermaid Β· Draw.io XML Β· Excalidraw JSON Β· Graphviz .dot
160
+
161
+ ---
162
+
86
163
  ## πŸ“¦ Platform Support
87
164
 
88
165
  | Platform | Architecture | Status |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chahuadev/junk-sweeper-app",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "description": "Chahuadev Junk Sweeper β€” AST-based dead code & silent bug detector with interactive architecture map",
5
5
  "main": "index.js",
6
6
  "bin": {