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