@mark1russell7/conventions 0.15.0 → 0.16.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/README.md CHANGED
@@ -54,7 +54,7 @@ The rules come from the invariants audit of 2026-10-26 (strategy item s38). The
54
54
  | `roadmap-parses` | Each call of the Pages workflow of the template (`reusable-pages.yml`) gives a `roadmap`, or `site-pages: false`. Without it, the Status page shows no item of the plan. Each roadmap that a workflow gives to the Status page (a `roadmap:` key) parses as `@mark1russell7/site-pages` reads it. The rule uses the parser of site-pages. Thus a pull request finds a bad row, and the Pages job on `main` does not stop on it. | fleet `fail-closed` (STRATEGY.md, 2026-10-30). |
55
55
  | `runner-budget` | All repositories of the account share 40 runners. Each `strategy` with a `matrix` has a `max-parallel` of 3 or less. Each workflow has a concurrency group at the top or in each job. A job that calls a shared workflow of the option `grouped` gets its group from that workflow, and each job of that workflow has a group. The minute of each `cron` comes from a hash of the repository and the file (1 to 59), so the schedules of the repositories do not start together. The repository comes from `GITHUB_REPOSITORY` or from the remote `origin`. | fleet `runner-slots` (STRATEGY.md, 2026-10-30). |
56
56
  | `gate-trigger` | No workflow has `paths` or `paths-ignore` on `on.pull_request` or `on.pull_request_target`. The ruleset needs the summary check `<Name> OK` of each gate, and a workflow with a path filter does not start on each pull request. Then its check is not there, the ruleset cannot ask for it, and a pull request can merge before the gate ends. A gate uses the actions `changes` and `gate-summary` of the template (`CI.md`, "A gate with paths"). | fleet `gate-trigger` (STRATEGY.md, 2026-11-02). |
57
- | `license-file` | Each public package has a license field, and a license file with the same license in its own folder. A repository with a public package has a license file at its root. npm packs only the license file of the folder of the package, and GitHub reads only the one of the root: on 2026-11-02 five public repositories showed no license on GitHub while npm said MIT. `conventions fix` writes the missing files. | fleet strategy (2026-11-02). |
57
+ | `license-file` | Each public package has a license field, and a license file with the same license in its own folder. A public repository, or a repository with a public package, has a license file at its root. In a GitHub Actions run, the event file tells if the repository is public, and the option `license` (MIT by default) is the license of a root with no public package. npm packs only the license file of the folder of the package, and GitHub reads only the one of the root: on 2026-11-02 five public repositories showed no license on GitHub while npm said MIT. `conventions fix` writes the missing files. | fleet strategy (2026-11-02). |
58
58
  | `home-package` | A change does not add a function with a signature name of another home of the map (for example `median`, `mulberry32` or `writeFileAtomic`). A local copy drifts from the home and splits the fixes. On 2026-11-02 the fleet had 68 local statistics functions in 14 repositories. The rule examines only the lines that the change adds, so the copies that exist do not break. | fleet direction 18 (STRATEGY.md, 2026-11-02). |
59
59
 
60
60
  The rule `release-files` needs the base of the change. On a pull request, the checkout is a merge commit, and the rule reads its two parents (`fetch-depth` 2 or more). In other runs, give `--base <ref>`. Without a base, the rule shows `skip`. The rule also needs each commit of the change. A shallow checkout can end inside the change. Then the authors and the messages that the rule reads are not those of the change, so the rule shows `error`. A pull request of one commit is complete at depth 2. For a longer one, the CI of the template deepens the checkout to the merge base.
package/build/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { c as runCli } from "./run-DPO3BOI4.js";
2
+ import { c as runCli } from "./run-uE1CPx4q.js";
3
3
  // src/cli.ts
