@hublo/sentinel 1.5.0-alpha.33 → 1.5.0-alpha.34
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
|
@@ -4824,7 +4824,17 @@ 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 ?
|
|
4827
|
+
reason: builds ? (declaresOutputs ? "nothing is built here, so build this module before measuring" : "the build wrote no files here, so declare `outputs` on its nx build target as `apps/front/career` does") + /*
|
|
4828
|
+
* ⛔ Problem, then solution, in ONE sentence and under 120 characters. The sentence that
|
|
4829
|
+
* stood here ran 230 characters of nested clauses and a reader said what was wrong with
|
|
4830
|
+
* it: *"un developpeur a bcp de taches en parallele donc son cerveau est concis, precis,
|
|
4831
|
+
* probleme / solution tout court"*. One sentence because the recap prints only the first:
|
|
4832
|
+
* split in two, the comment would carry the problem and lose the fix.
|
|
4833
|
+
*
|
|
4834
|
+
* ⚠️ The mechanism belongs AFTER, where the page and the json carry it and the comment
|
|
4835
|
+
* does not. It is the explanation, and nobody acts on an explanation.
|
|
4836
|
+
*/
|
|
4837
|
+
". 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, so the six bundle figures cannot be produced for any of them until they declare where their build writes." : "this module declares no build, so 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
4838
|
lookedIn
|
|
4829
4839
|
};
|
|
4830
4840
|
}
|
|
@@ -6085,29 +6095,21 @@ function renderMarkdown(report) {
|
|
|
6085
6095
|
"",
|
|
6086
6096
|
...families,
|
|
6087
6097
|
/*
|
|
6088
|
-
* ⛔
|
|
6098
|
+
* ⛔ ONE line, and it used to be five.
|
|
6089
6099
|
*
|
|
6090
|
-
*
|
|
6091
|
-
*
|
|
6092
|
-
*
|
|
6093
|
-
*
|
|
6094
|
-
*
|
|
6100
|
+
* The reserve explained `ok`, `near` and `exceeds`, defended the absence of a verdict as "a
|
|
6101
|
+
* decision and not a gap", and restated a counting rule. Measured on a five-module pull
|
|
6102
|
+
* request: not one of the 150 figures carried a verdict, so most of it explained a notation
|
|
6103
|
+
* that appeared nowhere and argued with an objection the reader had not made. A reader's
|
|
6104
|
+
* verdict on it: *"on doit supprimer, laissons le message efficace le plus possible"*.
|
|
6095
6105
|
*
|
|
6096
|
-
* ⚠️
|
|
6097
|
-
*
|
|
6098
|
-
*
|
|
6106
|
+
* ⚠️ What survives is the one clause that prevents a WRONG READING rather than defending a
|
|
6107
|
+
* choice: a figure in a pull-request comment is read as a delta by default, so a module
|
|
6108
|
+
* already at 6.81% would look like one this branch pushed there. Plus where the detail is,
|
|
6109
|
+
* and the version, because two recaps from two versions are not comparable and nothing else
|
|
6110
|
+
* on the comment would say so.
|
|
6099
6111
|
*/
|
|
6100
|
-
|
|
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
|
-
] : [],
|
|
6107
|
-
// ⭐ The version that produced these numbers, because the thresholds a module cannot override
|
|
6108
|
-
// live in the tool: nine gauge limits, the complexity bands, the bundle budgets. Two recaps
|
|
6109
|
-
// from two versions are not comparable, and without this nothing on the comment would say so.
|
|
6110
|
-
...version === void 0 ? [] : [`> Measured by sentinel ${version}.`],
|
|
6112
|
+
`<sub>Values on this branch, not a diff with \`main\`. Nothing here blocks the merge. The code behind every place, and the import graph, are in the \`static-analysis.html\` this run keeps as an artifact.${version === void 0 ? "" : ` Measured by sentinel ${version}.`}</sub>`,
|
|
6111
6113
|
""
|
|
6112
6114
|
].join("\n");
|
|
6113
6115
|
}
|
package/dist/index.js
CHANGED
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.34",
|
|
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",
|