@mark1russell7/conventions 0.36.1 → 0.36.2

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
@@ -101,7 +101,8 @@ The field `conventions` of the root `package.json` sets the rules. An exception
101
101
  |---|---|
102
102
  | `rules.<id>.off` | The rule does not start. The text is the reason, and the output shows it. |
103
103
  | `rules.<id>.ignore` | The globs of the files whose breaks the rule does not report. It needs `reason`. On a pull request or with `--base`, a file that the change adds is not ignored: `ignore` keeps only the exceptions that exist. A renamed file is not added. An entry that matches no break of its rule is a break, so the list does not keep converted files. |
104
- | `rules.<id>.reason` | The reason of `ignore` or of a changed option. |
104
+ | `rules.<id>.generated` | The globs of build output whose breaks the rule does not report, for example `dist/**` in a repository that keeps `dist/` in git. It needs `reason`. A build adds a file there for each new source file, so `generated` also covers a file that the change adds. An entry that matches no break of its rule is a break. |
105
+ | `rules.<id>.reason` | The reason of `ignore`, of `generated` or of a changed option. |
105
106
  | `rules.<id>.<option>` | An option of the rule. It needs `reason`, because a changed option can make a rule weaker. `conventions --list` shows the options and their values. |
106
107
  | `packages` | The globs of the package folders. The default is the `packages` list of `pnpm-workspace.yaml`. |
107
108
 
package/build/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { c as runCli } from "./run-D4nX8sbO.js";
2
+ import { c as runCli } from "./run-CDGXnpQk.js";
3
3
  // src/cli.ts
