@aiready/context-analyzer 0.21.0 → 0.21.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,25 +1,24 @@
1
-
2
- 
3
- > @aiready/context-analyzer@0.20.0 build /Users/pengcao/projects/aiready/packages/context-analyzer
4
- > tsup src/index.ts src/cli.ts --format cjs,esm --dts
5
-
6
- CLI Building entry: src/cli.ts, src/index.ts
7
- CLI Using tsconfig: tsconfig.json
8
- CLI tsup v8.5.1
9
- CLI Target: es2020
10
- CJS Build start
11
- ESM Build start
12
- CJS dist/cli.js 81.47 KB
13
- CJS dist/index.js 69.83 KB
14
- CJS ⚡️ Build success in 78ms
15
- ESM dist/index.mjs 2.13 KB
16
- ESM dist/cli.mjs 19.14 KB
17
- ESM dist/chunk-CCBNKQYB.mjs 59.39 KB
18
- ESM dist/python-context-TBI5FVFY.mjs 5.66 KB
19
- ESM ⚡️ Build success in 77ms
20
- DTS Build start
21
- DTS ⚡️ Build success in 1333ms
22
- DTS dist/cli.d.ts 20.00 B
23
- DTS dist/index.d.ts 14.48 KB
24
- DTS dist/cli.d.mts 20.00 B
25
- DTS dist/index.d.mts 14.48 KB
1
+
2
+ > @aiready/context-analyzer@0.21.5 build /Users/pengcao/projects/aiready/packages/context-analyzer
3
+ > tsup src/index.ts src/cli.ts --format cjs,esm --dts
4
+
5
+ CLI Building entry: src/cli.ts, src/index.ts
6
+ CLI Using tsconfig: tsconfig.json
7
+ CLI tsup v8.5.1
8
+ CLI Target: es2020
9
+ CJS Build start
10
+ ESM Build start
11
+ ESM dist/index.mjs 2.13 KB
12
+ ESM dist/chunk-W2KNBN6W.mjs 60.66 KB
13
+ ESM dist/cli.mjs 19.14 KB
14
+ ESM dist/python-context-TBI5FVFY.mjs 5.66 KB
15
+ ESM ⚡️ Build success in 46ms
16
+ CJS dist/index.js 71.17 KB
17
+ CJS dist/cli.js 82.82 KB
18
+ CJS ⚡️ Build success in 46ms
19
+ DTS Build start
20
+ DTS ⚡️ Build success in 1205ms
21
+ DTS dist/cli.d.ts 20.00 B
22
+ DTS dist/index.d.ts 14.48 KB
23
+ DTS dist/cli.d.mts 20.00 B
24
+ DTS dist/index.d.mts 14.48 KB
@@ -1,36 +1,119 @@
1
-
2
- 
3
- > @aiready/context-analyzer@0.20.0 test /Users/pengcao/projects/aiready/packages/context-analyzer
4
- > vitest run
5
-
6
- [?25l
7
-  RUN  v4.0.18 /Users/pengcao/projects/aiready/packages/context-analyzer
8
-
9
- ✓ dist/__tests__/scoring.test.js (7 tests) 6ms
10
- ✓ dist/__tests__/analyzer.test.js (14 tests) 181ms
11
- ✓ dist/__tests__/fragmentation-coupling.test.js (2 tests) 89ms
12
- ✓ dist/__tests__/fragmentation-advanced.test.js (3 tests) 48ms
13
- ✓ dist/__tests__/auto-detection.test.js (8 tests) 289ms
14
- ✓ src/__tests__/enhanced-cohesion.test.ts (6 tests) 4ms
15
- ✓ src/__tests__/file-classification.test.ts (63 tests) 22ms
16
- ✓ src/__tests__/fragmentation-coupling.test.ts (2 tests) 28ms
17
- ✓ src/__tests__/auto-detection.test.ts (8 tests) 39ms
18
- ✓ src/__tests__/analyzer.test.ts (14 tests) 104ms
19
- ✓ src/__tests__/contract.test.ts (1 test) 29ms
20
- ✓ src/__tests__/remediation.test.ts (6 tests) 3ms
21
- ✓ src/__tests__/scoring.test.ts (7 tests) 27ms
22
- ✓ dist/__tests__/structural-cohesion.test.js (4 tests) 6ms
23
- ✓ dist/__tests__/enhanced-cohesion.test.js (6 tests) 3ms
24
- ✓ src/__tests__/cluster-detector.test.ts (3 tests) 21ms
25
- ✓ src/__tests__/provider.test.ts (2 tests) 10ms
26
- ✓ src/__tests__/fragmentation-log.test.ts (3 tests) 3ms
27
- ✓ dist/__tests__/fragmentation-log.test.js (3 tests) 2ms
28
- ✓ src/__tests__/fragmentation-advanced.test.ts (3 tests) 2ms
29
- ✓ src/__tests__/structural-cohesion.test.ts (4 tests) 2ms
30
-
31
-  Test Files  21 passed (21)
32
-  Tests  169 passed (169)
33
-  Start at  16:14:19
34
-  Duration  5.05s (transform 6.37s, setup 0ms, import 39.66s, tests 918ms, environment 114ms)
35
-
36
- [?25h
1
+
2
+ > @aiready/context-analyzer@0.21.1 test /Users/pengcao/projects/aiready/packages/context-analyzer
3
+ > vitest run
4
+
5
+
6
+  RUN  v4.0.18 /Users/pengcao/projects/aiready/packages/context-analyzer
7
+
8
+ ✓ dist/__tests__/scoring.test.js (7 tests) 2ms
9
+ ❯ src/__tests__/scoring.test.ts (7 tests | 5 failed) 10ms
10
+  × should return perfect score for ideal metrics 6ms
11
+ ✓ should penalize high context budget 0ms
12
+  × should penalize deep import chains 2ms
13
+  × should penalize high fragmentation 0ms
14
+  × should apply critical issue penalties 0ms
15
+ ✓ should handle extreme max budget penalty 0ms
16
+  × should combine multiple penalties correctly 0ms
17
+ ✓ dist/__tests__/fragmentation-coupling.test.js (2 tests) 11ms
18
+ ✓ dist/__tests__/auto-detection.test.js (8 tests) 14ms
19
+ ✓ dist/__tests__/analyzer.test.js (14 tests) 17ms
20
+ ✓ src/__tests__/provider.test.ts (2 tests) 5ms
21
+ ✓ src/__tests__/auto-detection.test.ts (8 tests) 20ms
22
+ ✓ src/__tests__/file-classification.test.ts (63 tests) 15ms
23
+ ✓ src/__tests__/analyzer.test.ts (14 tests) 30ms
24
+ ✓ src/__tests__/fragmentation-coupling.test.ts (2 tests) 28ms
25
+ ✓ src/__tests__/contract.test.ts (1 test) 19ms
26
+ ✓ dist/__tests__/fragmentation-log.test.js (3 tests) 2ms
27
+ ✓ src/__tests__/remediation.test.ts (6 tests) 3ms
28
+ ✓ src/__tests__/fragmentation-advanced.test.ts (3 tests) 1ms
29
+ ✓ src/__tests__/enhanced-cohesion.test.ts (6 tests) 2ms
30
+ ✓ src/__tests__/structural-cohesion.test.ts (4 tests) 1ms
31
+ ✓ src/__tests__/fragmentation-log.test.ts (3 tests) 2ms
32
+ ✓ dist/__tests__/enhanced-cohesion.test.js (6 tests) 2ms
33
+ ✓ dist/__tests__/structural-cohesion.test.js (4 tests) 1ms
34
+ ✓ src/__tests__/cluster-detector.test.ts (3 tests) 2ms
35
+ ✓ dist/__tests__/fragmentation-advanced.test.js (3 tests) 2ms
36
+
37
+ ⎯⎯⎯⎯⎯⎯⎯ Failed Tests 5 ⎯⎯⎯⎯⎯⎯⎯
38
+
39
+  FAIL  src/__tests__/scoring.test.ts > Context Scoring > calculateContextScore > should return perfect score for ideal metrics
40
+ AssertionError: expected 85 to be greater than or equal to 90
41
+  ❯ src/__tests__/scoring.test.ts:21:28
42
+  19|  const result = calculateContextScore(summary);
43
+  20| 
44
+  21|  expect(result.score).toBeGreaterThanOrEqual(90);
45
+  |  ^
46
+  22|  expect(result.toolName).toBe('context-analyzer');
47
+  23|  expect(result.recommendations).toHaveLength(0);
48
+
49
+ ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/5]⎯
50
+
51
+  FAIL  src/__tests__/scoring.test.ts > Context Scoring > calculateContextScore > should penalize deep import chains
52
+ AssertionError: expected 80 to be 79 // Object.is equality
53
+
54
+ - Expected
55
+ + Received
56
+
57
+ - 79
58
+ + 80
59
+
60
+  ❯ src/__tests__/scoring.test.ts:62:28
61
+  60| 
62
+  61|  // With depth=12: depthScore=30, rawScore=(100*0.4)+(30*0.3)+(10…
63
+  62|  expect(result.score).toBe(79);
64
+  |  ^
65
+  63|  expect(result.factors.some((f) => f.name === 'Import Depth')).to…
66
+  64|  expect(
67
+
68
+ ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[2/5]⎯
69
+
70
+  FAIL  src/__tests__/scoring.test.ts > Context Scoring > calculateContextScore > should penalize high fragmentation
71
+ AssertionError: expected 80 to be less than 80
72
+  ❯ src/__tests__/scoring.test.ts:83:28
73
+  81|  const result = calculateContextScore(summary);
74
+  82| 
75
+  83|  expect(result.score).toBeLessThan(80); // Adjusted threshold
76
+  |  ^
77
+  84|  expect(result.factors.some((f) => f.name === 'Fragmentation')).t…
78
+  85|  });
79
+
80
+ ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[3/5]⎯
81
+
82
+  FAIL  src/__tests__/scoring.test.ts > Context Scoring > calculateContextScore > should apply critical issue penalties
83
+ AssertionError: expected 70 to be 50 // Object.is equality
84
+
85
+ - Expected
86
+ + Received
87
+
88
+ - 50
89
+ + 70
90
+
91
+  ❯ src/__tests__/scoring.test.ts:102:28
92
+ 100| 
93
+ 101|  // Perfect subscores=100, minus 5*10=50 critical penalty = 50
94
+ 102|  expect(result.score).toBe(50);
95
+  |  ^
96
+ 103|  expect(result.factors.some((f) => f.name === 'Critical Issues'))…
97
+ 104|  true
98
+
99
+ ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[4/5]⎯
100
+
101
+  FAIL  src/__tests__/scoring.test.ts > Context Scoring > calculateContextScore > should combine multiple penalties correctly
102
+ AssertionError: expected 62 to be less than 40
103
+  ❯ src/__tests__/scoring.test.ts:146:28
104
+ 144|  const result = calculateContextScore(summary);
105
+ 145| 
106
+ 146|  expect(result.score).toBeLessThan(40);
107
+  |  ^
108
+ 147|  expect(result.factors.length).toBeGreaterThan(3);
109
+ 148|  expect(result.recommendations.length).toBeGreaterThan(0);
110
+
111
+ ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[5/5]⎯
112
+
113
+
114
+  Test Files  1 failed | 20 passed (21)
115
+  Tests  5 failed | 164 passed (169)
116
+  Start at  18:39:35
117
+  Duration  1.19s (transform 1.36s, setup 0ms, import 8.15s, tests 191ms, environment 2ms)
118
+
119
+  ELIFECYCLE  Test failed. See above for more details.