@vibgrate/cli 1.0.48 → 1.0.50
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.
|
@@ -1524,6 +1524,22 @@ async function scanOnePackageJson(packageJsonPath, rootDir, npmCache, cache) {
|
|
|
1524
1524
|
});
|
|
1525
1525
|
}
|
|
1526
1526
|
}
|
|
1527
|
+
for (const s of sections) {
|
|
1528
|
+
if (!s.deps) continue;
|
|
1529
|
+
for (const [pkg2, spec] of Object.entries(s.deps)) {
|
|
1530
|
+
if (!spec.trim().startsWith("workspace:")) continue;
|
|
1531
|
+
dependencies.push({
|
|
1532
|
+
package: pkg2,
|
|
1533
|
+
section: s.name,
|
|
1534
|
+
currentSpec: spec,
|
|
1535
|
+
resolvedVersion: null,
|
|
1536
|
+
latestStable: null,
|
|
1537
|
+
majorsBehind: null,
|
|
1538
|
+
drift: "unknown"
|
|
1539
|
+
});
|
|
1540
|
+
buckets.unknown++;
|
|
1541
|
+
}
|
|
1542
|
+
}
|
|
1527
1543
|
dependencies.sort((a, b) => {
|
|
1528
1544
|
const order = { "major-behind": 0, "minor-behind": 1, "current": 2, "unknown": 3 };
|
|
1529
1545
|
const diff = (order[a.drift] ?? 9) - (order[b.drift] ?? 9);
|
|
@@ -7197,9 +7213,10 @@ function generateWorkspaceRelationshipMermaid(projects) {
|
|
|
7197
7213
|
connectedIds.add(toId);
|
|
7198
7214
|
}
|
|
7199
7215
|
}
|
|
7216
|
+
const showAll = connectedIds.size === 0;
|
|
7200
7217
|
for (const project of projects) {
|
|
7201
7218
|
const id = sanitizeId(project.projectId || project.path || project.name);
|
|
7202
|
-
if (!connectedIds.has(id)) continue;
|
|
7219
|
+
if (!showAll && !connectedIds.has(id)) continue;
|
|
7203
7220
|
lines.push(`${id}["${escapeLabel(nodeLabel(project))}"]`);
|
|
7204
7221
|
lines.push(`class ${id} ${scoreClass(project.drift?.score)}`);
|
|
7205
7222
|
}
|
|
@@ -7435,7 +7452,30 @@ async function runScan(rootDir, opts) {
|
|
|
7435
7452
|
filesScanned += polyglotProjects.length;
|
|
7436
7453
|
progress.addProjects(polyglotProjects.length);
|
|
7437
7454
|
progress.completeStep("polyglot", `${polyglotProjects.length} project${polyglotProjects.length !== 1 ? "s" : ""}`, polyglotProjects.length);
|
|
7438
|
-
const
|
|
7455
|
+
const rawProjects = [...nodeProjects, ...dotnetProjects, ...pythonProjects, ...javaProjects, ...polyglotProjects];
|
|
7456
|
+
const deduplicatedMap = /* @__PURE__ */ new Map();
|
|
7457
|
+
for (const project of rawProjects) {
|
|
7458
|
+
const existing = deduplicatedMap.get(project.path);
|
|
7459
|
+
if (!existing) {
|
|
7460
|
+
deduplicatedMap.set(project.path, project);
|
|
7461
|
+
} else {
|
|
7462
|
+
const keepNew = project.dependencies.length > existing.dependencies.length;
|
|
7463
|
+
const winner = keepNew ? project : existing;
|
|
7464
|
+
const loser = keepNew ? existing : project;
|
|
7465
|
+
if (loser.projectReferences?.length) {
|
|
7466
|
+
if (!winner.projectReferences) {
|
|
7467
|
+
winner.projectReferences = loser.projectReferences;
|
|
7468
|
+
} else {
|
|
7469
|
+
const existingPaths = new Set(winner.projectReferences.map((r) => r.path));
|
|
7470
|
+
for (const ref of loser.projectReferences) {
|
|
7471
|
+
if (!existingPaths.has(ref.path)) winner.projectReferences.push(ref);
|
|
7472
|
+
}
|
|
7473
|
+
}
|
|
7474
|
+
}
|
|
7475
|
+
deduplicatedMap.set(project.path, winner);
|
|
7476
|
+
}
|
|
7477
|
+
}
|
|
7478
|
+
const allProjects = [...deduplicatedMap.values()];
|
|
7439
7479
|
const dsn = opts.dsn || process.env.VIBGRATE_DSN;
|
|
7440
7480
|
const parsedDsn = dsn ? parseDsn(dsn) : null;
|
|
7441
7481
|
const workspaceId = parsedDsn?.workspaceId;
|
package/dist/cli.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-PTMLMDZU.js";
|
|
5
5
|
import {
|
|
6
6
|
baselineCommand
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-PL6UM3Z3.js";
|
|
8
8
|
import {
|
|
9
9
|
VERSION,
|
|
10
10
|
dsnCommand,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
pushCommand,
|
|
13
13
|
scanCommand,
|
|
14
14
|
writeDefaultConfig
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-6RMNQ6MQ.js";
|
|
16
16
|
import {
|
|
17
17
|
ensureDir,
|
|
18
18
|
pathExists,
|
|
@@ -41,7 +41,7 @@ var initCommand = new Command("init").description("Initialize vibgrate in a proj
|
|
|
41
41
|
console.log(chalk.green("\u2714") + ` Created ${chalk.bold("vibgrate.config.ts")}`);
|
|
42
42
|
}
|
|
43
43
|
if (opts.baseline) {
|
|
44
|
-
const { runBaseline } = await import("./baseline-
|
|
44
|
+
const { runBaseline } = await import("./baseline-UOF24CBK.js");
|
|
45
45
|
await runBaseline(rootDir);
|
|
46
46
|
}
|
|
47
47
|
console.log("");
|
package/dist/index.js
CHANGED