@aiready/change-amplification 0.13.2 → 0.13.4
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/.turbo/turbo-build.log +9 -9
- package/.turbo/turbo-lint.log +10 -6
- package/.turbo/turbo-test.log +6 -6
- package/dist/cli.js +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/index.d.mts +2 -11
- package/dist/index.d.ts +2 -11
- package/dist/index.js +4 -4
- package/dist/index.mjs +4 -4
- package/package.json +2 -2
- package/src/__tests__/cli.test.ts +0 -1
- package/src/cli.ts +1 -1
- package/src/scoring.ts +5 -5
- package/src/types.ts +3 -11
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
> @aiready/change-amplification@0.13.
|
|
3
|
+
> @aiready/change-amplification@0.13.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
|
[34mCLI[39m Building entry: src/cli.ts, src/index.ts
|
|
@@ -9,16 +9,16 @@
|
|
|
9
9
|
[34mCLI[39m Target: es2020
|
|
10
10
|
[34mCJS[39m Build start
|
|
11
11
|
[34mESM[39m Build start
|
|
12
|
-
[32mCJS[39m [1mdist/cli.js [22m[32m9.
|
|
13
|
-
[32mCJS[39m [1mdist/index.js [22m[32m7.
|
|
14
|
-
[32mCJS[39m ⚡️ Build success in
|
|
12
|
+
[32mCJS[39m [1mdist/cli.js [22m[32m9.02 KB[39m
|
|
13
|
+
[32mCJS[39m [1mdist/index.js [22m[32m7.93 KB[39m
|
|
14
|
+
[32mCJS[39m ⚡️ Build success in 72ms
|
|
15
15
|
[32mESM[39m [1mdist/cli.mjs [22m[32m2.78 KB[39m
|
|
16
|
-
[32mESM[39m [1mdist/index.mjs [22m[32m1.
|
|
16
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m1.72 KB[39m
|
|
17
17
|
[32mESM[39m [1mdist/chunk-OBBL7HKE.mjs [22m[32m4.82 KB[39m
|
|
18
|
-
[32mESM[39m ⚡️ Build success in
|
|
18
|
+
[32mESM[39m ⚡️ Build success in 73ms
|
|
19
19
|
DTS Build start
|
|
20
|
-
DTS ⚡️ Build success in
|
|
20
|
+
DTS ⚡️ Build success in 5201ms
|
|
21
21
|
DTS dist/cli.d.ts 152.00 B
|
|
22
|
-
DTS dist/index.d.ts 1.
|
|
22
|
+
DTS dist/index.d.ts 1.14 KB
|
|
23
23
|
DTS dist/cli.d.mts 152.00 B
|
|
24
|
-
DTS dist/index.d.mts 1.
|
|
24
|
+
DTS dist/index.d.mts 1.14 KB
|
package/.turbo/turbo-lint.log
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
|
|
2
|
+
> @aiready/change-amplification@0.13.2 lint /Users/pengcao/projects/aiready/packages/change-amplification
|
|
3
|
+
> eslint src --ext .ts
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
/Users/pengcao/projects/aiready/packages/change-amplification/src/__tests__/cli.test.ts
|
|
7
|
+
3:13 warning 'analyzer' is defined but never used @typescript-eslint/no-unused-vars
|
|
8
|
+
|
|
9
|
+
✖ 1 problem (0 errors, 1 warning)
|
|
10
|
+
|
package/.turbo/turbo-test.log
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
> @aiready/change-amplification@0.13.
|
|
3
|
+
> @aiready/change-amplification@0.13.3 test /Users/pengcao/projects/aiready/packages/change-amplification
|
|
4
4
|
> vitest run
|
|
5
5
|
|
|
6
6
|
[?25l
|
|
@@ -8,17 +8,17 @@
|
|
|
8
8
|
|
|
9
9
|
[32m✓[39m src/__tests__/dummy.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 1[2mms[22m[39m
|
|
10
10
|
[32m✓[39m src/__tests__/cli.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 2[2mms[22m[39m
|
|
11
|
-
[32m✓[39m src/__tests__/scoring.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 55[2mms[22m[39m
|
|
12
11
|
[90mstdout[2m | src/__tests__/analyzer.test.ts[2m > [22m[2manalyzeChangeAmplification reproduction[2m > [22m[2mshould see how it gets to 0
|
|
13
12
|
[22m[39mResulting score for highly coupled: [33m27[39m
|
|
14
13
|
Rating: explosive
|
|
15
14
|
|
|
16
|
-
[32m✓[39m src/__tests__/
|
|
17
|
-
[32m✓[39m src/__tests__/
|
|
15
|
+
[32m✓[39m src/__tests__/provider.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 5[2mms[22m[39m
|
|
16
|
+
[32m✓[39m src/__tests__/scoring.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 2[2mms[22m[39m
|
|
17
|
+
[32m✓[39m src/__tests__/analyzer.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
18
18
|
|
|
19
19
|
[2m Test Files [22m [1m[32m5 passed[39m[22m[90m (5)[39m
|
|
20
20
|
[2m Tests [22m [1m[32m9 passed[39m[22m[90m (9)[39m
|
|
21
|
-
[2m Start at [22m
|
|
22
|
-
[2m Duration [22m
|
|
21
|
+
[2m Start at [22m 10:36:27
|
|
22
|
+
[2m Duration [22m 1.50s[2m (transform 732ms, setup 0ms, import 2.82s, tests 13ms, environment 0ms)[22m
|
|
23
23
|
|
|
24
24
|
[?25h
|
package/dist/cli.js
CHANGED
|
@@ -185,7 +185,7 @@ var changeAmplificationAction = async (directory, options) => {
|
|
|
185
185
|
}
|
|
186
186
|
console.log(import_chalk.default.bold("\n\u{1F310} Change Amplification Analysis\n"));
|
|
187
187
|
console.log(`Rating: ${import_chalk.default.bold(report.summary.rating)}`);
|
|
188
|
-
console.log(`Score: ${Math.round(report.summary.score)}/100`);
|
|
188
|
+
console.log(`Score: ${Math.round(report.summary.score ?? 0)}/100`);
|
|
189
189
|
console.log(`Critical Issues: ${report.summary.criticalIssues}`);
|
|
190
190
|
console.log(`Major Issues: ${report.summary.majorIssues}`);
|
|
191
191
|
if (report.summary.recommendations.length > 0) {
|
package/dist/cli.mjs
CHANGED
|
@@ -25,7 +25,7 @@ var changeAmplificationAction = async (directory, options) => {
|
|
|
25
25
|
}
|
|
26
26
|
console.log(chalk.bold("\n\u{1F310} Change Amplification Analysis\n"));
|
|
27
27
|
console.log(`Rating: ${chalk.bold(report.summary.rating)}`);
|
|
28
|
-
console.log(`Score: ${Math.round(report.summary.score)}/100`);
|
|
28
|
+
console.log(`Score: ${Math.round(report.summary.score ?? 0)}/100`);
|
|
29
29
|
console.log(`Critical Issues: ${report.summary.criticalIssues}`);
|
|
30
30
|
console.log(`Major Issues: ${report.summary.majorIssues}`);
|
|
31
31
|
if (report.summary.recommendations.length > 0) {
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _aiready_core from '@aiready/core';
|
|
2
|
-
import { Issue, IssueType, ScanOptions, AnalysisResult, ToolScoringOutput } from '@aiready/core';
|
|
2
|
+
import { Issue, IssueType, ScanOptions, SpokeOutput, AnalysisResult, ToolScoringOutput } from '@aiready/core';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Change Amplification Tool Provider
|
|
@@ -13,16 +13,7 @@ interface ChangeAmplificationIssue extends Issue {
|
|
|
13
13
|
interface FileChangeAmplificationResult extends AnalysisResult {
|
|
14
14
|
issues: ChangeAmplificationIssue[];
|
|
15
15
|
}
|
|
16
|
-
interface ChangeAmplificationReport {
|
|
17
|
-
summary: {
|
|
18
|
-
totalFiles: number;
|
|
19
|
-
totalIssues: number;
|
|
20
|
-
criticalIssues: number;
|
|
21
|
-
majorIssues: number;
|
|
22
|
-
score: number;
|
|
23
|
-
rating: string;
|
|
24
|
-
recommendations: string[];
|
|
25
|
-
};
|
|
16
|
+
interface ChangeAmplificationReport extends SpokeOutput {
|
|
26
17
|
results: FileChangeAmplificationResult[];
|
|
27
18
|
}
|
|
28
19
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _aiready_core from '@aiready/core';
|
|
2
|
-
import { Issue, IssueType, ScanOptions, AnalysisResult, ToolScoringOutput } from '@aiready/core';
|
|
2
|
+
import { Issue, IssueType, ScanOptions, SpokeOutput, AnalysisResult, ToolScoringOutput } from '@aiready/core';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Change Amplification Tool Provider
|
|
@@ -13,16 +13,7 @@ interface ChangeAmplificationIssue extends Issue {
|
|
|
13
13
|
interface FileChangeAmplificationResult extends AnalysisResult {
|
|
14
14
|
issues: ChangeAmplificationIssue[];
|
|
15
15
|
}
|
|
16
|
-
interface ChangeAmplificationReport {
|
|
17
|
-
summary: {
|
|
18
|
-
totalFiles: number;
|
|
19
|
-
totalIssues: number;
|
|
20
|
-
criticalIssues: number;
|
|
21
|
-
majorIssues: number;
|
|
22
|
-
score: number;
|
|
23
|
-
rating: string;
|
|
24
|
-
recommendations: string[];
|
|
25
|
-
};
|
|
16
|
+
interface ChangeAmplificationReport extends SpokeOutput {
|
|
26
17
|
results: FileChangeAmplificationResult[];
|
|
27
18
|
}
|
|
28
19
|
|
package/dist/index.js
CHANGED
|
@@ -199,18 +199,18 @@ function calculateChangeAmplificationScore(report) {
|
|
|
199
199
|
const factors = [
|
|
200
200
|
{
|
|
201
201
|
name: "Graph Stability",
|
|
202
|
-
impact: Math.round(summary.score - 50),
|
|
203
|
-
description: summary.score < 30 ? "High coupling detected in core modules" : "Stable dependency structure"
|
|
202
|
+
impact: Math.round((summary.score ?? 0) - 50),
|
|
203
|
+
description: (summary.score ?? 0) < 30 ? "High coupling detected in core modules" : "Stable dependency structure"
|
|
204
204
|
}
|
|
205
205
|
];
|
|
206
206
|
const recommendations = summary.recommendations.map((rec) => ({
|
|
207
207
|
action: rec,
|
|
208
208
|
estimatedImpact: 10,
|
|
209
|
-
priority: summary.score < 50 ? "high" : "medium"
|
|
209
|
+
priority: (summary.score ?? 0) < 50 ? "high" : "medium"
|
|
210
210
|
}));
|
|
211
211
|
return {
|
|
212
212
|
toolName: import_core3.ToolName.ChangeAmplification,
|
|
213
|
-
score: summary.score,
|
|
213
|
+
score: summary.score ?? 0,
|
|
214
214
|
rawMetrics: {
|
|
215
215
|
totalFiles: summary.totalFiles,
|
|
216
216
|
totalIssues: summary.totalIssues,
|
package/dist/index.mjs
CHANGED
|
@@ -40,18 +40,18 @@ function calculateChangeAmplificationScore(report) {
|
|
|
40
40
|
const factors = [
|
|
41
41
|
{
|
|
42
42
|
name: "Graph Stability",
|
|
43
|
-
impact: Math.round(summary.score - 50),
|
|
44
|
-
description: summary.score < 30 ? "High coupling detected in core modules" : "Stable dependency structure"
|
|
43
|
+
impact: Math.round((summary.score ?? 0) - 50),
|
|
44
|
+
description: (summary.score ?? 0) < 30 ? "High coupling detected in core modules" : "Stable dependency structure"
|
|
45
45
|
}
|
|
46
46
|
];
|
|
47
47
|
const recommendations = summary.recommendations.map((rec) => ({
|
|
48
48
|
action: rec,
|
|
49
49
|
estimatedImpact: 10,
|
|
50
|
-
priority: summary.score < 50 ? "high" : "medium"
|
|
50
|
+
priority: (summary.score ?? 0) < 50 ? "high" : "medium"
|
|
51
51
|
}));
|
|
52
52
|
return {
|
|
53
53
|
toolName: ToolName2.ChangeAmplification,
|
|
54
|
-
score: summary.score,
|
|
54
|
+
score: summary.score ?? 0,
|
|
55
55
|
rawMetrics: {
|
|
56
56
|
totalFiles: summary.totalFiles,
|
|
57
57
|
totalIssues: summary.totalIssues,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aiready/change-amplification",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.4",
|
|
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.23.
|
|
13
|
+
"@aiready/core": "0.23.4"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
16
|
"@types/node": "^24.0.0",
|
package/src/cli.ts
CHANGED
|
@@ -29,7 +29,7 @@ export const changeAmplificationAction = async (
|
|
|
29
29
|
|
|
30
30
|
console.log(chalk.bold('\n🌐 Change Amplification Analysis\n'));
|
|
31
31
|
console.log(`Rating: ${chalk.bold(report.summary.rating)}`);
|
|
32
|
-
console.log(`Score: ${Math.round(report.summary.score)}/100`);
|
|
32
|
+
console.log(`Score: ${Math.round(report.summary.score ?? 0)}/100`);
|
|
33
33
|
console.log(`Critical Issues: ${report.summary.criticalIssues}`);
|
|
34
34
|
console.log(`Major Issues: ${report.summary.majorIssues}`);
|
|
35
35
|
|
package/src/scoring.ts
CHANGED
|
@@ -13,24 +13,24 @@ export function calculateChangeAmplificationScore(
|
|
|
13
13
|
const factors: ToolScoringOutput['factors'] = [
|
|
14
14
|
{
|
|
15
15
|
name: 'Graph Stability',
|
|
16
|
-
impact: Math.round(summary.score - 50),
|
|
16
|
+
impact: Math.round((summary.score ?? 0) - 50),
|
|
17
17
|
description:
|
|
18
|
-
summary.score < 30
|
|
18
|
+
(summary.score ?? 0) < 30
|
|
19
19
|
? 'High coupling detected in core modules'
|
|
20
20
|
: 'Stable dependency structure',
|
|
21
21
|
},
|
|
22
22
|
];
|
|
23
23
|
|
|
24
24
|
const recommendations: ToolScoringOutput['recommendations'] =
|
|
25
|
-
summary.recommendations.map((rec) => ({
|
|
25
|
+
summary.recommendations.map((rec: string) => ({
|
|
26
26
|
action: rec,
|
|
27
27
|
estimatedImpact: 10,
|
|
28
|
-
priority: summary.score < 50 ? 'high' : 'medium',
|
|
28
|
+
priority: (summary.score ?? 0) < 50 ? 'high' : 'medium',
|
|
29
29
|
}));
|
|
30
30
|
|
|
31
31
|
return {
|
|
32
32
|
toolName: ToolName.ChangeAmplification,
|
|
33
|
-
score: summary.score,
|
|
33
|
+
score: summary.score ?? 0,
|
|
34
34
|
rawMetrics: {
|
|
35
35
|
totalFiles: summary.totalFiles,
|
|
36
36
|
totalIssues: summary.totalIssues,
|
package/src/types.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import {
|
|
2
2
|
ScanOptions,
|
|
3
3
|
AnalysisResult,
|
|
4
4
|
Issue,
|
|
5
5
|
IssueType,
|
|
6
|
+
SpokeOutput,
|
|
6
7
|
} from '@aiready/core';
|
|
7
8
|
|
|
8
9
|
export type ChangeAmplificationOptions = ScanOptions;
|
|
@@ -15,15 +16,6 @@ export interface FileChangeAmplificationResult extends AnalysisResult {
|
|
|
15
16
|
issues: ChangeAmplificationIssue[];
|
|
16
17
|
}
|
|
17
18
|
|
|
18
|
-
export interface ChangeAmplificationReport {
|
|
19
|
-
summary: {
|
|
20
|
-
totalFiles: number;
|
|
21
|
-
totalIssues: number;
|
|
22
|
-
criticalIssues: number;
|
|
23
|
-
majorIssues: number;
|
|
24
|
-
score: number;
|
|
25
|
-
rating: string;
|
|
26
|
-
recommendations: string[];
|
|
27
|
-
};
|
|
19
|
+
export interface ChangeAmplificationReport extends SpokeOutput {
|
|
28
20
|
results: FileChangeAmplificationResult[];
|
|
29
21
|
}
|