@shaulavo/standards 0.1.3 → 0.1.4
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/cli.js +4 -1
- package/package.json +1 -1
- package/skills/standards/SKILL.md +1 -1
package/dist/cli.js
CHANGED
|
@@ -16669,6 +16669,9 @@ function parseBaseline(text, where) {
|
|
|
16669
16669
|
return { invalid: duplicates };
|
|
16670
16670
|
return { baseline: { fields: value, entries } };
|
|
16671
16671
|
}
|
|
16672
|
+
function isReason(value) {
|
|
16673
|
+
return typeof value === "string" && value.length > 0 && value === value.trim() && !/[\r\n\u2028\u2029]/.test(value);
|
|
16674
|
+
}
|
|
16672
16675
|
function entryProblems(item, position, where) {
|
|
16673
16676
|
const at = `baseline${where} entry ${position}`;
|
|
16674
16677
|
if (!isRecord2(item))
|
|
@@ -16676,7 +16679,7 @@ function entryProblems(item, position, where) {
|
|
|
16676
16679
|
const missing = [
|
|
16677
16680
|
typeof item.key === "string" && item.key !== "" ? undefined : 'a non-empty "key"',
|
|
16678
16681
|
isAllowance(item.allowance) ? undefined : 'an "allowance" that is a positive integer',
|
|
16679
|
-
|
|
16682
|
+
isReason(item.reason) ? undefined : 'a trimmed, single-line, non-empty "reason"'
|
|
16680
16683
|
].filter((need) => need !== undefined);
|
|
16681
16684
|
return missing.map((need) => malformedDiagnostic(`${at} needs ${need}`));
|
|
16682
16685
|
}
|
package/package.json
CHANGED
|
@@ -35,7 +35,7 @@ Adopt through a reviewed pull request, one gate set at a time:
|
|
|
35
35
|
|
|
36
36
|
A baseline missing at the comparison base allows nothing, so every new or relocated baseline lands in two pull requests:
|
|
37
37
|
|
|
38
|
-
1. **Data PR.** Land `.baselines/dupes.json` or `.baselines/structure.json` while the previous gate or zero mode is still active. Every entry needs a non-empty `key`, a positive integer `allowance`, and a non-empty `reason`. Review the baseline file as data.
|
|
38
|
+
1. **Data PR.** Land `.baselines/dupes.json` or `.baselines/structure.json` while the previous gate or zero mode is still active. Every entry needs a non-empty `key`, a positive integer `allowance`, and a trimmed, single-line, non-empty `reason`. Review the baseline file as data.
|
|
39
39
|
2. **Gate PR.** Turn on `standards dupes` or `standards structure` once the data PR is on the base branch.
|
|
40
40
|
|
|
41
41
|
Baselines only shrink:
|