@pythonidaer/complexity-report 1.0.2 → 1.0.3
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/CHANGELOG.md +6 -0
- package/README.md +18 -17
- package/package.json +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.0.3] - 2026-02-08
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- README Markdown: corrected fenced code blocks for npm display (removed escaped backticks).
|
|
12
|
+
- Installation section: use `npm install -D @pythonidaer/complexity-report`.
|
|
13
|
+
|
|
8
14
|
## [1.0.2] - 2026-02-08
|
|
9
15
|
|
|
10
16
|
### Changed
|
package/README.md
CHANGED
|
@@ -17,14 +17,14 @@
|
|
|
17
17
|
|
|
18
18
|
## Installation
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
npm install
|
|
22
|
-
|
|
20
|
+
```bash
|
|
21
|
+
npm install -D @pythonidaer/complexity-report
|
|
22
|
+
```
|
|
23
23
|
|
|
24
24
|
## Requirements
|
|
25
25
|
|
|
26
26
|
- **Node.js**: >=18
|
|
27
|
-
- **ESLint**: >=9.0.0 with flat config (
|
|
27
|
+
- **ESLint**: >=9.0.0 with flat config (`eslint.config.js`)
|
|
28
28
|
|
|
29
29
|
Your project must have an ESLint flat config file. The tool will use your project's ESLint configuration to analyze complexity.
|
|
30
30
|
|
|
@@ -34,17 +34,17 @@ Your project must have an ESLint flat config file. The tool will use your projec
|
|
|
34
34
|
|
|
35
35
|
Run from your project root:
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
```bash
|
|
38
38
|
npx complexity-report
|
|
39
|
-
|
|
39
|
+
```
|
|
40
40
|
|
|
41
|
-
This generates an interactive HTML report at
|
|
41
|
+
This generates an interactive HTML report at `complexity/index.html`.
|
|
42
42
|
|
|
43
43
|
### With npm Scripts
|
|
44
44
|
|
|
45
|
-
Add to your
|
|
45
|
+
Add to your `package.json`:
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
```json
|
|
48
48
|
{
|
|
49
49
|
"scripts": {
|
|
50
50
|
"complexity": "complexity-report",
|
|
@@ -55,13 +55,13 @@ Add to your \`package.json\`:
|
|
|
55
55
|
|
|
56
56
|
Then run:
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
```bash
|
|
59
59
|
npm run complexity
|
|
60
|
-
|
|
60
|
+
```
|
|
61
61
|
|
|
62
62
|
## CLI Options
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
```bash
|
|
65
65
|
complexity-report [options]
|
|
66
66
|
|
|
67
67
|
Options:
|
|
@@ -73,11 +73,11 @@ Options:
|
|
|
73
73
|
--no-lines Hide line numbers initially
|
|
74
74
|
--no-highlights Hide code highlights initially
|
|
75
75
|
--export Generate TXT/MD exports
|
|
76
|
-
|
|
76
|
+
```
|
|
77
77
|
|
|
78
78
|
## Programmatic API
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
```javascript
|
|
81
81
|
import { generateComplexityReport } from '@pythonidaer/complexity-report';
|
|
82
82
|
|
|
83
83
|
const result = await generateComplexityReport({
|
|
@@ -87,9 +87,9 @@ const result = await generateComplexityReport({
|
|
|
87
87
|
shouldExport: true,
|
|
88
88
|
});
|
|
89
89
|
|
|
90
|
-
console.log(
|
|
91
|
-
console.log(
|
|
92
|
-
|
|
90
|
+
console.log(`Generated report in: ${result.complexityDir}`);
|
|
91
|
+
console.log(`Total functions: ${result.stats.allFunctionsCount}`);
|
|
92
|
+
```
|
|
93
93
|
|
|
94
94
|
## Documentation
|
|
95
95
|
|
|
@@ -97,6 +97,7 @@ console.log(\`Total functions: \${result.stats.allFunctionsCount}\`);
|
|
|
97
97
|
- [Developer Guide](./docs/DEVELOPER.md)
|
|
98
98
|
- [Migration Guide](./docs/MIGRATION.md)
|
|
99
99
|
- [Changelog](./CHANGELOG.md)
|
|
100
|
+
- [Publishing to npm](./PUBLISH.md) — for maintainers
|
|
100
101
|
|
|
101
102
|
## License
|
|
102
103
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pythonidaer/complexity-report",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "AST-based cyclomatic complexity analyzer with interactive HTML reports and detailed function breakdowns",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -60,5 +60,8 @@
|
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|
|
62
62
|
"eslint": ">=9.0.0"
|
|
63
|
+
},
|
|
64
|
+
"publishConfig": {
|
|
65
|
+
"access": "public"
|
|
63
66
|
}
|
|
64
67
|
}
|