@vibgrate/cli 1.0.49 → 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.
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  baselineCommand,
3
3
  runBaseline
4
- } from "./chunk-4M7MNV6G.js";
5
- import "./chunk-E53FDKZE.js";
4
+ } from "./chunk-PL6UM3Z3.js";
5
+ import "./chunk-6RMNQ6MQ.js";
6
6
  import "./chunk-RNVZIZNL.js";
7
7
  export {
8
8
  baselineCommand,
@@ -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);
@@ -7436,7 +7452,30 @@ async function runScan(rootDir, opts) {
7436
7452
  filesScanned += polyglotProjects.length;
7437
7453
  progress.addProjects(polyglotProjects.length);
7438
7454
  progress.completeStep("polyglot", `${polyglotProjects.length} project${polyglotProjects.length !== 1 ? "s" : ""}`, polyglotProjects.length);
7439
- const allProjects = [...nodeProjects, ...dotnetProjects, ...pythonProjects, ...javaProjects, ...polyglotProjects];
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()];
7440
7479
  const dsn = opts.dsn || process.env.VIBGRATE_DSN;
7441
7480
  const parsedDsn = dsn ? parseDsn(dsn) : null;
7442
7481
  const workspaceId = parsedDsn?.workspaceId;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  runScan
3
- } from "./chunk-E53FDKZE.js";
3
+ } from "./chunk-6RMNQ6MQ.js";
4
4
  import {
5
5
  writeJsonFile
6
6
  } from "./chunk-RNVZIZNL.js";
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-4M7MNV6G.js";
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-E53FDKZE.js";
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-M6HQP4E5.js");
44
+ const { runBaseline } = await import("./baseline-UOF24CBK.js");
45
45
  await runBaseline(rootDir);
46
46
  }
47
47
  console.log("");
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  formatText,
8
8
  generateFindings,
9
9
  runScan
10
- } from "./chunk-E53FDKZE.js";
10
+ } from "./chunk-6RMNQ6MQ.js";
11
11
  import "./chunk-RNVZIZNL.js";
12
12
  export {
13
13
  computeDriftScore,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibgrate/cli",
3
- "version": "1.0.49",
3
+ "version": "1.0.50",
4
4
  "description": "CLI for measuring upgrade drift across Node, .NET, Python & Java projects",
5
5
  "type": "module",
6
6
  "bin": {