complexity-guard 0.3.0 → 0.4.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 +2 -0
  2. package/package.json +6 -6
package/README.md CHANGED
@@ -30,6 +30,7 @@ src/auth/login.ts
30
30
 
31
31
  Analyzed 12 files, 47 functions
32
32
  Found 3 warnings, 1 errors
33
+ Health: 73
33
34
 
34
35
  Top cyclomatic hotspots:
35
36
  1. handleComplexAuthFlow (src/auth/login.ts:89) complexity 25
@@ -52,6 +53,7 @@ Top Halstead volume hotspots:
52
53
  - **Cognitive Complexity**: SonarSource-based metric with nesting depth penalties — measures understandability
53
54
  - **Halstead Metrics**: Information-theoretic vocabulary density, volume, difficulty, effort, and estimated bugs
54
55
  - **Structural Metrics**: Function length, parameter count, nesting depth, file length, and export count
56
+ - **Composite Health Score**: Single 0–100 score combining all metric families with configurable weights — enforce in CI with `--fail-health-below`
55
57
  - **Console + JSON Output**: Human-readable terminal display and machine-readable JSON for CI integration
56
58
  - **Configurable Thresholds**: Warning and error levels for all four metric families, customizable per project
57
59
  - **Selective Metrics**: Use `--metrics cyclomatic,halstead` to compute only specific families
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "Ben van de Sande",
5
5
  "email": "info@getlean.digital"
6
6
  },
7
- "version": "0.3.0",
7
+ "version": "0.4.0",
8
8
  "description": "Fast complexity analysis for TypeScript/JavaScript — single static binary",
9
9
  "bin": {
10
10
  "complexity-guard": "bin/complexity-guard.js"
@@ -13,11 +13,11 @@
13
13
  "bin/"
14
14
  ],
15
15
  "optionalDependencies": {
16
- "@complexity-guard/darwin-arm64": "0.3.0",
17
- "@complexity-guard/darwin-x64": "0.3.0",
18
- "@complexity-guard/linux-arm64": "0.3.0",
19
- "@complexity-guard/linux-x64": "0.3.0",
20
- "@complexity-guard/windows-x64": "0.3.0"
16
+ "@complexity-guard/darwin-arm64": "0.4.0",
17
+ "@complexity-guard/darwin-x64": "0.4.0",
18
+ "@complexity-guard/linux-arm64": "0.4.0",
19
+ "@complexity-guard/linux-x64": "0.4.0",
20
+ "@complexity-guard/windows-x64": "0.4.0"
21
21
  },
22
22
  "license": "MIT",
23
23
  "repository": {