@aiready/change-amplification 0.9.3 → 0.9.5

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.
@@ -1,6 +1,6 @@
1
1
 
2
2
  
3
- > @aiready/change-amplification@0.9.2 build /Users/pengcao/projects/aiready/packages/change-amplification
3
+ > @aiready/change-amplification@0.9.4 build /Users/pengcao/projects/aiready/packages/change-amplification
4
4
  > tsup src/index.ts src/cli.ts --format cjs,esm --dts
5
5
 
6
6
  CLI Building entry: src/cli.ts, src/index.ts
@@ -10,7 +10,7 @@
10
10
  CJS Build start
11
11
  ESM Build start
12
12
 
13
-  WARN  ▲ [WARNING] The condition "types" here will never be used as it comes after both "import" and "require" [package.json] 8:22:46 pm
13
+  WARN  ▲ [WARNING] The condition "types" here will never be used as it comes after both "import" and "require" [package.json] 9:38:41 pm
14
14
 
15
15
  package.json:33:6:
16
16
   33 │ "types": "./dist/index.d.ts"
@@ -31,7 +31,7 @@
31
31
 
32
32
 
33
33
 
34
-  WARN  ▲ [WARNING] The condition "types" here will never be used as it comes after both "import" and "require" [package.json] 8:22:46 pm
34
+  WARN  ▲ [WARNING] The condition "types" here will never be used as it comes after both "import" and "require" [package.json] 9:38:41 pm
35
35
 
36
36
  package.json:38:6:
37
37
   38 │ "types": "./dist/cli.d.ts"
@@ -52,7 +52,7 @@
52
52
 
53
53
 
54
54
 
55
-  WARN  ▲ [WARNING] The condition "types" here will never be used as it comes after both "import" and "require" [package.json] 8:22:46 pm
55
+  WARN  ▲ [WARNING] The condition "types" here will never be used as it comes after both "import" and "require" [package.json] 9:38:41 pm
56
56
 
57
57
  package.json:33:6:
58
58
   33 │ "types": "./dist/index.d.ts"
@@ -73,7 +73,7 @@
73
73
 
74
74
 
75
75
 
76
-  WARN  ▲ [WARNING] The condition "types" here will never be used as it comes after both "import" and "require" [package.json] 8:22:46 pm
76
+  WARN  ▲ [WARNING] The condition "types" here will never be used as it comes after both "import" and "require" [package.json] 9:38:41 pm
77
77
 
78
78
  package.json:38:6:
79
79
   38 │ "types": "./dist/cli.d.ts"
@@ -93,15 +93,15 @@
93
93
 
94
94
 
95
95
 
96
- ESM dist/cli.mjs 2.78 KB
97
96
  ESM dist/index.mjs 110.00 B
97
+ ESM dist/cli.mjs 2.78 KB
98
98
  ESM dist/chunk-GLHIV53G.mjs 3.79 KB
99
- ESM ⚡️ Build success in 126ms
100
- CJS dist/cli.js 7.98 KB
99
+ ESM ⚡️ Build success in 154ms
101
100
  CJS dist/index.js 5.11 KB
102
- CJS ⚡️ Build success in 127ms
101
+ CJS dist/cli.js 7.98 KB
102
+ CJS ⚡️ Build success in 155ms
103
103
  DTS Build start
104
- DTS ⚡️ Build success in 1817ms
104
+ DTS ⚡️ Build success in 3747ms
105
105
  DTS dist/cli.d.ts 152.00 B
106
106
  DTS dist/index.d.ts 941.00 B
107
107
  DTS dist/cli.d.mts 152.00 B
@@ -1,16 +1,16 @@
1
1
 
2
2
  
3
- > @aiready/change-amplification@0.9.2 test /Users/pengcao/projects/aiready/packages/change-amplification
3
+ > @aiready/change-amplification@0.9.4 test /Users/pengcao/projects/aiready/packages/change-amplification
4
4
  > vitest run
5
5
 
6
6
  [?25l
7
7
   RUN  v4.0.18 /Users/pengcao/projects/aiready/packages/change-amplification
8
8
 
9
- ✓ src/__tests__/dummy.test.ts (1 test) 4ms
9
+ ✓ src/__tests__/dummy.test.ts (1 test) 2ms
10
10
 
11
11
   Test Files  1 passed (1)
12
12
   Tests  1 passed (1)
13
-  Start at  20:23:03
14
-  Duration  791ms (transform 146ms, setup 0ms, import 169ms, tests 4ms, environment 0ms)
13
+  Start at  21:39:02
14
+  Duration  395ms (transform 81ms, setup 0ms, import 98ms, tests 2ms, environment 0ms)
15
15
 
16
16
  [?25h
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiready/change-amplification",
3
- "version": "0.9.3",
3
+ "version": "0.9.5",
4
4
  "description": "AI-Readiness: Change Amplification Detection",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -10,7 +10,7 @@
10
10
  "commander": "^14.0.0",
11
11
  "glob": "^13.0.0",
12
12
  "chalk": "^5.3.0",
13
- "@aiready/core": "0.19.3"
13
+ "@aiready/core": "0.19.5"
14
14
  },
15
15
  "devDependencies": {
16
16
  "@types/node": "^24.0.0",
package/src/analyzer.ts CHANGED
@@ -99,7 +99,8 @@ export async function analyzeChangeAmplification(
99
99
  if (hotspot.amplificationFactor > 20) {
100
100
  issues.push({
101
101
  type: IssueType.ChangeAmplification,
102
- severity: hotspot.amplificationFactor > 40 ? Severity.Critical : Severity.Major,
102
+ severity:
103
+ hotspot.amplificationFactor > 40 ? Severity.Critical : Severity.Major,
103
104
  message: `High change amplification detected (Factor: ${hotspot.amplificationFactor}). Changes here cascade heavily.`,
104
105
  location: { file: hotspot.file, line: 1 },
105
106
  suggestion: `Reduce coupling. Fan-out is ${hotspot.fanOut}, Fan-in is ${hotspot.fanIn}.`,
@@ -128,7 +129,8 @@ export async function analyzeChangeAmplification(
128
129
  0
129
130
  ),
130
131
  majorIssues: results.reduce(
131
- (sum, r) => sum + r.issues.filter((i) => getLevel(i.severity) === 3).length,
132
+ (sum, r) =>
133
+ sum + r.issues.filter((i) => getLevel(i.severity) === 3).length,
132
134
  0
133
135
  ),
134
136
  score: riskResult.score,
package/src/types.ts CHANGED
@@ -1,4 +1,9 @@
1
- import type { ScanOptions, AnalysisResult, Issue, IssueType } from '@aiready/core';
1
+ import type {
2
+ ScanOptions,
3
+ AnalysisResult,
4
+ Issue,
5
+ IssueType,
6
+ } from '@aiready/core';
2
7
 
3
8
  export interface ChangeAmplificationOptions extends ScanOptions {}
4
9