@zgeoff/chex 0.4.8 → 0.5.0
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgeoff/chex",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Run each shared docs and repo check as one subcommand, with the lefthook pre-push baseline that calls them",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"checks",
|
|
@@ -77,15 +77,15 @@
|
|
|
77
77
|
"typecheck": "tsrs --fast"
|
|
78
78
|
},
|
|
79
79
|
"dependencies": {
|
|
80
|
-
"@zgeoff/std": "0.
|
|
80
|
+
"@zgeoff/std": "0.5.0",
|
|
81
81
|
"oxc-parser": "0.159.0",
|
|
82
82
|
"ts-pattern": "5.9.2"
|
|
83
83
|
},
|
|
84
84
|
"devDependencies": {
|
|
85
85
|
"@types/bun": "1.4.4",
|
|
86
|
-
"@zgeoff/rig": "0.3.
|
|
87
|
-
"@zgeoff/std": "0.
|
|
88
|
-
"@zgeoff/testing": "0.
|
|
86
|
+
"@zgeoff/rig": "0.3.4",
|
|
87
|
+
"@zgeoff/std": "0.5.0",
|
|
88
|
+
"@zgeoff/testing": "0.5.0",
|
|
89
89
|
"@zgeoff/tools-scripts": "0.0.0",
|
|
90
90
|
"msw": "3.0.4",
|
|
91
91
|
"tiny-invariant": "1.3.3",
|
|
@@ -111,8 +111,8 @@ async function readLaneLimits(
|
|
|
111
111
|
return parsed.limits;
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
// A setting that turns a timeout rule off or down to a warning escapes the limits
|
|
115
|
-
// comment
|
|
114
|
+
// A setting that turns a timeout rule off or down to a warning escapes the limits, so it needs a
|
|
115
|
+
// `floor:` comment with the evidence, on its line or the lines above it.
|
|
116
116
|
function collectConfigFindings(path: string, text: string): TestTimeoutFinding[] {
|
|
117
117
|
const tokens = parseJSONCTokens(path, text);
|
|
118
118
|
const values = tokens.filter((token) => token.kind !== 'comment');
|
|
@@ -147,16 +147,14 @@ function collectConfigFindings(path: string, text: string): TestTimeoutFinding[]
|
|
|
147
147
|
(comment.line === override || isCommentAbove(comment, override, valueLines))),
|
|
148
148
|
);
|
|
149
149
|
|
|
150
|
-
if (
|
|
151
|
-
notes.some((comment) => ticketPattern.test(comment.text) || floorPattern.test(comment.text))
|
|
152
|
-
) {
|
|
150
|
+
if (notes.some((comment) => floorPattern.test(comment.text))) {
|
|
153
151
|
return [];
|
|
154
152
|
}
|
|
155
153
|
|
|
156
154
|
return [
|
|
157
155
|
{
|
|
158
156
|
path,
|
|
159
|
-
message: `line ${token.line} turns ${rule} off or down to a warning;
|
|
157
|
+
message: `line ${token.line} turns ${rule} off or down to a warning; fix the slow test, or give the setting a comment with "floor:" and the evidence that the time cannot move, as the "Slow tests" section of the testing skill describes`,
|
|
160
158
|
},
|
|
161
159
|
];
|
|
162
160
|
});
|
|
@@ -505,8 +503,7 @@ function findDirectoryLane(path: string, appRoots: ReadonlySet<string>): string
|
|
|
505
503
|
return null;
|
|
506
504
|
}
|
|
507
505
|
|
|
508
|
-
const guardedRules = ['zgeoff/max-test-timeout'
|
|
509
|
-
const ticketPattern = /\b[A-Z][A-Z0-9]*-\d+\b/u;
|
|
506
|
+
const guardedRules = ['zgeoff/max-test-timeout'];
|
|
510
507
|
|
|
511
508
|
// a block comment's continuation stars are no evidence
|
|
512
509
|
const floorPattern = /\bfloor:[\s*]*[^\s*]/u;
|