energy-state-analyzer 0.1.2 → 0.3.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.
Binary file
Binary file
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "energy-state-analyzer",
3
3
  "displayName": "Energy State Analyzer",
4
- "description": "Visualize code energy states in real-time (Python, F#, TypeScript)",
5
- "version": "0.1.2",
4
+ "description": "Visualize code energy states in real-time (Python, F#, TypeScript, Kotlin)",
5
+ "version": "0.3.0",
6
6
  "publisher": "cardamom-code",
7
7
  "license": "MIT",
8
8
  "icon": "images/icon.png",
@@ -22,6 +22,7 @@
22
22
  "python",
23
23
  "fsharp",
24
24
  "typescript",
25
+ "kotlin",
25
26
  "code quality",
26
27
  "cyclomatic complexity",
27
28
  "cognitive complexity",
@@ -32,7 +33,8 @@
32
33
  "activationEvents": [
33
34
  "onLanguage:python",
34
35
  "onLanguage:fsharp",
35
- "onLanguage:typescript"
36
+ "onLanguage:typescript",
37
+ "onLanguage:kotlin"
36
38
  ],
37
39
  "main": "./dist/extension.js",
38
40
  "bin": {
@@ -97,10 +99,53 @@
97
99
  "minimum": 1,
98
100
  "description": "Number of large functions (see largeFunctionLines) a file can contain before it's flagged for coherence."
99
101
  },
100
- "energyStateAnalyzer.magicValues.enabled": {
102
+ "energyStateAnalyzer.coherence.singleDomainNameShare": {
103
+ "type": "number",
104
+ "default": 0.7,
105
+ "minimum": 0,
106
+ "maximum": 1,
107
+ "description": "Share of a file's functions that must share a leading name word (e.g. extractFoo/extractBar) to treat the file as one coherent domain and skip the function-count sprawl check."
108
+ },
109
+ "energyStateAnalyzer.magicNumber.enabled": {
110
+ "type": "boolean",
111
+ "default": true,
112
+ "description": "Whether to flag magic numbers."
113
+ },
114
+ "energyStateAnalyzer.magicNumber.allowlist": {
115
+ "type": "array",
116
+ "items": {
117
+ "type": "number"
118
+ },
119
+ "default": [
120
+ 0,
121
+ 1,
122
+ -1,
123
+ 2
124
+ ],
125
+ "description": "Numeric literals that are never flagged as magic numbers, regardless of context."
126
+ },
127
+ "energyStateAnalyzer.magicString.enabled": {
101
128
  "type": "boolean",
102
129
  "default": true,
103
- "description": "Whether to flag magic numbers and message-shaped string literals."
130
+ "description": "Whether to flag magic strings (string literals compared, checked for membership, or used as a dict/object key)."
131
+ },
132
+ "energyStateAnalyzer.magicString.minDuplicates": {
133
+ "type": "number",
134
+ "default": 2,
135
+ "minimum": 1,
136
+ "description": "Number of times the same string literal must recur at a decision point before it's flagged as a magic string."
137
+ },
138
+ "energyStateAnalyzer.magicString.allowlist": {
139
+ "type": "array",
140
+ "items": {
141
+ "type": "string"
142
+ },
143
+ "default": [
144
+ "",
145
+ "utf-8",
146
+ "__main__"
147
+ ],
148
+ "description": "String literals that are never flagged as magic strings, regardless of context."
104
149
  },
105
150
  "energyStateAnalyzer.matchOpportunity.minBranches": {
106
151
  "type": "number",
@@ -143,23 +188,27 @@
143
188
  "watch-tests": "tsc -p . -w --outDir out",
144
189
  "pretest": "npm run compile-tests && npm run compile && npm run lint",
145
190
  "lint": "eslint src",
146
- "test": "node ./out/test/runTest.js",
147
- "analyze": "node dist/cli.js"
191
+ "test": "vscode-test",
192
+ "analyze": "node dist/cli.js",
193
+ "license-check": "license-checker --production --onlyAllow \"MIT;Apache-2.0;BSD-2-Clause;BSD-3-Clause;ISC;0BSD;CC0-1.0;Unlicense\" --excludePackages \"$npm_package_name@$npm_package_version\""
148
194
  },
149
195
  "devDependencies": {
150
196
  "@types/mocha": "^10.0.10",
151
- "@types/node": "16.x",
197
+ "@types/node": "26.x",
152
198
  "@types/vscode": "^1.74.0",
199
+ "@vscode/test-cli": "^0.0.15",
200
+ "@vscode/test-electron": "^3.1.0",
153
201
  "@vscode/vsce": "^3.2.1",
154
- "copy-webpack-plugin": "^13.0.0",
155
- "eslint": "^8.28.0",
202
+ "copy-webpack-plugin": "^14.0.0",
203
+ "eslint": "^10.9.0",
204
+ "license-checker": "^25.0.1",
156
205
  "ts-loader": "^9.4.1",
157
- "typescript": "^4.9.4",
206
+ "typescript": "^5.9.3",
158
207
  "typescript-eslint": "^8.67.0",
159
208
  "webpack": "^5.75.0",
160
- "webpack-cli": "^5.0.0"
209
+ "webpack-cli": "^7.2.2"
161
210
  },
162
211
  "dependencies": {
163
- "web-tree-sitter": "^0.25.8"
212
+ "web-tree-sitter": "^0.26.12"
164
213
  }
165
214
  }