ucn 3.7.31 → 3.7.32
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/core/project.js +2 -2
- package/core/verify.js +8 -0
- package/package.json +1 -1
package/core/project.js
CHANGED
|
@@ -2420,7 +2420,7 @@ class ProjectIndex {
|
|
|
2420
2420
|
const symParts = symName.replace(/([a-z])([A-Z])/g, '$1_$2').toLowerCase().split('_');
|
|
2421
2421
|
|
|
2422
2422
|
// Check for shared parts (require ≥50% of the longer name to match)
|
|
2423
|
-
const sharedParts = nameParts.filter(p => symParts.includes(p) && p.length >
|
|
2423
|
+
const sharedParts = nameParts.filter(p => symParts.includes(p) && p.length > 3);
|
|
2424
2424
|
const maxParts = Math.max(nameParts.length, symParts.length);
|
|
2425
2425
|
if (sharedParts.length > 0 && sharedParts.length / maxParts >= 0.5) {
|
|
2426
2426
|
const sym = symbols[0];
|
|
@@ -2786,7 +2786,7 @@ class ProjectIndex {
|
|
|
2786
2786
|
try {
|
|
2787
2787
|
const maxCallers = options.all ? Infinity : (options.maxCallers || 10);
|
|
2788
2788
|
const maxCallees = options.all ? Infinity : (options.maxCallees || 10);
|
|
2789
|
-
const includeMethods = options.includeMethods ??
|
|
2789
|
+
const includeMethods = options.includeMethods ?? false;
|
|
2790
2790
|
|
|
2791
2791
|
// Find symbol definition(s) — skip counts since about() computes its own via usages()
|
|
2792
2792
|
const definitions = this.find(name, { exact: true, file: options.file, className: options.className, skipCounts: true });
|
package/core/verify.js
CHANGED
|
@@ -327,6 +327,14 @@ function plan(index, name, options = {}) {
|
|
|
327
327
|
let changes = [];
|
|
328
328
|
|
|
329
329
|
if (options.addParam) {
|
|
330
|
+
// Check if parameter already exists
|
|
331
|
+
if (currentParams.some(p => p.name === options.addParam)) {
|
|
332
|
+
return {
|
|
333
|
+
found: true,
|
|
334
|
+
error: `Parameter "${options.addParam}" already exists in ${name}`,
|
|
335
|
+
currentParams: currentParams.map(p => p.name)
|
|
336
|
+
};
|
|
337
|
+
}
|
|
330
338
|
operation = 'add-param';
|
|
331
339
|
const newParam = {
|
|
332
340
|
name: options.addParam,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ucn",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.32",
|
|
4
4
|
"mcpName": "io.github.mleoca/ucn",
|
|
5
5
|
"description": "Universal Code Navigator — AST-based call graph analysis for AI agents. Find callers, trace impact, detect dead code across JS/TS, Python, Go, Rust, Java, and HTML. CLI, MCP server, and agent skill.",
|
|
6
6
|
"main": "index.js",
|