4
4
  try {
5
5
  process.exitCode = runCli(process.argv.slice(2), {
package/build/index.d.ts CHANGED
@@ -239,6 +239,11 @@ export declare function licenseFileOf(dir: string): string | undefined;
239
239
  export declare function authorOf(author: unknown): string | undefined;
240
240
  /** This function gives the text of the MIT license. */
241
241
  export declare function mitText(year: number, holder: string): string;
242
+ /**
243
+ * This function tells if the repository is public, from the event file of a GitHub Actions run. Outside a run, or with no
244
+ * field `repository.private` in the event, it gives undefined.
245
+ */
246
+ export declare function repositoryIsPublic(context: RuleContext): boolean | undefined;
242
247
  export declare const licenseFile: Rule;
243
248
  /** The compare of two real paths. It is true through a link too, and it works on each Node version. */
244
249
  export declare const REAL_COMPARE = "process.argv[1] !== undefined && realpathSync(process.argv[1]) === realpathSync(fileURLToPath(import.meta.url))";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../src/rule.ts","../src/config.ts","../src/rules/cue-preset.ts","../src/rules/gate-trigger.ts","../src/map.ts","../src/rules/home-package.ts","../src/rules/license-file.ts","../src/rules/main-check.ts","../src/rules/no-build-output.ts","../src/rules/no-local-paths.ts","../src/rules/pinned-git-deps.ts","../src/rules/release-files.ts","../src/rules/required-scripts.ts","../src/rules/roadmap-parses.ts","../src/rules/runner-budget.ts","../src/rules/source-main.ts","../src/rules/tests-required.ts","../src/rules/tsconfig-test.ts","../src/rules/typed-files.ts","../src/rules/typed-scripts.ts","../src/rules/trust-policy.ts","../src/rules/workspace-protocol.ts","../src/rules/index.ts","../src/home-exports.ts","../src/run.ts","../src/workspace.ts"],"mappings":";UASiB;WACN;WACA;WACA;;;UAIM;;WAEN;;WAEA;WACA;;WAEA;;WAEA,iBAAiB;;;;;;UAOX;;WAEN;;WAEA;;WAEA;;;wBAIK,YAAY,cAAc,cAAc;;KAQ5C;;KAGA,UAAU,SAAS,eAAe;;UAG7B;WACN;WACA,SAAS;WACT;;;KAIC,WAAW,SAAS;;UAGf;;WAEN;;WAEA;;WAEA;;WAEA;WACA,UAAU;;;UAIJ;;WAEN;;WAEA,aAAa;;WAEb,mBAAmB;;WAEnB,KAAK,SAAS;;WAEd;;EAET;;EAEA,IAAI;;;KAIM,uBAAuB;WAAqB;;;UAGvC;;WAEN;;WAEA;;WAEA;;WAEA;;WAEA,kBAAkB;;WAElB,SAAS,SAAS,eAAe;EAC1C,MAAM,SAAS,aAAa,SAAS,UAAU;;;qBAIpC;;wBAGG,aAAa,UAAU,UAAU;;wBAOjC,OAAO,cAAc,gBAAgB;;wBAOrC,QAAQ,cAAc,eAAe;;qBAMxC,WAAY,gBAAgB;;qBAG5B,YAAa;;wBAGV,WAAW,cAAc;;;;;;wBASzB,WAAW;;wBA2BX,UAAU;;wBAUV,OAAO,cAAc;;qBAOxB,UAAW,aAAa;;;;;wBAMrB,aAAa,SAAS,KAAK,oDAAoD;;UCrM9E;;WAEN;;WAEA;;WAEA;;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AClB,cACA,OAAM;qBAkRK,YAAY;qBC/VZ,cAAc;;qBC3Bd;;qBAGA;qBA6DA,aAAa;qBCnEb,mBAAmB;;qBCiBnB,gBAAgB;;qBCvBhB,cAAc,SAAS;WAA0B;WAA0B;;;UCYvE;WACN;WACA;WACA;;WAEA;WACA,iBAAiB;;WAEjB;;WAEA;;;UAIM;WACN,gBAAgB;;WAEhB;;;UAIM;;WAEN;;WAEA;;WAEA;WACA,MAAM,SAAS;;WAEf,iBAAiB;;;wBAaZ,WAAW,cAAc,iBAAgB,SAAiB;;wBAO1D,cAAc,cAAc,QAAQ,mBAAmB,UAAS,KAAK,gCAAqC;;wBAwB1G,UAAU,SAAS,eAAe;;UA2CjC;;WAEN;;WAEA;;WAEA,QAAQ;;;;;;;wBAWH,OAAO,SAAS,eAAe;;wBAyC/B,aAAa,QAAQ;;wBA0BrB,gBAAgB,QAAQ;;wBAsBxB,YAAY,QAAQ;;wBAYpB,UAAU,QAAQ,+BAA+B,iBAAgB;;UAkBhE;WACN;WACA,KAAK,SAAS;WACd,SAAS;WACT,SAAS;;;qBAIP;;wBA6BG,OAAO,yBAAyB,IAAI;;;;;;wBC1RpC,aAAa,eAAe;;;;;wBAsD5B,YAAY,cAAc;;;;;;wBA8B1B,eAAe;;;;;;;wBAwCf,eAAe,cAAc"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/rule.ts","../src/config.ts","../src/rules/cue-preset.ts","../src/rules/gate-trigger.ts","../src/map.ts","../src/rules/home-package.ts","../src/rules/license-file.ts","../src/rules/main-check.ts","../src/rules/no-build-output.ts","../src/rules/no-local-paths.ts","../src/rules/pinned-git-deps.ts","../src/rules/release-files.ts","../src/rules/required-scripts.ts","../src/rules/roadmap-parses.ts","../src/rules/runner-budget.ts","../src/rules/source-main.ts","../src/rules/tests-required.ts","../src/rules/tsconfig-test.ts","../src/rules/typed-files.ts","../src/rules/typed-scripts.ts","../src/rules/trust-policy.ts","../src/rules/workspace-protocol.ts","../src/rules/index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,cAAc,cAAc,QAAQ,mBAAmB,UAAS,KAAK,gCAAqC;;wBAwB1G,UAAU,SAAS,eAAe;;UA2CjC;;WAEN;;WAEA;;WAEA,QAAQ;;;;;;;wBAWH,OAAO,SAAS,eAAe;;wBAyC/B,aAAa,QAAQ;;wBA0BrB,gBAAgB,QAAQ;;wBAsBxB,YAAY,QAAQ;;wBAYpB,UAAU,QAAQ,+BAA+B,iBAAgB;;UAkBhE;WACN;WACA,KAAK,SAAS;WACd,SAAS;WACT,SAAS;;;qBAIP;;wBA6BG,OAAO,yBAAyB,IAAI;;;;;;wBC1RpC,aAAa,eAAe;;;;;wBAsD5B,YAAY,cAAc;;;;;;wBA8B1B,eAAe;;;;;;;wBAwCf,eAAe,cAAc"}
package/build/index.js CHANGED
@@ -1 +1 @@
1
- export { st as ACTIONS_COMMIT, I as DEFAULT_ALLOWED, mt as DEPENDENCY_FIELDS, $ as HOMES, ot as HOME_EXPORTS, L as HOME_PATTERNS, p as IGNORE_AFTER, U as LICENSE_TEXTS, et as MAP_RULE, B as REAL_COMPARE, d as RULES, ft as STRICT_OPTIONS, m as TRAIN_SCOPES, t as USAGE, n as annotations, W as authorOf, ht as cleanPath, gt as codePackages, _ as configsOfScript, ct as convertGate, r as createContext, pt as cuePreset, J as declaredName, jt as defaultOptions, tt as findHomes, i as formatResult, lt as gateTrigger, Dt as globFolders, Ot as globToRegExp, _t as hasFile, V as hasImportMetaMain, x as hasTests, Y as homePackage, vt as inFolder, N as isGitSpecifier, P as isPinned, C as isSourcePath, yt as keyLine, G as licenseFile, K as licenseFileOf, bt as lineOf, a as listRules, H as mainCheck, nt as mapMarkdown, rt as mapText, xt as matchesAny, it as mergeHomes, X as messageOf, q as mitText, z as noBuildOutput, R as noLocalPaths, kt as packageFolders, Mt as parseConfig, St as parseJsonc, w as pathsOf, F as pinnedGitDeps, ut as prPathFilters, o as readConfig, Ct as readJsonc, at as readOverlay, M as releaseFiles, wt as replaceLine, Z as repoOf, E as repositoryOfRemote, j as requiredScripts, k as roadmapOfLine, A as roadmapParses, s as runChecks, c as runCli, l as runFix, Tt as runGit, D as runnerBudget, O as scheduleMinute, v as scriptsOf, Q as signaturesOf, T as sourceMain, Et as specifiersOf, u as summaryMarkdown, dt as summaryName, b as testsRequired, h as trustPolicy, S as tsconfigTest, y as typedFiles, g as typedScripts, At as workspaceGlobs, f as workspaceProtocol } from "./run-DPO3BOI4.js";
1
+ export { ct as ACTIONS_COMMIT, I as DEFAULT_ALLOWED, ht as DEPENDENCY_FIELDS, et as HOMES, st as HOME_EXPORTS, L as HOME_PATTERNS, p as IGNORE_AFTER, U as LICENSE_TEXTS, tt as MAP_RULE, B as REAL_COMPARE, d as RULES, pt as STRICT_OPTIONS, m as TRAIN_SCOPES, t as USAGE, n as annotations, W as authorOf, gt as cleanPath, _t as codePackages, _ as configsOfScript, lt as convertGate, r as createContext, mt as cuePreset, Y as declaredName, Mt as defaultOptions, nt as findHomes, i as formatResult, ut as gateTrigger, Ot as globFolders, kt as globToRegExp, vt as hasFile, V as hasImportMetaMain, x as hasTests, X as homePackage, yt as inFolder, N as isGitSpecifier, P as isPinned, C as isSourcePath, bt as keyLine, G as licenseFile, K as licenseFileOf, xt as lineOf, a as listRules, H as mainCheck, rt as mapMarkdown, it as mapText, St as matchesAny, at as mergeHomes, Z as messageOf, q as mitText, z as noBuildOutput, R as noLocalPaths, At as packageFolders, Nt as parseConfig, Ct as parseJsonc, w as pathsOf, F as pinnedGitDeps, dt as prPathFilters, o as readConfig, wt as readJsonc, ot as readOverlay, M as releaseFiles, Tt as replaceLine, Q as repoOf, J as repositoryIsPublic, E as repositoryOfRemote, j as requiredScripts, k as roadmapOfLine, A as roadmapParses, s as runChecks, c as runCli, l as runFix, Et as runGit, D as runnerBudget, O as scheduleMinute, v as scriptsOf, $ as signaturesOf, T as sourceMain, Dt as specifiersOf, u as summaryMarkdown, ft as summaryName, b as testsRequired, h as trustPolicy, S as tsconfigTest, y as typedFiles, g as typedScripts, jt as workspaceGlobs, f as workspaceProtocol } from "./run-uE1CPx4q.js";
@@ -6593,11 +6593,25 @@ SOFTWARE.
6593
6593
  `;
6594
6594
  }
6595
6595
  const isPublic = (pkg) => pkg.manifest["private"] !== true;
6596
+ /**
6597
+ * This function tells if the repository is public, from the event file of a GitHub Actions run. Outside a run, or with no
6598
+ * field `repository.private` in the event, it gives undefined.
6599
+ */
6600
+ function repositoryIsPublic(context) {
6601
+ const file = context.env["GITHUB_EVENT_PATH"];
6602
+ if (file === void 0 || file === "" || !existsSync(file)) return void 0;
6603
+ try {
6604
+ const event = JSON.parse(readFileSync(file, "utf8"));
6605
+ return typeof event.repository?.private === "boolean" ? !event.repository.private : void 0;
6606
+ } catch {
6607
+ return;
6608
+ }
6609
+ }
6596
6610
  const licenseFile = {
6597
6611
  id: "license-file",
6598
- title: "Each public package has a license field and, in its own folder, a license file with the same license. A repository with a public package has a license file at its root.",
6612
+ title: "Each public package has a license field and, in its own folder, a license file with the same license. A public repository, or a repository with a public package, has a license file at its root.",
6599
6613
  reason: "npm packs the license file of the folder of the package only, and GitHub reads the license file of the root only. On 2026-11-02 five public repositories (packing, rigor, layout-contract, typeset, template) had no license file at the root, so GitHub showed them as without a license while their packages on npm said MIT.",
6600
- fix: "Add a license field to package.json (MIT is the license of each package of the fleet). `conventions fix` writes each missing license file: a copy of a license file of the repository with the same license, or else the MIT text with the author of the manifest. Correct a license file whose text is not the license of the field.",
6614
+ fix: "Add a license field to package.json (the option `license`, MIT by default, is the license of the root of a public repository with no public package). `conventions fix` writes each missing license file: a copy of a license file of the repository with the same license, or else the MIT text with the author of the manifest. Correct a license file whose text is not the license of the field.",
6601
6615
  sources: [
6602
6616
  "vex",
6603
6617
  "coeval",
@@ -6608,12 +6622,17 @@ const licenseFile = {
6608
6622
  rule: "license-file",
6609
6623
  doc: "LICENSE (MIT, at the root, with license MIT in each package.json)"
6610
6624
  })),
6611
- options: {},
6612
- check(context) {
6625
+ options: { license: {
6626
+ type: "string",
6627
+ default: "MIT",
6628
+ description: "The license of the root of a public repository with no public package."
6629
+ } },
6630
+ check(context, options) {
6613
6631
  const all = [context.rootPackage, ...codePackages(context)];
6614
6632
  const unique = all.filter((pkg, index) => all.findIndex((other) => other.file === pkg.file) === index);
6615
6633
  const published = unique.filter(isPublic);
6616
- if (published.length === 0) return [];
6634
+ const publicRepo = repositoryIsPublic(context) === true;
6635
+ if (published.length === 0 && !publicRepo) return [];
6617
6636
  const breaks = [];
6618
6637
  const texts = /* @__PURE__ */ new Map();
6619
6638
  const licenseOf = (pkg) => typeof pkg.manifest["license"] === "string" ? pkg.manifest["license"] : void 0;
@@ -6663,7 +6682,7 @@ const licenseFile = {
6663
6682
  }
6664
6683
  }
6665
6684
  if (!published.includes(context.rootPackage) && licenseFileOf(context.root) === void 0) {
6666
- const license = published.map(licenseOf).find((item) => item !== void 0);
6685
+ const license = published.map(licenseOf).find((item) => item !== void 0) ?? (publicRepo ? String(options["license"]) : void 0);
6667
6686
  if (license !== void 0) missing("", license, published[0]?.manifest["author"], "GitHub reads only the license file of the root.");
6668
6687
  }
6669
6688
  return breaks;
@@ -9733,6 +9752,6 @@ function runMap(args, io) {
9733
9752
  else io.stdout(mapText(found));
9734
9753
  return 0;
9735
9754
  }
9736
- export { HOMES as $, roadmapParses as A, workspaceGlobs as At, REAL_COMPARE as B, isSourcePath as C, readJsonc as Ct, runnerBudget as D, globFolders as Dt, repositoryOfRemote as E, specifiersOf as Et, pinnedGitDeps as F, licenseFile as G, mainCheck as H, DEFAULT_ALLOWED as I, declaredName as J, licenseFileOf as K, HOME_PATTERNS as L, releaseFiles as M, parseConfig as Mt, isGitSpecifier as N, scheduleMinute as O, globToRegExp as Ot, isPinned as P, signaturesOf as Q, noLocalPaths as R, tsconfigTest as S, parseJsonc as St, sourceMain as T, runGit as Tt, LICENSE_TEXTS as U, hasImportMetaMain as V, authorOf as W, messageOf as X, homePackage as Y, repoOf as Z, configsOfScript as _, hasFile as _t, listRules as a, readOverlay as at, testsRequired as b, lineOf as bt, runCli as c, convertGate as ct, RULES as d, summaryName as dt, MAP_RULE as et, workspaceProtocol as f, STRICT_OPTIONS as ft, typedScripts as g, codePackages as gt, trustPolicy as h, cleanPath as ht, formatResult as i, mergeHomes as it, requiredScripts as j, defaultOptions as jt, roadmapOfLine as k, packageFolders as kt, runFix as l, gateTrigger as lt, TRAIN_SCOPES as m, DEPENDENCY_FIELDS as mt, annotations as n, mapMarkdown as nt, readConfig as o, HOME_EXPORTS as ot, IGNORE_AFTER as p, cuePreset as pt, mitText as q, createContext as r, mapText as rt, runChecks as s, ACTIONS_COMMIT as st, USAGE as t, findHomes as tt, summaryMarkdown as u, prPathFilters as ut, scriptsOf as v, inFolder as vt, pathsOf as w, replaceLine as wt, hasTests as x, matchesAny as xt, typedFiles as y, keyLine as yt, noBuildOutput as z };
9755
+ export { signaturesOf as $, roadmapParses as A, packageFolders as At, REAL_COMPARE as B, isSourcePath as C, parseJsonc as Ct, runnerBudget as D, specifiersOf as Dt, repositoryOfRemote as E, runGit as Et, pinnedGitDeps as F, licenseFile as G, mainCheck as H, DEFAULT_ALLOWED as I, repositoryIsPublic as J, licenseFileOf as K, HOME_PATTERNS as L, releaseFiles as M, defaultOptions as Mt, isGitSpecifier as N, parseConfig as Nt, scheduleMinute as O, globFolders as Ot, isPinned as P, repoOf as Q, noLocalPaths as R, tsconfigTest as S, matchesAny as St, sourceMain as T, replaceLine as Tt, LICENSE_TEXTS as U, hasImportMetaMain as V, authorOf as W, homePackage as X, declaredName as Y, messageOf as Z, configsOfScript as _, codePackages as _t, listRules as a, mergeHomes as at, testsRequired as b, keyLine as bt, runCli as c, ACTIONS_COMMIT as ct, RULES as d, prPathFilters as dt, HOMES as et, workspaceProtocol as f, summaryName as ft, typedScripts as g, cleanPath as gt, trustPolicy as h, DEPENDENCY_FIELDS as ht, formatResult as i, mapText as it, requiredScripts as j, workspaceGlobs as jt, roadmapOfLine as k, globToRegExp as kt, runFix as l, convertGate as lt, TRAIN_SCOPES as m, cuePreset as mt, annotations as n, findHomes as nt, readConfig as o, readOverlay as ot, IGNORE_AFTER as p, STRICT_OPTIONS as pt, mitText as q, createContext as r, mapMarkdown as rt, runChecks as s, HOME_EXPORTS as st, USAGE as t, MAP_RULE as tt, summaryMarkdown as u, gateTrigger as ut, scriptsOf as v, hasFile as vt, pathsOf as w, readJsonc as wt, hasTests as x, lineOf as xt, typedFiles as y, inFolder as yt, noBuildOutput as z };
9737
9756
 
9738
- //# sourceMappingURL=run-DPO3BOI4.js.map
9757
+ //# sourceMappingURL=run-uE1CPx4q.js.map