@bigsteele/the-prospect 0.3.2 → 0.3.3

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/dist/index.d.ts CHANGED
@@ -45,5 +45,5 @@ export interface Prospect {
45
45
  entrypoints: number;
46
46
  };
47
47
  }
48
- export declare const VERSION = "0.3.2";
48
+ export declare const VERSION = "0.3.3";
49
49
  export declare function runProspect(root: string): Promise<Prospect>;
package/dist/index.js CHANGED
@@ -37,7 +37,7 @@ import { scoreProspect } from "./score.js";
37
37
  export { toMarkdown, secretShaped } from "./report.js";
38
38
  export { checkReport } from "./check.js";
39
39
  export { checkVerdicts, rescore, showMath, findingIds } from "./verdicts.js";
40
- export const VERSION = "0.3.2";
40
+ export const VERSION = "0.3.3";
41
41
  export async function runProspect(root) {
42
42
  const repo = await openRepo(root);
43
43
  const runtime = runtimeCode(repo.files);
package/dist/report.js CHANGED
@@ -285,8 +285,14 @@ export function toMarkdown(p) {
285
285
  }
286
286
  if (accidental.length) {
287
287
  L.push(`### The same code in more than one place`, "");
288
- for (const d of accidental.slice(0, 10)) {
289
- L.push(`- ${d.lines} matching lines across ${d.files.join(", ")} - opens with \`${d.opens_with}\``);
288
+ // THE REAL CLUSTERS FIRST (0.3.3). Sorted by size, the top ten on a repository
289
+ // full of adapter templates were all parallel - already explained one section
290
+ // up, never charged - and the four accidental clusters the score actually
291
+ // counted fell off the list. The reader was shown what is fine and hidden
292
+ // what is not. Accidental clusters lead; parallel ones follow, marked.
293
+ const ordered = [...accidental].sort((x, y) => Number(!!x.parallel) - Number(!!y.parallel) || y.lines - x.lines);
294
+ for (const d of ordered.slice(0, 10)) {
295
+ L.push(`- ${d.parallel ? "(parallel by design) " : ""}${d.lines} matching lines across ${d.files.join(", ")} - opens with \`${d.opens_with}\``);
290
296
  }
291
297
  const deliberate = p.duplicates.length - accidental.length;
292
298
  if (deliberate > 0)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigsteele/the-prospect",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "A prospector's read of your codebase and your market. Digs the ground you own: every dependency that does no work, every vendor you pay twice, every subsystem you built by hand where a rail now exists. Then surveys the territory: what your industry ships by API that your code still does the hard way. Every suggestion stands on three legs - a fact read from your code, a fact researched from your market with a source and a date, and the thing your product exists to do. Standalone: one npx, no other scan required.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",