@aiready/pattern-detect 0.17.5 → 0.17.7
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/CONTRIBUTING.md +1 -1
- package/dist/index.js +2 -5
- package/dist/index.mjs +5 -8
- package/package.json +2 -2
package/CONTRIBUTING.md
CHANGED
|
@@ -4,7 +4,7 @@ Thank you for your interest in contributing to AIReady Pattern Detection! We wel
|
|
|
4
4
|
|
|
5
5
|
## 🐛 Reporting Issues
|
|
6
6
|
|
|
7
|
-
Found a bug or have a feature request? [Open an issue](https://github.com/
|
|
7
|
+
Found a bug or have a feature request? [Open an issue](https://github.com/getaiready/aiready-pattern-detect/issues) with:
|
|
8
8
|
|
|
9
9
|
- Clear description of the problem or feature
|
|
10
10
|
- Sample code that demonstrates the issue
|
package/dist/index.js
CHANGED
|
@@ -848,12 +848,9 @@ var PatternDetectProvider = {
|
|
|
848
848
|
},
|
|
849
849
|
score(output, options) {
|
|
850
850
|
const duplicates = output.summary.duplicates || [];
|
|
851
|
+
const scoreData = duplicates;
|
|
851
852
|
const totalFiles = output.summary.totalFiles || output.results.length;
|
|
852
|
-
return calculatePatternScore(
|
|
853
|
-
duplicates,
|
|
854
|
-
totalFiles,
|
|
855
|
-
options.costConfig
|
|
856
|
-
);
|
|
853
|
+
return calculatePatternScore(scoreData, totalFiles, options.costConfig);
|
|
857
854
|
},
|
|
858
855
|
defaultWeight: 22
|
|
859
856
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -6,9 +6,6 @@ import {
|
|
|
6
6
|
getSmartDefaults,
|
|
7
7
|
groupDuplicatesByFilePair
|
|
8
8
|
} from "./chunk-K7BO57OO.mjs";
|
|
9
|
-
import {
|
|
10
|
-
calculatePatternScore
|
|
11
|
-
} from "./chunk-WBBO35SC.mjs";
|
|
12
9
|
import {
|
|
13
10
|
detectDuplicatePatterns
|
|
14
11
|
} from "./chunk-NQBYYWHJ.mjs";
|
|
@@ -20,6 +17,9 @@ import {
|
|
|
20
17
|
getSeverityLabel,
|
|
21
18
|
getSeverityThreshold
|
|
22
19
|
} from "./chunk-J2G742QF.mjs";
|
|
20
|
+
import {
|
|
21
|
+
calculatePatternScore
|
|
22
|
+
} from "./chunk-WBBO35SC.mjs";
|
|
23
23
|
|
|
24
24
|
// src/index.ts
|
|
25
25
|
import { ToolRegistry, Severity } from "@aiready/core";
|
|
@@ -61,12 +61,9 @@ var PatternDetectProvider = {
|
|
|
61
61
|
},
|
|
62
62
|
score(output, options) {
|
|
63
63
|
const duplicates = output.summary.duplicates || [];
|
|
64
|
+
const scoreData = duplicates;
|
|
64
65
|
const totalFiles = output.summary.totalFiles || output.results.length;
|
|
65
|
-
return calculatePatternScore(
|
|
66
|
-
duplicates,
|
|
67
|
-
totalFiles,
|
|
68
|
-
options.costConfig
|
|
69
|
-
);
|
|
66
|
+
return calculatePatternScore(scoreData, totalFiles, options.costConfig);
|
|
70
67
|
},
|
|
71
68
|
defaultWeight: 22
|
|
72
69
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aiready/pattern-detect",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.7",
|
|
4
4
|
"description": "Semantic duplicate pattern detection for AI-generated code - finds similar implementations that waste AI context tokens",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"dependencies": {
|
|
66
66
|
"commander": "^14.0.0",
|
|
67
67
|
"chalk": "^5.3.0",
|
|
68
|
-
"@aiready/core": "0.24.
|
|
68
|
+
"@aiready/core": "0.24.7"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"tsup": "^8.3.5",
|