4
4
  try {
5
5
  process.exitCode = runCli(process.argv.slice(2), {
package/build/index.d.ts CHANGED
@@ -133,7 +133,12 @@ interface RuleConfig {
133
133
  readonly off?: string;
134
134
  /** The globs of files that the rule does not report. */
135
135
  readonly ignore: readonly string[];
136
- /** The reason of `ignore` or of the changed options. */
136
+ /**
137
+ * The globs of build output that the rule does not report, for example `dist/**`. A build makes these files
138
+ * from source that the rules examine, so a file that the change adds is also not reported.
139
+ */
140
+ readonly generated?: readonly string[];
141
+ /** The reason of `ignore`, of `generated` or of the changed options. */
137
142
  readonly reason?: string;
138
143
  /** The options of the rule, with the defaults. */
139
144
  readonly options: Options;
@@ -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-after-cancel.ts","../src/rules/gate-trigger.ts","../src/rules/security-one-job.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/api-report-script.ts","../src/rules/pages-after-release.ts","../src/rules/pages-site.ts","../src/rules/pinned-git-deps.ts","../src/rules/pipe-fails.ts","../src/rules/push-main-only.ts","../src/rules/unreleased-change.ts","../src/rules/published-minor.ts","../src/rules/release-files.ts","../src/rules/required-scripts.ts","../src/rules/roadmap-parses.ts","../src/rules/runner-budget.ts","../src/rules/shared-docs.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/version-title.ts","../src/rules/workflow-parses.ts","../src/rules/workspace-protocol.ts","../src/rules/index.ts","../src/home-exports.ts","../src/workflow.ts","../src/run.ts","../src/release-text.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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,cAAc"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/rule.ts","../src/config.ts","../src/rules/cue-preset.ts","../src/rules/gate-after-cancel.ts","../src/rules/gate-trigger.ts","../src/rules/security-one-job.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/api-report-script.ts","../src/rules/pages-after-release.ts","../src/rules/pages-site.ts","../src/rules/pinned-git-deps.ts","../src/rules/pipe-fails.ts","../src/rules/push-main-only.ts","../src/rules/unreleased-change.ts","../src/rules/published-minor.ts","../src/rules/release-files.ts","../src/rules/required-scripts.ts","../src/rules/roadmap-parses.ts","../src/rules/runner-budget.ts","../src/rules/shared-docs.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/version-title.ts","../src/rules/workflow-parses.ts","../src/rules/workspace-protocol.ts","../src/rules/index.ts","../src/home-exports.ts","../src/workflow.ts","../src/run.ts","../src/release-text.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;;;;;WAKjC;EACT,MAAM,SAAS,aAAa,SAAS,UAAU;;;qBA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$t as codePackages, A as pathsOf, At as findHomes, B as lockedVersions, Bt as securityOneJob, C as configsOfScript, Ct as declaredName, D as hasTests, Dt as signaturesOf, E as testsRequired, Et as repoOf, F as sharedDocsRule, Ft as HOME_EXPORTS, G as NPM_REGISTRY, Gt as prPathFilters, H as publishedMinor, Ht as ACTIONS_COMMIT, I as roadmapOfLine, It as SECURITY_SCAN_COMMIT, J as npmLookup, Jt as readWorkflow, K as SHIPPED_FIELDS, Kt as summaryName, L as roadmapParses, Lt as SECURITY_SCAN_INPUTS, M as HOME_TIMEOUT_MS, Mt as mapText, N as blockHash, Nt as mergeHomes, O as tsconfigTest, Ot as HOMES, P as githubFetch, Pt as readOverlay, Q as isGitSpecifier, Qt as cleanPath, R as requiredScripts, Rt as SECURITY_TIMEOUT_MINUTES, S as typedScripts, St as repositoryIsPublic, T as typedFiles, Tt as messageOf, U as publishedMinorRule, Ut as convertGate, V as minorOf, Vt as withOneJob, W as reachOf, Wt as gateTrigger, X as unreleasedChangeRule, Xt as cuePreset, Y as unreleasedChange, Yt as STRICT_OPTIONS, Z as pipeFails, Zt as DEPENDENCY_FIELDS, _ as setVersions, _t as LICENSE_TEXTS, a as listRules, an as parseJsonc, at as pushMainOnly, b as TRAIN_SCOPES, bt as licenseFileOf, c as runCli, cn as runGit, ct as pagesSite, d as RULES, dn as globToRegExp, dt as HOME_PATTERNS, en as hasFile, et as pinnedGitDeps, f as workspaceProtocol, fn as packageFolders, ft as noLocalPaths, g as namedVersions, gt as mainCheck, h as yamlFaults, hn as parseConfig, ht as hasImportMetaMain, i as formatResult, in as matchesAny, it as scheduleMinute, j as sourceMain, jt as mapMarkdown, k as isSourcePath, kt as MAP_RULE, l as runFix, ln as specifiersOf, lt as apiReportScript, m as workflowParses, mn as defaultOptions, mt as REAL_COMPARE, n as annotations, nn as keyLine, nt as repositoryOfRemote, o as readConfig, on as readJsonc, ot as PAGES_WORKFLOWS, p as GITHUB_YAML, pn as workspaceGlobs, pt as noBuildOutput, q as UNSHIPPED_FILES, qt as gateAfterCancel, r as createContext, rn as lineOf, rt as runnerBudget, s as runChecks, sn as replaceLine, st as pagesCalls, t as USAGE, tn as inFolder, tt as pagesAfterRelease, u as summaryMarkdown, un as globFolders, ut as DEFAULT_ALLOWED, v as versionTitle, vt as authorOf, w as scriptsOf, wt as homePackage, x as trustPolicy, xt as mitText, y as IGNORE_AFTER, yt as licenseFile, z as releaseFiles, zt as securityCallers } from "./run-D4nX8sbO.js";
1
+ import { $ as isPinned, $t as codePackages, A as pathsOf, At as findHomes, B as lockedVersions, Bt as securityOneJob, C as configsOfScript, Ct as declaredName, D as hasTests, Dt as signaturesOf, E as testsRequired, Et as repoOf, F as sharedDocsRule, Ft as HOME_EXPORTS, G as NPM_REGISTRY, Gt as prPathFilters, H as publishedMinor, Ht as ACTIONS_COMMIT, I as roadmapOfLine, It as SECURITY_SCAN_COMMIT, J as npmLookup, Jt as readWorkflow, K as SHIPPED_FIELDS, Kt as summaryName, L as roadmapParses, Lt as SECURITY_SCAN_INPUTS, M as HOME_TIMEOUT_MS, Mt as mapText, N as blockHash, Nt as mergeHomes, O as tsconfigTest, Ot as HOMES, P as githubFetch, Pt as readOverlay, Q as isGitSpecifier, Qt as cleanPath, R as requiredScripts, Rt as SECURITY_TIMEOUT_MINUTES, S as typedScripts, St as repositoryIsPublic, T as typedFiles, Tt as messageOf, U as publishedMinorRule, Ut as convertGate, V as minorOf, Vt as withOneJob, W as reachOf, Wt as gateTrigger, X as unreleasedChangeRule, Xt as cuePreset, Y as unreleasedChange, Yt as STRICT_OPTIONS, Z as pipeFails, Zt as DEPENDENCY_FIELDS, _ as setVersions, _t as LICENSE_TEXTS, a as listRules, an as parseJsonc, at as pushMainOnly, b as TRAIN_SCOPES, bt as licenseFileOf, c as runCli, cn as runGit, ct as pagesSite, d as RULES, dn as globToRegExp, dt as HOME_PATTERNS, en as hasFile, et as pinnedGitDeps, f as workspaceProtocol, fn as packageFolders, ft as noLocalPaths, g as namedVersions, gt as mainCheck, h as yamlFaults, hn as parseConfig, ht as hasImportMetaMain, i as formatResult, in as matchesAny, it as scheduleMinute, j as sourceMain, jt as mapMarkdown, k as isSourcePath, kt as MAP_RULE, l as runFix, ln as specifiersOf, lt as apiReportScript, m as workflowParses, mn as defaultOptions, mt as REAL_COMPARE, n as annotations, nn as keyLine, nt as repositoryOfRemote, o as readConfig, on as readJsonc, ot as PAGES_WORKFLOWS, p as GITHUB_YAML, pn as workspaceGlobs, pt as noBuildOutput, q as UNSHIPPED_FILES, qt as gateAfterCancel, r as createContext, rn as lineOf, rt as runnerBudget, s as runChecks, sn as replaceLine, st as pagesCalls, t as USAGE, tn as inFolder, tt as pagesAfterRelease, u as summaryMarkdown, un as globFolders, ut as DEFAULT_ALLOWED, v as versionTitle, vt as authorOf, w as scriptsOf, wt as homePackage, x as trustPolicy, xt as mitText, y as IGNORE_AFTER, yt as licenseFile, z as releaseFiles, zt as securityCallers } from "./run-CDGXnpQk.js";
2
2
  // src/release-text.ts
3
3
  /**
4
4
  * The rule for the git tag and the text of a GitHub release of a package version.
@@ -9,6 +9,7 @@ import { parseAllDocuments } from "yaml";
9
9
  const RULE_FIELDS = [
10
10
  "off",
11
11
  "ignore",
12
+ "generated",
12
13
  "reason"
13
14
  ];
14
15
  const isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
@@ -50,6 +51,9 @@ function parseConfig(value, rules) {
50
51
  const reason = entry["reason"];
51
52
  if (reason !== void 0 && (typeof reason !== "string" || reason.trim() === "")) throw new Error(`${where}.reason must be text.`);
52
53
  if (ignore.length > 0 && reason === void 0) throw new Error(`${where}.ignore needs a reason: add "reason": "<why these files are an exception>".`);
54
+ const generated = entry["generated"] ?? [];
55
+ if (!isStrings(generated)) throw new Error(`${where}.generated must be an array of globs.`);
56
+ if (generated.length > 0 && reason === void 0) throw new Error(`${where}.generated needs a reason: add "reason": "<which build makes these files>".`);
53
57
  const options = { ...defaultOptions(rule) };
54
58
  const changed = [];
55
59
  for (const [name, option] of Object.entries(entry)) {
@@ -67,6 +71,7 @@ function parseConfig(value, rules) {
67
71
  result[id] = {
68
72
  ...off === void 0 ? {} : { off },
69
73
  ignore,
74
+ ...generated.length === 0 ? {} : { generated },
70
75
  ...reason === void 0 ? {} : { reason },
71
76
  options
72
77
  };
@@ -12979,19 +12984,23 @@ function runChecks(options) {
12979
12984
  });
12980
12985
  continue;
12981
12986
  }
12987
+ const generated = ruleConfig.generated ?? [];
12982
12988
  const added = ruleConfig.ignore.length > 0 ? addedFiles(context) : void 0;
12983
12989
  const breaks = [];
12984
- for (const item of outcome) if (!matchesAny(item.file, ruleConfig.ignore)) breaks.push(item);
12985
- else if (added?.has(item.file) === true) breaks.push({
12986
- ...item,
12987
- message: `${item.message} The change adds this file, so \`ignore\` does not cover it.`
12988
- });
12990
+ for (const item of outcome) {
12991
+ if (matchesAny(item.file, generated)) continue;
12992
+ if (!matchesAny(item.file, ruleConfig.ignore)) breaks.push(item);
12993
+ else if (added?.has(item.file) === true) breaks.push({
12994
+ ...item,
12995
+ message: `${item.message} The change adds this file, so \`ignore\` does not cover it.`
12996
+ });
12997
+ }
12989
12998
  const ignored = outcome.length - breaks.length;
12990
- if (rule.changeScoped !== true) for (const glob of ruleConfig.ignore) {
12999
+ if (rule.changeScoped !== true) for (const [field, globs] of [["ignore", ruleConfig.ignore], ["generated", generated]]) for (const glob of globs) {
12991
13000
  if (outcome.some((item) => matchesAny(item.file, [glob]))) continue;
12992
13001
  breaks.push({
12993
13002
  file: "package.json",
12994
- message: `The entry \`${glob}\` of \`ignore\` matches no break of this rule. Remove it from the field \`conventions\`.`
13003
+ message: `The entry \`${glob}\` of \`${field}\` matches no break of this rule. Remove it from the field \`conventions\`.`
12995
13004
  });
12996
13005
  }
12997
13006
  const note = ruleConfig.reason === void 0 ? {} : { note: ruleConfig.reason };
@@ -13308,4 +13317,4 @@ function runMap(args, io) {
13308
13317
  }
13309
13318
  export { isPinned as $, codePackages as $t, pathsOf as A, findHomes as At, lockedVersions as B, securityOneJob as Bt, configsOfScript as C, declaredName as Ct, hasTests as D, signaturesOf as Dt, testsRequired as E, repoOf as Et, sharedDocsRule as F, HOME_EXPORTS as Ft, NPM_REGISTRY as G, prPathFilters as Gt, publishedMinor as H, ACTIONS_COMMIT as Ht, roadmapOfLine as I, SECURITY_SCAN_COMMIT as It, npmLookup as J, readWorkflow as Jt, SHIPPED_FIELDS as K, summaryName as Kt, roadmapParses as L, SECURITY_SCAN_INPUTS as Lt, HOME_TIMEOUT_MS as M, mapText as Mt, blockHash as N, mergeHomes as Nt, tsconfigTest as O, HOMES as Ot, githubFetch as P, readOverlay as Pt, isGitSpecifier as Q, cleanPath as Qt, requiredScripts as R, SECURITY_TIMEOUT_MINUTES as Rt, typedScripts as S, repositoryIsPublic as St, typedFiles as T, messageOf as Tt, publishedMinorRule as U, convertGate as Ut, minorOf as V, withOneJob as Vt, reachOf as W, gateTrigger as Wt, unreleasedChangeRule as X, cuePreset as Xt, unreleasedChange as Y, STRICT_OPTIONS as Yt, pipeFails as Z, DEPENDENCY_FIELDS as Zt, setVersions as _, LICENSE_TEXTS as _t, listRules as a, parseJsonc as an, pushMainOnly as at, TRAIN_SCOPES as b, licenseFileOf as bt, runCli as c, runGit as cn, pagesSite as ct, RULES as d, globToRegExp as dn, HOME_PATTERNS as dt, hasFile as en, pinnedGitDeps as et, workspaceProtocol as f, packageFolders as fn, noLocalPaths as ft, namedVersions as g, mainCheck as gt, yamlFaults as h, parseConfig as hn, hasImportMetaMain as ht, formatResult as i, matchesAny as in, scheduleMinute as it, sourceMain as j, mapMarkdown as jt, isSourcePath as k, MAP_RULE as kt, runFix as l, specifiersOf as ln, apiReportScript as lt, workflowParses as m, defaultOptions as mn, REAL_COMPARE as mt, annotations as n, keyLine as nn, repositoryOfRemote as nt, readConfig as o, readJsonc as on, PAGES_WORKFLOWS as ot, GITHUB_YAML as p, workspaceGlobs as pn, noBuildOutput as pt, UNSHIPPED_FILES as q, gateAfterCancel as qt, createContext as r, lineOf as rn, runnerBudget as rt, runChecks as s, replaceLine as sn, pagesCalls as st, USAGE as t, inFolder as tn, pagesAfterRelease as tt, summaryMarkdown as u, globFolders as un, DEFAULT_ALLOWED as ut, versionTitle as v, authorOf as vt, scriptsOf as w, homePackage as wt, trustPolicy as x, mitText as xt, IGNORE_AFTER as y, licenseFile as yt, releaseFiles as z, securityCallers as zt };
13310
13319
 
13311
- //# sourceMappingURL=run-D4nX8sbO.js.map
13320
+ //# sourceMappingURL=run-CDGXnpQk.js.map