@hublo/sentinel 1.5.0-alpha.31 → 1.5.0-alpha.33

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.
@@ -15,7 +15,7 @@ import {
15
15
  palette,
16
16
  registerAdapters,
17
17
  resolve
18
- } from "../chunk-PWHE527G.js";
18
+ } from "../chunk-XQRL555B.js";
19
19
  import {
20
20
  resolveContext
21
21
  } from "../chunk-ZFNBW6S3.js";
@@ -4824,7 +4824,7 @@ function findBuildOutput(cwd) {
4824
4824
  const builds = typeof pkg.scripts?.["build"] === "string" || pkg.nx?.targets?.["build"] !== void 0;
4825
4825
  const declaresOutputs = Array.isArray(pkg.nx?.targets?.["build"]?.["outputs"]);
4826
4826
  return {
4827
- reason: builds ? `no bundle figure: this module declares a build and wrote no entry manifest, so ${declaresOutputs ? "build it before measuring" : "declare that build's outputs on its nx target the way apps/front/career does"}. A build target with no declared \`outputs\` is still cached, and on a cache hit nx reports the task successful, restores no file and leaves the directory empty, so every job that reads the build sees nothing. Measured on this monorepo: 5 of the 48 projects with a build target are in that state.` : "no bundle figure: this module declares no build, so it writes no entry manifest and there is nothing to measure here. A component library and a back-end service are in that case by construction, and no action follows.",
4827
+ reason: builds ? `this module declares a build and wrote no entry manifest, so ${declaresOutputs ? "build it before measuring" : "declare that build's outputs on its nx target the way apps/front/career does"}. A build target with no declared \`outputs\` is still cached, and on a cache hit nx reports the task successful, restores no file and leaves the directory empty, so every job that reads the build sees nothing. Measured on this monorepo: 5 of the 48 projects with a build target are in that state.` : "this module declares no build, so it writes no entry manifest and there is nothing to measure here. A component library and a back-end service are in that case by construction, and no action follows.",
4828
4828
  lookedIn
4829
4829
  };
4830
4830
  }
@@ -6084,11 +6084,26 @@ function renderMarkdown(report) {
6084
6084
  ...notes,
6085
6085
  "",
6086
6086
  ...families,
6087
- "> Measured on this branch and **not compared with `main`**. No figure here refuses anything.",
6088
- "> **ok**, **near** or **exceeds** is where a figure sits against a PUBLISHED reference; a",
6089
- "> figure with no verdict has none, which is a decision and not a gap. A file breaching several",
6090
- "> rules counts once per rule. The code behind every place, and the drawing of the import",
6091
- "> graph, are in the `static-analysis.html` the artifact carries.",
6087
+ /*
6088
+ * ⛔ The reserve says only what a reader of THIS comment can use, and the rest was cut.
6089
+ *
6090
+ * It used to spend 470 characters explaining `ok`, `near` and `exceeds` and defending the
6091
+ * absence of a verdict as "a decision and not a gap". Measured on a five-module pull request:
6092
+ * **not one of the 150 figures carried a verdict**, so three quarters of the reserve explained
6093
+ * a notation that appeared nowhere in the comment, and argued with an objection a developer
6094
+ * had not made. The legend now appears only when a verdict does.
6095
+ *
6096
+ * ⚠️ The non-comparison stays, and it is the one sentence here that prevents a wrong reading
6097
+ * rather than answering a reviewer: a figure in a pull-request comment is read as a delta by
6098
+ * default, so a module already at 6.81% looks identical to one this branch pushed there.
6099
+ */
6100
+ "> Measured on this branch, **not compared with `main`**: every figure is a value, not a",
6101
+ "> change. Nothing here blocks the merge. The code behind every place, and the import graph,",
6102
+ "> are in the `static-analysis.html` the run keeps as an artifact.",
6103
+ ...report.rows.some((row) => row.status !== void 0) ? [
6104
+ "> **ok**, **near** and **exceeds** place a figure against a published reference. A figure",
6105
+ "> without one carries no verdict."
6106
+ ] : [],
6092
6107
  // ⭐ The version that produced these numbers, because the thresholds a module cannot override
6093
6108
  // live in the tool: nine gauge limits, the complexity bands, the bundle budgets. Two recaps
6094
6109
  // from two versions are not comparable, and without this nothing on the comment would say so.
@@ -6285,10 +6300,11 @@ function summaryParts(report, bold) {
6285
6300
  const findings = report.findings ?? [];
6286
6301
  const inTests = findings.filter((finding) => finding.metric === "clonesTests").length;
6287
6302
  const inProduct = findings.length - inTests;
6303
+ const thresholds = withReference.length === 0 ? [] : above === 0 ? [`${bold("No threshold exceeded")}: the measured levels are within the recommended norm`] : [`${bold(`${above} threshold${above === 1 ? "" : "s"} exceeded`)}`];
6288
6304
  return [
6289
- withReference.length === 0 ? "No figure here has a published reference" : `${bold(`${above} of ${withReference.length}`)} figures with a published reference are above it`,
6290
- `${bold(grouped(inProduct))} places in product code`,
6291
- ...inTests === 0 ? [] : [`${bold(grouped(inTests))} clones in tests`]
6305
+ ...thresholds,
6306
+ `${bold(grouped(inProduct))} place${inProduct === 1 ? "" : "s"} in product code`,
6307
+ ...inTests === 0 ? [] : [`${bold(grouped(inTests))} clone${inTests === 1 ? "" : "s"} in tests`]
6292
6308
  ];
6293
6309
  }
6294
6310
  function summaryLine(report) {
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  registerAdapters,
7
7
  resolve,
8
8
  setDefaultRunner
9
- } from "./chunk-PWHE527G.js";
9
+ } from "./chunk-XQRL555B.js";
10
10
  import {
11
11
  BaseAdapter
12
12
  } from "./chunk-ZFNBW6S3.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hublo/sentinel",
3
- "version": "1.5.0-alpha.31",
3
+ "version": "1.5.0-alpha.33",
4
4
  "description": "One CLI that guards code health across Hublo repos: shared lint/typescript/build/test presets, static & dynamic analysis, and architecture checks.",
5
5
  "type": "module",
6
6
  "license": "MIT",