@hublo/sentinel 1.5.0-alpha.24 → 1.5.0-alpha.25
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/bin/sentinel.js
CHANGED
|
@@ -6009,6 +6009,7 @@ function renderMarkdown(report) {
|
|
|
6009
6009
|
const family = familyOf(finding.metric);
|
|
6010
6010
|
if (family !== void 0) places.set(family, (places.get(family) ?? 0) + 1);
|
|
6011
6011
|
}
|
|
6012
|
+
const version = report.settings.find((setting) => setting.key === "sentinel")?.value;
|
|
6012
6013
|
const present = new Set(report.rows.map((row) => row.metric));
|
|
6013
6014
|
const rows = FAMILIES.filter(
|
|
6014
6015
|
(family) => family.metrics.some((metric) => present.has(metric)) || places.has(family.label)
|
|
@@ -6037,6 +6038,11 @@ ${report.notes.map((note) => `- ${note.split(". ")[0] ?? note}`).join("\n")}
|
|
|
6037
6038
|
"> `(ok)` or `(exceed)` is where a figure sits against a PUBLISHED reference; a figure with no",
|
|
6038
6039
|
"> marker has none, which is a decision and not a gap. A file breaching several rules counts",
|
|
6039
6040
|
"> once per rule. The code behind every place is in the `static-analysis.html` artifact.",
|
|
6041
|
+
// ⭐ The version that produced these numbers, because the thresholds a module cannot override
|
|
6042
|
+
// live in the tool: nine gauge limits, the complexity bands, the bundle budgets. Two recaps
|
|
6043
|
+
// from two versions are not comparable, and without this nothing on the comment would say so.
|
|
6044
|
+
// Read from the settings the report already carries rather than from the package a second time.
|
|
6045
|
+
...version === void 0 ? [] : [`> Measured by sentinel ${version}.`],
|
|
6040
6046
|
""
|
|
6041
6047
|
].join("\n");
|
|
6042
6048
|
}
|
|
@@ -7379,6 +7385,19 @@ function measuredWith(config) {
|
|
|
7379
7385
|
const moved = (key) => config.moved.some((path2) => path2 === key || path2.startsWith(`${key}.`));
|
|
7380
7386
|
const row = (key, value) => ({ key, value, moved: moved(key) });
|
|
7381
7387
|
return [
|
|
7388
|
+
/**
|
|
7389
|
+
* ⭐ The tool's own version, first, and it is the same argument this list already makes about
|
|
7390
|
+
* every other line: "6.81% found with `minTokens` at 50 and 6.81% found with it at 100 are not
|
|
7391
|
+
* the same measurement". The version is the stronger case, because the numbers a module cannot
|
|
7392
|
+
* override live HERE: the nine gauge thresholds, the complexity bands, the bundle budgets, and
|
|
7393
|
+
* what each figure's unit means. `max-nested-callbacks` sat at 10 and now sits at 3;
|
|
7394
|
+
* `complexityMax` carried a unit and no longer does. A report that does not name the version
|
|
7395
|
+
* that produced it cannot be held against a report from last month, and nothing on the page
|
|
7396
|
+
* would say why the two disagree.
|
|
7397
|
+
*
|
|
7398
|
+
* Never `moved`: it is not a setting a module can turn, which is exactly why it has to be said.
|
|
7399
|
+
*/
|
|
7400
|
+
{ key: "sentinel", value: readOwnPackage().version, moved: false },
|
|
7382
7401
|
row("duplication.minTokens", String(config.duplication.minTokens)),
|
|
7383
7402
|
row("duplication.minLines", String(config.duplication.minLines)),
|
|
7384
7403
|
row("duplication.kinds", config.duplication.kinds.join(", ")),
|
package/dist/index.js
CHANGED
|
@@ -214,12 +214,12 @@ A report nobody opens is a report that changes nothing, and the published cases
|
|
|
214
214
|
both of them put the figures where the review already happens. So this release does not stop at a
|
|
215
215
|
page on disk.
|
|
216
216
|
|
|
217
|
-
| |
|
|
218
|
-
| --------------- |
|
|
219
|
-
| what is posted |
|
|
220
|
-
| when | every run, not only on a breach: a recap that appears only when something is wrong is a recap nobody learns to read
|
|
221
|
-
| blocking | **no**, and that is a choice for now rather than an end state
|
|
222
|
-
| on a second run | the same comment is updated, never a second one
|
|
217
|
+
| | |
|
|
218
|
+
| --------------- | ---------------------------------------------------------------------------------------------------------------------- |
|
|
219
|
+
| what is posted | one section per module the pull request touched: six rows, one per family, the headline figure and the places it holds |
|
|
220
|
+
| when | every run, not only on a breach: a recap that appears only when something is wrong is a recap nobody learns to read |
|
|
221
|
+
| blocking | **no**, and that is a choice for now rather than an end state |
|
|
222
|
+
| on a second run | the same comment is updated, never a second one |
|
|
223
223
|
|
|
224
224
|
⛔ The division of labour matters, because getting it wrong couples this role to one CI provider.
|
|
225
225
|
**sentinel renders the content, the repository's workflow posts it.** The content is markdown
|
|
@@ -227,6 +227,33 @@ produced from the same figures the other three shapes carry, which makes it test
|
|
|
227
227
|
identical to what the console printed. Who holds the token, which event triggers it and how a
|
|
228
228
|
comment is found again are the repository's business, not this role's.
|
|
229
229
|
|
|
230
|
+
### 8.1 What it is, as built
|
|
231
|
+
|
|
232
|
+
⚠️ It covers the **whole role**, not the bundle alone, and that is a correction to the line above
|
|
233
|
+
that said "the fronts the pull request touched". A pull request touches libraries and services too,
|
|
234
|
+
and a recap that stayed silent on them would teach a reader that this role only speaks about fronts.
|
|
235
|
+
A module with no build gets five rows and a line saying why the sixth is absent.
|
|
236
|
+
|
|
237
|
+
Three decisions worth stating, because each one was a fork:
|
|
238
|
+
|
|
239
|
+
- **The headline per family is declared, not positional.** Three of the six would be wrong taken as
|
|
240
|
+
"the first metric listed": `importEdges` leads structure and is a size rather than a signal, so a
|
|
241
|
+
big module would look bad for being big, and `entryPoints` leads dead code and is the walk's
|
|
242
|
+
starting condition rather than a result.
|
|
243
|
+
- **The row is named by the metric's own help label**, not the family's name. "Duplication | 0.75%"
|
|
244
|
+
does not say of what; "Duplicated lines" does. One wording, shared with the page.
|
|
245
|
+
- **A marker says where a figure sits against a published reference**, `(ok)` included, and a row
|
|
246
|
+
with no marker has no reference rather than sitting inside one. Those are different facts, and
|
|
247
|
+
six of this role's figures genuinely have none.
|
|
248
|
+
|
|
249
|
+
It reads no source file and lays out no graph: a recap shows no code, so it skips both the 201 file
|
|
250
|
+
reads and the 5-second layout the page pays for.
|
|
251
|
+
|
|
252
|
+
⛔ And it says on itself that it is **not compared with `main`**. See section 9: the delta needs a
|
|
253
|
+
stored baseline. A figure in a pull-request comment is read as a delta by default, and that reading
|
|
254
|
+
is wrong in the dangerous direction, since a module already at 6.81% looks exactly like one this
|
|
255
|
+
branch pushed there.
|
|
256
|
+
|
|
230
257
|
## 9. Deferred, with the reason
|
|
231
258
|
|
|
232
259
|
Recorded in issue #97. Both need something this release does not have, and neither changes a figure
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hublo/sentinel",
|
|
3
|
-
"version": "1.5.0-alpha.
|
|
3
|
+
"version": "1.5.0-alpha.25",
|
|
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",
|