@mark1russell7/conventions 0.52.4 → 0.52.5

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
@@ -56,6 +56,7 @@ The rules come from the invariants audit of 2026-10-26 (strategy item s38). The
56
56
  | `required-scripts` | The root `package.json` has the script `typecheck`. It also has `lint:ste` when the repository uses `ste-lint`: a dependency on `@mark1russell7/ste-lint`, or a `ste.config.json` at the root. The shared CI skips a missing script, so a removed script turns its check off with no sign. | client, coeval, crawler, private, headroom, Vex `ste-prose`. systems `lint-ste-in-ci`. coeval, crawler, headroom, Vex `tsconfig-test`. |
57
57
  | `no-build-output` | Git keeps no file in a folder named `dist` or `build`, or in a `coverage` folder next to a `package.json`. | client `no-build-output`, `no-dist`, `no-dist-commit`. Only one repository of the audit tells this rule. The `.gitignore` of the template has it for each repository. |
58
58
  | `no-local-paths` | No tracked file has the home folder of a user: `C:\Users\<name>`, `/Users/<name>` or `/home/<name>`. A CI user (`runner`), a name of one character and a placeholder (`<you>`) are not a break. The commit messages of the change (a pull request, or `--base`) and the title and the body of the pull request do not have one either. The same is true for each pattern of the option `patterns` and of the environment variable `CONVENTIONS_PRIVATE_PATTERNS`. A break of a private pattern shows only the line of the pattern in the variable, not the text. A line of the variable that is not a valid regular expression is a break of its own. | client `I12`. systems `no-identifying-names`, `no-private-identifiers`, `no-private-names`. coeval `no-private-names`. |
59
+ | `no-console` | No source file calls `console`. Each break names the kind of the call. Output for a person (the text, the tables and the status lines of a CLI) goes to `createPrinter` of `@mark1russell7/text/print`. A diagnostic of a library or a service (a warning, a debug line, a caught error) goes to a log record of the logger of `@mark1russell7/otel-ts`, with its trace context. A call in a CLI file is output, except `debug` and `trace`. A CLI file starts with `#!`, has `cli`, `main`, `bin` or `commands` in its path, or reads `process.argv`. Each other call is a diagnostic, except `console.table`. Tests, fixtures, scripts, benches and examples are not sources (the option `skip`). A break is a warning until the repository sets the option `fail`, when its count is 0. | a decision of 2026-11-25: a census found 1549 console calls in the sources of 36 repositories. |
59
60
  | `release-files` | A pull request changes `.github/workflows/release.yml` or `scripts/release/` only with a line `Release-Edit: <reason>` in a commit message or in the body of the pull request. The commits of the release bot (the sync of the template) need no reason. | coeval `no-release-edit`, `no-release-edits`. crawler `no-release-edit`, `no-release-edits`. headroom `no-release-edits`, `release-files-frozen`. |
60
61
  | `unreleased-change` | A change does not set a version that npm has: the release skips such a version. The rule compares the version of the head of the change with the version of its merge base, so a version that only the base branch changed does not count. A repository where each pull request sets its version sets the option `versionEachChange`. Then a change of the shipped files also raises the version, when npm has that version already. The files that ship are the files of the folder of the package, without the tests, the fixtures, the Markdown files and the configs (the option `unshipped`). When the package has the field `files`, an entry that git tracks ships its files. An entry that git does not track is build output. Then the inputs of the build ship: each file of `src/`, and each script, module and JSON file. The files of `main` and `bin` also ship. A change of `package.json` ships when a field of the option `fields` changes, for example `exports`, but not the dependencies. On a push to the default branch, a version that the push sets breaks only when npm had it before the push. The release of the same push can publish it. An error of the registry makes the rule show `skip`. A repository with `.changeset/config.json`, a private package and a version `0.0.0` or `0.0.0-<stage>` are not examined. | rigor #18 and #20 (2026-11-02): two pull requests set the same version, and the second change did not get to npm. crawler, coeval, template `release.yml`. |
61
62
  | `version-title` | A merge whose title names a version sets a version in a `package.json`. A title names a version in parentheses at its end, for example `(0.3.3)` before the `(#212)` of a squash, or after `Release` at its start. On a push to the default branch, the rule examines each commit of the first-parent line against its first parent. On a pull request, it reads the title of the event file and examines the merge commit against the base. On a dispatched run of a pull request, the file of `CONVENTIONS_PULL_REQUEST` gives the title. Then the rule examines the change from the merge base to the head. A version counts only when the base branch does not have it already. A title with no version passes. A title that names an other version than the version that the merge sets also passes, because the change gets a release. | template #212 (`5933b34`) and #215 (`e077054`), 2026-11-06: both set `site-pages` 0.3.3, so the squash of #215 changed no `package.json`, and no release started. Template #162 and #164 (2026-11-04) did the same with 0.2.5. crawler, coeval `release.yml`. |
@@ -146,6 +147,8 @@ An unknown rule, an unknown option, or an exception or a changed option without
146
147
  | `no-build-output.reports` | `["coverage"]` | The names of the folders of reports. Such a folder breaks the rule only next to a `package.json`. |
147
148
  | `no-local-paths.allow` | `[]` | More user names that are not a break. |
148
149
  | `no-local-paths.patterns` | `[]` | More regular expressions of text that no file has. The environment variable `CONVENTIONS_PRIVATE_PATTERNS` adds one on each line, so a private name stays out of `package.json`. The shared CI gives the variable from the secret of the same name. |
150
+ | `no-console.fail` | `false` | A break fails the check. Set it when the count of the repository is 0, so the count cannot grow again. |
151
+ | `no-console.skip` | the globs of tests, fixtures, scripts, benches and examples | The files that are not sources. |
149
152
  | `release-files.paths` | `[".github/workflows/release.yml", "scripts/release/**"]` | The globs of the files of the release flow. |
150
153
  | `release-files.trailer` | `Release-Edit` | The key of the line that gives the reason. |
151
154
  | `release-files.authors` | `["mark1russell7-release-train[bot]"]` | The authors of the release flow. Their commits need no reason. |
package/build/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { c as runCli } from "./run-DfHH0aZb.js";
2
+ import { c as runCli } from "./run-Bh2ogCYi.js";
3
3
  import { readFileSync } from "node:fs";
4
4
  // src/cli.ts
5
5
  try {
package/build/index.d.ts CHANGED
@@ -131,6 +131,12 @@ interface Rule {
131
131
  */
132
132
  readonly failsFrom?: string;
133
133
  check(context: RuleContext, options: Options): RuleOutcome;
134
+ /**
135
+ * This function gives a reason when the breaks of the rule are only warnings with these options. An example is a
136
+ * rule that warns until a repository sets an option. It gives undefined when a break fails the check. With no function, a
137
+ * break fails the check after the day `failsFrom`.
138
+ */
139
+ warnOnly?(options: Options): string | undefined;
134
140
  /**
135
141
  * This function gives the reason when the rule cannot read a part of its cases, for example a private source that CI
136
142
  * does not give. It gives undefined when the rule reads each part. The check then shows "no read" and the reason with
@@ -490,6 +496,17 @@ export declare const REAL_COMPARE = "process.argv[1] !== undefined && realpathSy
490
496
  export declare function hasImportMetaMain(range: unknown): boolean;
491
497
  export declare const mainCheck: Rule;
492
498
  export declare const noBuildOutput: Rule;
499
+ /** The files that are not sources: tests, fixtures, scripts, benches and examples. The census of 2026-11-25 uses the same split. */
500
+ export declare const NOT_SOURCE: readonly string[];
501
+ /** The kind of a call of `console`. */
502
+ type ConsoleKind = "output" | "diagnostic";
503
+ /** This function tells if a source file is a CLI file: it starts with `#!`, its path names a CLI, or it reads `process.argv`. */
504
+ export declare function isCliFile(file: string, text: string): boolean;
505
+ /** This function gives the kind of a call of `console.<method>` in a file. */
506
+ export declare function consoleKind(cli: boolean, method: string): ConsoleKind;
507
+ /** This function gives a break for each call of `console` in the text of one source file. */
508
+ export declare function consoleBreaks(file: string, text: string): Break[];
509
+ export declare const noConsole: Rule;
493
510
  /**
494
511
  * The private name list: a JSON file outside of the public repositories, with the names of private projects. The file
495
512
  * `schema/private-names.schema.json` tells its form. This module parses the list and finds its names in a line or in a
@@ -1277,5 +1294,5 @@ export declare function npmUrl(name: string, version: string): string;
1277
1294
  * link to npm. The Releases page of `site-pages` reads each list item as a change.
1278
1295
  */
1279
1296
  export declare function releaseNotes(name: string, version: string, changelog: string | undefined): string;
1280
- export { type Advisory, type AllowedHit, type AuditSource, type Break, type CheckOptions, type CheckResult, type CliIo, type ConventionsConfig, type Edit, type EventClass, type ExpressionValue, type FixResult, type HiddenFailure, type Home, type HomeAnswer, type HomeFetch, type HomeModule, type HomeState, type HookOptions, type JobPeak, type KeyLines, type LinePlace, type Manifest, type Minor, type ModuleUse, type NameHit, type NameRule, type NpmDrift, type NpmDriftKind, type NpmPresence, OWNERS, type OptionSpec, type OptionValue, type Options, type Owner, type PackageInfo, type PagesCall, type ParsedConcurrency, type ParsedJob, type ParsedStep, type ParsedWorkflow, type PathFilter, type PeakOptions, type PrePushArgs, type PrePushOptions, type PrivateNameList, type PrivatePattern, type PrivateSources, type RegistryAnswer, type RegistryLookup, type RepoRef, type Rule, type RuleConfig, type RuleContext, type RuleOutcome, type RuleResult, type RunPart, type SecurityCaller, type SummaryJob, type TextBreakOptions, type Workflow, type WorkflowInput, type WorkflowJob, type WorkflowPeak, type WorkflowPermissions, type WorkflowStep, type YamlFault, globFolders, globToRegExp, isWorkspaceFolder, ownerOf, ownersOf, packageFolders, parseWorkspaceGlobs, repoKeyer, sharedNames, workspaceGlobs };
1297
+ export { type Advisory, type AllowedHit, type AuditSource, type Break, type CheckOptions, type CheckResult, type CliIo, type ConsoleKind, type ConventionsConfig, type Edit, type EventClass, type ExpressionValue, type FixResult, type HiddenFailure, type Home, type HomeAnswer, type HomeFetch, type HomeModule, type HomeState, type HookOptions, type JobPeak, type KeyLines, type LinePlace, type Manifest, type Minor, type ModuleUse, type NameHit, type NameRule, type NpmDrift, type NpmDriftKind, type NpmPresence, OWNERS, type OptionSpec, type OptionValue, type Options, type Owner, type PackageInfo, type PagesCall, type ParsedConcurrency, type ParsedJob, type ParsedStep, type ParsedWorkflow, type PathFilter, type PeakOptions, type PrePushArgs, type PrePushOptions, type PrivateNameList, type PrivatePattern, type PrivateSources, type RegistryAnswer, type RegistryLookup, type RepoRef, type Rule, type RuleConfig, type RuleContext, type RuleOutcome, type RuleResult, type RunPart, type SecurityCaller, type SummaryJob, type TextBreakOptions, type Workflow, type WorkflowInput, type WorkflowJob, type WorkflowPeak, type WorkflowPermissions, type WorkflowStep, type YamlFault, globFolders, globToRegExp, isWorkspaceFolder, ownerOf, ownersOf, packageFolders, parseWorkspaceGlobs, repoKeyer, sharedNames, workspaceGlobs };
1281
1298
  //# sourceMappingURL=index.d.ts.map
@@ -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-gate.ts","../src/rules/security-one-job.ts","../src/rules/summary-job.ts","../src/rules/setup-cue.ts","../src/rules/shared-ci.ts","../src/rules/service-run-main.ts","../src/map.ts","../src/rules/home-module.ts","../src/rules/home-package.ts","../src/rules/license-file.ts","../src/rules/coverage-provider.ts","../src/rules/main-check.ts","../src/rules/no-build-output.ts","../src/private-names.ts","../src/rules/no-local-paths.ts","../src/rules/pack-no-buildinfo.ts","../src/rules/publish-text-safe.ts","../src/rules/exports-require.ts","../src/rules/api-report-script.ts","../src/rules/pages-after-release.ts","../src/rules/pages-site.ts","../src/rules/site-check-in-ci.ts","../src/rules/pinned-git-deps.ts","../src/rules/pipe-fails.ts","../src/rules/job-fails.ts","../src/rules/playwright-install.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/workflow.ts","../src/rules/runner-peak.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/run.ts","../src/pre-push.ts","../src/workflow-expression.ts","../src/home-exports.ts","../src/release-text.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;;WAEA;;EAET;;EAEA,IAAI;;;;;;EAMJ,SAAS;;;wBAIK,UAAU,SAAS,KAAK,iCAAiC;;KAM7D,uBAAuB;WAAqB;;;qBAG3C;;UAGI;;WAEN;;WAEA;;WAEA;;WAEA;;WAEA,kBAAkB;;WAElB,SAAS,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AmB,UAAS,KAAK,0CAA+C;;wBAwCpH,UAAU,SAAS,eAAe;;UAkEjC;;WAEN;;WAEA;;WAEA,QAAQ;;;;;;;wBAWH,OAAO,SAAS,eAAe;;wBAyC/B,aAAa,QAAQ;;wBA4BrB,gBAAgB,QAAQ;;;;;;wBA2BxB,YAAY,QAAQ;;wBAapB,UAAU,QAAQ,+BAA+B,iBAAgB;;UAkBhE;WACN;WACA,KAAK,SAAS;WACd,SAAS;WACT,SAAS;;WAET;;;qBAIE;;wBA8EG,OAAO,yBAAyB,IAAI;;qBCxYvC;;UAGI;;WAEN;;;;;WAKA;;;;;WAKA;;;;;WAKA;;WAEA;WACA,KAAK,SAAS;;WAEd;;WAEA,MAAM;;WAEN,YAAY;;;;;;;;;;;;wBA0MP,QAAQ,SAAS,gBAAgB,IAAI,KAAK;;UA6GzC;;WAEN;WACA;WACA;WACA;;;;;;wBAOK,iBAAiB,0BAA0B;;;;;wBAuB3C,eAAe,MAAM,aAAa,IAAI,KAAK;;qBAS9C;;;;;;;;qBAgCA;;UAgBI;;WAEN;WACA,KAAK,SAAS;;WAEd,MAAM;;;;;;;wBAQD,YAAY,SAAS,aAAa,IAAI,KAAK;;;;;;;;;;;;KCzc/C;;UAGK;WACN,OAAO,YAAY;WACnB;;WAEA;;;wBA8DK,mBAAmB,cAAc,gBAAgB;;;;;wBAoGjD,WAAW,eAAe,gBAAgB,YAAY;;;;;wBActD,OAAO,mBAAmB;;qBCjM7B,cAAc,SAAS;WAA0B;WAA0B;;;;;;;;;qBCM3E;;wBAGG,QAAQ,cAAc,iBAAiB;;;;;;;;wBAavC,iBAAiB,kBAAkB,iBAAiB;;wBA+BpD,OAAO,cAAc;;;;;wBAQrB,aAAa,cAAc,iBAAiB"}
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-gate.ts","../src/rules/security-one-job.ts","../src/rules/summary-job.ts","../src/rules/setup-cue.ts","../src/rules/shared-ci.ts","../src/rules/service-run-main.ts","../src/map.ts","../src/rules/home-module.ts","../src/rules/home-package.ts","../src/rules/license-file.ts","../src/rules/coverage-provider.ts","../src/rules/main-check.ts","../src/rules/no-build-output.ts","../src/rules/no-console.ts","../src/private-names.ts","../src/rules/no-local-paths.ts","../src/rules/pack-no-buildinfo.ts","../src/rules/publish-text-safe.ts","../src/rules/exports-require.ts","../src/rules/api-report-script.ts","../src/rules/pages-after-release.ts","../src/rules/pages-site.ts","../src/rules/site-check-in-ci.ts","../src/rules/pinned-git-deps.ts","../src/rules/pipe-fails.ts","../src/rules/job-fails.ts","../src/rules/playwright-install.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/workflow.ts","../src/rules/runner-peak.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/run.ts","../src/pre-push.ts","../src/workflow-expression.ts","../src/home-exports.ts","../src/release-text.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;;WAEA;;EAET;;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B;;;;;;;;;qBCM3E;;wBAGG,QAAQ,cAAc,iBAAiB;;;;;;;;wBAavC,iBAAiB,kBAAkB,iBAAiB;;wBA+BpD,OAAO,cAAc;;;;;wBAQrB,aAAa,cAAc,iBAAiB"}
package/build/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as requiredScripts, $n as LICENSE_TEXTS, $t as noBuildOutput, A as scriptsOf, An as SHARED_ACTIONS, Ar as parseJsonc, At as packNoBuildinfo, B as TEMPLATE_CALLED, Bn as SUMMARY_GATES, Br as parseRuleConfig, Bt as privatePatterns, C as setVersions, Cn as npmNames, Cr as codePackages, Ct as pagesAfterRelease, D as trustPolicy, Dn as serviceRunMain, Dr as lineOf, Dt as pagesSite, E as TRAIN_SCOPES, En as runCalls, Er as keyLine, Et as pagesCalls, F as sourceMain, Fn as setupCue, Fr as runGitShow, Ft as PRIVATE_PATTERNS_VARIABLE, G as runnerPeak, Gn as SECURITY_SCAN_COMMIT, Gt as isAllowedHit, H as calledJobs, Hn as hasSummaryJob, Ht as PRIVATE_NAME_LIST, I as HOME_TIMEOUT_MS, In as SECURITY_FILE, Ir as showFiles, It as invalidPatternBreaks, J as evaluateExpression, Jn as securityCallers, Jt as lineNameHits, K as runsAtOnce, Kn as SECURITY_SCAN_INPUTS, Kt as isCommonUse, L as blockHash, Ln as isSecurityGate, Lr as specifiersOf, Lt as noLocalPaths, M as testsRequired, Mn as SHARED_WORKFLOWS, Mr as replaceLine, Mt as HOME_PATTERNS, N as isSourcePath, Nn as callsSharedCi, Nr as repositoryOfRemote, Nt as PRIVATE_NAMES_FILE_CONFIG, O as typedScripts, On as hasTests, Or as matchesAny, Ot as exportsRequire, P as pathsOf, Pn as sharedCi, Pr as runGit, Pt as PRIVATE_NAMES_FILE_VARIABLE, Q as roadmapParses, Qn as scheduleMinute, Qt as pathNameHit, R as githubFetch, Rn as securityGate, Rr as defaultOptions, Rt as privateNamesFile, S as namedVersions, Sn as npmDrift, Sr as cleanPath, St as siteCheckInCi, T as IGNORE_AFTER, Tn as SERVICE_PACKAGE, Tr as inFolder, Tt as PAGES_WORKFLOWS, U as eventClass, Un as startsOnPullRequest, Ut as PrivateNameListError, V as UNKNOWN_MATRIX_JOBS, Vn as addSummaryJob, Vt as privateTextBreaks, W as matrixPeak, Wn as summaryJobRule, Wt as firstNameMatch, X as mayRun, Xn as withOneJob, Xt as nameMatches, Y as groupParts, Yn as securityOneJob, Yt as mergePrivateNames, Z as roadmapOfLine, Zn as runnerBudget, Zt as parsePrivateNames, _ as runPrePushArgs, _n as MAP_RULE, _r as yamlFaults, _t as swallowsTests, a as listRules, an as homeModule, ar as ACTIONS_COMMIT, at as reachOf, b as GITHUB_YAML, bn as mapText, br as DEPENDENCY_FIELDS, bt as isPinned, c as runCli, cn as modulesOf, cr as prPathFilters, ct as UNSHIPPED_FILES, d as HOOK_MARKER, dn as messageOf, dr as summaryName, dt as unreleasedChangeRule, en as REAL_COMPARE, er as authorOf, et as releaseFiles, f as NO_READ_LINE, fn as repoOf, fr as gateAfterCancel, ft as playwrightInstall, g as prePush, gn as HOMES, gr as readWorkflow, gt as startsTests, h as parsePrePushArgs, hn as HOME_EXPORTS, hr as readAction, ht as parseAdvisory, i as formatResult, in as apiReportScript, ir as repositoryIsPublic, it as publishedMinorRule, j as typedFiles, jn as SHARED_CI, jr as readJsonc, jt as DEFAULT_ALLOWED, k as configsOfScript, kn as tsconfigTest, kr as parseCatFileBatch, kt as publishTextSafe, l as runFix, ln as declaredName, lr as skippableJobs, lt as npmLookup, m as installHook, mn as signaturesOf, mr as parseWorkflow, mt as jobFails, n as annotations, nn as mainCheck, nr as licenseFileOf, nt as minorOf, o as readConfig, on as moduleMessage, or as convertGate, ot as NPM_REGISTRY, p as PRE_PUSH_HOOK, pn as reposOf, pr as MATRIX_EXPAND_MAX, pt as hiddenFailures, q as workflowPeaks, qn as SECURITY_TIMEOUT_MINUTES, qt as lineNameHit, r as createContext, rn as coverageProvider, rr as mitText, rt as publishedMinor, s as runChecks, sn as moduleUses, sr as gateTrigger, st as SHIPPED_FIELDS, t as USAGE, tn as hasImportMetaMain, tr as licenseFile, tt as lockedVersions, u as summaryMarkdown, un as homePackage, ur as summaryJob, ut as unreleasedChange, v as RULES, vn as findHomes, vr as STRICT_OPTIONS, vt as pipeFails, w as versionTitle, wn as readOverlay, wr as hasFile, wt as pushMainOnly, x as workflowParses, xn as mergeHomes, xr as RULE_WARN_DAYS, xt as pinnedGitDeps, y as workspaceProtocol, yn as mapMarkdown, yr as cuePreset, yt as isGitSpecifier, z as sharedDocsRule, zn as securityWorkflow, zr as parseConfig, zt as privateNamesFiles } from "./run-DfHH0aZb.js";
1
+ import { $ as requiredScripts, $n as securityCallers, $t as NOT_SOURCE, A as scriptsOf, An as SERVICE_PACKAGE, Ar as inFolder, At as packNoBuildinfo, B as TEMPLATE_CALLED, Bn as setupCue, Br as runGitShow, Bt as privatePatterns, C as setVersions, Cn as findHomes, Cr as STRICT_OPTIONS, Ct as pagesAfterRelease, D as trustPolicy, Dn as npmDrift, Dr as cleanPath, Dt as pagesSite, E as TRAIN_SCOPES, En as mergeHomes, Er as RULE_WARN_DAYS, Et as pagesCalls, F as sourceMain, Fn as SHARED_ACTIONS, Fr as parseJsonc, Ft as PRIVATE_PATTERNS_VARIABLE, G as runnerPeak, Gn as SUMMARY_GATES, Gr as parseRuleConfig, Gt as isAllowedHit, H as calledJobs, Hn as isSecurityGate, Hr as specifiersOf, Ht as PRIVATE_NAME_LIST, I as HOME_TIMEOUT_MS, In as SHARED_CI, Ir as readJsonc, It as invalidPatternBreaks, J as evaluateExpression, Jn as startsOnPullRequest, Jt as lineNameHits, K as runsAtOnce, Kn as addSummaryJob, Kt as isCommonUse, L as blockHash, Ln as SHARED_WORKFLOWS, Lr as replaceLine, Lt as noLocalPaths, M as testsRequired, Mn as serviceRunMain, Mr as lineOf, Mt as HOME_PATTERNS, N as isSourcePath, Nn as hasTests, Nr as matchesAny, Nt as PRIVATE_NAMES_FILE_CONFIG, O as typedScripts, On as npmNames, Or as codePackages, Ot as exportsRequire, P as pathsOf, Pn as tsconfigTest, Pr as parseCatFileBatch, Pt as PRIVATE_NAMES_FILE_VARIABLE, Q as roadmapParses, Qn as SECURITY_TIMEOUT_MINUTES, Qt as pathNameHit, R as githubFetch, Rn as callsSharedCi, Rr as repositoryOfRemote, Rt as privateNamesFile, S as namedVersions, Sn as MAP_RULE, Sr as yamlFaults, St as siteCheckInCi, T as IGNORE_AFTER, Tn as mapText, Tr as DEPENDENCY_FIELDS, Tt as PAGES_WORKFLOWS, U as eventClass, Un as securityGate, Ur as defaultOptions, Ut as PrivateNameListError, V as UNKNOWN_MATRIX_JOBS, Vn as SECURITY_FILE, Vr as showFiles, Vt as privateTextBreaks, W as matrixPeak, Wn as securityWorkflow, Wr as parseConfig, Wt as firstNameMatch, X as mayRun, Xn as SECURITY_SCAN_COMMIT, Xt as nameMatches, Y as groupParts, Yn as summaryJobRule, Yt as mergePrivateNames, Z as roadmapOfLine, Zn as SECURITY_SCAN_INPUTS, Zt as parsePrivateNames, _ as runPrePushArgs, _n as repoOf, _r as gateAfterCancel, _t as swallowsTests, a as listRules, an as REAL_COMPARE, ar as authorOf, at as reachOf, b as GITHUB_YAML, bn as HOME_EXPORTS, br as readAction, bt as isPinned, c as runCli, cn as coverageProvider, cr as mitText, ct as UNSHIPPED_FILES, d as HOOK_MARKER, dn as moduleMessage, dr as convertGate, dt as unreleasedChangeRule, en as consoleBreaks, er as securityOneJob, et as releaseFiles, f as NO_READ_LINE, fn as moduleUses, fr as gateTrigger, ft as playwrightInstall, g as prePush, gn as messageOf, gr as summaryName, gt as startsTests, h as parsePrePushArgs, hn as homePackage, hr as summaryJob, ht as parseAdvisory, i as formatResult, in as noBuildOutput, ir as LICENSE_TEXTS, it as publishedMinorRule, j as typedFiles, jn as runCalls, jr as keyLine, jt as DEFAULT_ALLOWED, k as configsOfScript, kn as readOverlay, kr as hasFile, kt as publishTextSafe, l as runFix, ln as apiReportScript, lr as repositoryIsPublic, lt as npmLookup, m as installHook, mn as declaredName, mr as skippableJobs, mt as jobFails, n as annotations, nn as isCliFile, nr as runnerBudget, nt as minorOf, o as readConfig, on as hasImportMetaMain, or as licenseFile, ot as NPM_REGISTRY, p as PRE_PUSH_HOOK, pn as modulesOf, pr as prPathFilters, pt as hiddenFailures, q as workflowPeaks, qn as hasSummaryJob, qt as lineNameHit, r as createContext, rn as noConsole, rr as scheduleMinute, rt as publishedMinor, s as runChecks, sn as mainCheck, sr as licenseFileOf, st as SHIPPED_FIELDS, t as USAGE, tn as consoleKind, tr as withOneJob, tt as lockedVersions, u as summaryMarkdown, un as homeModule, ur as ACTIONS_COMMIT, ut as unreleasedChange, v as RULES, vn as reposOf, vr as MATRIX_EXPAND_MAX, vt as pipeFails, w as versionTitle, wn as mapMarkdown, wr as cuePreset, wt as pushMainOnly, x as workflowParses, xn as HOMES, xr as readWorkflow, xt as pinnedGitDeps, y as workspaceProtocol, yn as signaturesOf, yr as parseWorkflow, yt as isGitSpecifier, z as sharedDocsRule, zn as sharedCi, zr as runGit, zt as privateNamesFiles } from "./run-Bh2ogCYi.js";
2
2
  import { OWNERS, ownerOf, ownersOf, repoKeyer, sharedNames } from "./owners.js";
3
3
  import { a as packageFolders, i as isWorkspaceFolder, l as workspaceGlobs, n as globFolders, o as parseWorkspaceGlobs, r as globToRegExp } from "./workspace-_CIq-8ei.js";
4
4
  // src/release-text.ts
@@ -66,6 +66,6 @@ function releaseNotes(name, version, changelog) {
66
66
  if (section.length <= 1e5) return section;
67
67
  return `${section.slice(0, MAX_NOTES)}\n\n(The CHANGELOG.md of \`${name}\` has the full text.)`;
68
68
  }
69
- export { ACTIONS_COMMIT, DEFAULT_ALLOWED, DEPENDENCY_FIELDS, GITHUB_YAML, HOMES, HOME_EXPORTS, HOME_PATTERNS, HOME_TIMEOUT_MS, HOOK_MARKER, IGNORE_AFTER, LICENSE_TEXTS, MAP_RULE, MATRIX_EXPAND_MAX, MAX_NOTES, NO_READ_LINE, NPM_REGISTRY, OWNERS, PAGES_WORKFLOWS, PRE_PUSH_HOOK, PRIVATE_NAMES_FILE_CONFIG, PRIVATE_NAMES_FILE_VARIABLE, PRIVATE_NAME_LIST, PRIVATE_PATTERNS_VARIABLE, PrivateNameListError, REAL_COMPARE, RULES, RULE_WARN_DAYS, SECURITY_FILE, SECURITY_SCAN_COMMIT, SECURITY_SCAN_INPUTS, SECURITY_TIMEOUT_MINUTES, SERVICE_PACKAGE, SHARED_ACTIONS, SHARED_CI, SHARED_WORKFLOWS, SHIPPED_FIELDS, STRICT_OPTIONS, SUMMARY_GATES, TEMPLATE_CALLED, TRAIN_SCOPES, UNKNOWN_MATRIX_JOBS, UNSHIPPED_FILES, USAGE, addSummaryJob, annotations, apiReportScript, authorOf, blockHash, calledJobs, callsSharedCi, changelogSection, cleanPath, codePackages, configsOfScript, convertGate, coverageProvider, createContext, cuePreset, declaredName, defaultOptions, evaluateExpression, eventClass, exportsRequire, findHomes, firstNameMatch, formatResult, gateAfterCancel, gateTrigger, githubFetch, globFolders, globToRegExp, groupParts, hasFile, hasImportMetaMain, hasSummaryJob, hasTests, hiddenFailures, homeModule, homePackage, inFolder, installHook, invalidPatternBreaks, isAllowedHit, isCommonUse, isGitSpecifier, isPinned, isSecurityGate, isSourcePath, isWorkspaceFolder, jobFails, keyLine, licenseFile, licenseFileOf, lineNameHit, lineNameHits, lineOf, listRules, lockedVersions, mainCheck, mapMarkdown, mapText, matchesAny, matrixPeak, mayRun, mergeHomes, mergePrivateNames, messageOf, minorOf, mitText, moduleMessage, moduleUses, modulesOf, nameMatches, namedVersions, noBuildOutput, noLocalPaths, npmDrift, npmLookup, npmNames, npmUrl, ownerOf, ownersOf, packNoBuildinfo, packageFolders, pagesAfterRelease, pagesCalls, pagesSite, parseAdvisory, parseCatFileBatch, parseConfig, parseJsonc, parsePrePushArgs, parsePrivateNames, parseRuleConfig, parseWorkflow, parseWorkspaceGlobs, pathNameHit, pathsOf, pinnedGitDeps, pipeFails, playwrightInstall, prPathFilters, prePush, privateNamesFile, privateNamesFiles, privatePatterns, privateTextBreaks, publishTextSafe, publishedMinor, publishedMinorRule, pushMainOnly, reachOf, readAction, readConfig, readJsonc, readOverlay, readWorkflow, releaseFiles, releaseNotes, replaceLine, repoKeyer, repoOf, reposOf, repositoryIsPublic, repositoryOfRemote, requiredScripts, roadmapOfLine, roadmapParses, runCalls, runChecks, runCli, runFix, runGit, runGitShow, runPrePushArgs, runnerBudget, runnerPeak, runsAtOnce, scheduleMinute, scriptsOf, securityCallers, securityGate, securityOneJob, securityWorkflow, serviceRunMain, setVersions, setupCue, sharedCi, sharedDocsRule, sharedNames, showFiles, signaturesOf, siteCheckInCi, skippableJobs, sourceMain, specifiersOf, startsOnPullRequest, startsTests, summaryJob, summaryJobRule, summaryMarkdown, summaryName, swallowsTests, tagName, testsRequired, trustPolicy, tsconfigTest, typedFiles, typedScripts, unreleasedChange, unreleasedChangeRule, versionTitle, withOneJob, workflowParses, workflowPeaks, workspaceGlobs, workspaceProtocol, yamlFaults };
69
+ export { ACTIONS_COMMIT, DEFAULT_ALLOWED, DEPENDENCY_FIELDS, GITHUB_YAML, HOMES, HOME_EXPORTS, HOME_PATTERNS, HOME_TIMEOUT_MS, HOOK_MARKER, IGNORE_AFTER, LICENSE_TEXTS, MAP_RULE, MATRIX_EXPAND_MAX, MAX_NOTES, NOT_SOURCE, NO_READ_LINE, NPM_REGISTRY, OWNERS, PAGES_WORKFLOWS, PRE_PUSH_HOOK, PRIVATE_NAMES_FILE_CONFIG, PRIVATE_NAMES_FILE_VARIABLE, PRIVATE_NAME_LIST, PRIVATE_PATTERNS_VARIABLE, PrivateNameListError, REAL_COMPARE, RULES, RULE_WARN_DAYS, SECURITY_FILE, SECURITY_SCAN_COMMIT, SECURITY_SCAN_INPUTS, SECURITY_TIMEOUT_MINUTES, SERVICE_PACKAGE, SHARED_ACTIONS, SHARED_CI, SHARED_WORKFLOWS, SHIPPED_FIELDS, STRICT_OPTIONS, SUMMARY_GATES, TEMPLATE_CALLED, TRAIN_SCOPES, UNKNOWN_MATRIX_JOBS, UNSHIPPED_FILES, USAGE, addSummaryJob, annotations, apiReportScript, authorOf, blockHash, calledJobs, callsSharedCi, changelogSection, cleanPath, codePackages, configsOfScript, consoleBreaks, consoleKind, convertGate, coverageProvider, createContext, cuePreset, declaredName, defaultOptions, evaluateExpression, eventClass, exportsRequire, findHomes, firstNameMatch, formatResult, gateAfterCancel, gateTrigger, githubFetch, globFolders, globToRegExp, groupParts, hasFile, hasImportMetaMain, hasSummaryJob, hasTests, hiddenFailures, homeModule, homePackage, inFolder, installHook, invalidPatternBreaks, isAllowedHit, isCliFile, isCommonUse, isGitSpecifier, isPinned, isSecurityGate, isSourcePath, isWorkspaceFolder, jobFails, keyLine, licenseFile, licenseFileOf, lineNameHit, lineNameHits, lineOf, listRules, lockedVersions, mainCheck, mapMarkdown, mapText, matchesAny, matrixPeak, mayRun, mergeHomes, mergePrivateNames, messageOf, minorOf, mitText, moduleMessage, moduleUses, modulesOf, nameMatches, namedVersions, noBuildOutput, noConsole, noLocalPaths, npmDrift, npmLookup, npmNames, npmUrl, ownerOf, ownersOf, packNoBuildinfo, packageFolders, pagesAfterRelease, pagesCalls, pagesSite, parseAdvisory, parseCatFileBatch, parseConfig, parseJsonc, parsePrePushArgs, parsePrivateNames, parseRuleConfig, parseWorkflow, parseWorkspaceGlobs, pathNameHit, pathsOf, pinnedGitDeps, pipeFails, playwrightInstall, prPathFilters, prePush, privateNamesFile, privateNamesFiles, privatePatterns, privateTextBreaks, publishTextSafe, publishedMinor, publishedMinorRule, pushMainOnly, reachOf, readAction, readConfig, readJsonc, readOverlay, readWorkflow, releaseFiles, releaseNotes, replaceLine, repoKeyer, repoOf, reposOf, repositoryIsPublic, repositoryOfRemote, requiredScripts, roadmapOfLine, roadmapParses, runCalls, runChecks, runCli, runFix, runGit, runGitShow, runPrePushArgs, runnerBudget, runnerPeak, runsAtOnce, scheduleMinute, scriptsOf, securityCallers, securityGate, securityOneJob, securityWorkflow, serviceRunMain, setVersions, setupCue, sharedCi, sharedDocsRule, sharedNames, showFiles, signaturesOf, siteCheckInCi, skippableJobs, sourceMain, specifiersOf, startsOnPullRequest, startsTests, summaryJob, summaryJobRule, summaryMarkdown, summaryName, swallowsTests, tagName, testsRequired, trustPolicy, tsconfigTest, typedFiles, typedScripts, unreleasedChange, unreleasedChangeRule, versionTitle, withOneJob, workflowParses, workflowPeaks, workspaceGlobs, workspaceProtocol, yamlFaults };
70
70
 
71
71
  //# sourceMappingURL=index.js.map
@@ -3607,7 +3607,7 @@ function importsService(text) {
3607
3607
  /** A call of `run(` on a value, but not on `this`. */
3608
3608
  const RUN_CALL = /(?<!\bthis)\.run\s*\(/;
3609
3609
  /** The source files that the rule reads. */
3610
- const SOURCE = /\.(c|m)?tsx?$/;
3610
+ const SOURCE$1 = /\.(c|m)?tsx?$/;
3611
3611
  /**
3612
3612
  * This function gives the lines (from 1) of the calls of `run(` in a source text that imports the service package. A
3613
3613
  * text that imports only the tool entries (`/channel`, `/clock`, `/heartbeat`, `/backoff`, `/limiter`, `/rules`) has
@@ -3671,7 +3671,7 @@ const serviceRunMain = {
3671
3671
  if (!dependsOnService(info.manifest) || !hasFile(info.dir, main)) continue;
3672
3672
  const prefix = info.folder === "" ? "" : `${info.folder}/`;
3673
3673
  const entry = inFolder(info.folder, main);
3674
- const own = tracked.filter((path) => path.startsWith(`${prefix}src/`) && SOURCE.test(path) && !/\.d\.(c|m)?ts$/.test(path) && path !== entry && !isTestFile(path.slice(prefix.length)));
3674
+ const own = tracked.filter((path) => path.startsWith(`${prefix}src/`) && SOURCE$1.test(path) && !/\.d\.(c|m)?ts$/.test(path) && path !== entry && !isTestFile(path.slice(prefix.length)));
3675
3675
  for (const file of own.sort(byCode)) {
3676
3676
  let text;
3677
3677
  try {
@@ -4862,7 +4862,7 @@ const HOMES = [
4862
4862
  {
4863
4863
  area: "plain-text",
4864
4864
  title: "Plain text helpers",
4865
- covers: "escaping for HTML, attributes, regular expressions and Markdown, case conversion, padding and truncation, templates, English word forms (plurals, lists), the text of a thrown value (it never throws), the redaction of known secrets in a text (the raw form, the URL form and the Basic form). Escaping comes first",
4865
+ covers: "escaping for HTML, attributes, regular expressions and Markdown, case conversion, padding and truncation, templates, English word forms (plurals, lists), the text of a thrown value (it never throws), the redaction of known secrets in a text (the raw form, the URL form and the Basic form), a printer of lines and tables to injected streams (entry /print: the output of a CLI for a person; a diagnostic goes to a log record of otel-ts). Escaping comes first",
4866
4866
  packages: ["@mark1russell7/text"],
4867
4867
  repo: "mark1russell7/text",
4868
4868
  state: "published",
@@ -4883,7 +4883,11 @@ const HOMES = [
4883
4883
  "secret",
4884
4884
  "mask",
4885
4885
  "error message",
4886
- "thrown value"
4886
+ "thrown value",
4887
+ "printer",
4888
+ "cli output",
4889
+ "status line",
4890
+ "console"
4887
4891
  ],
4888
4892
  signatures: [
4889
4893
  "escapeHtml",
@@ -4896,7 +4900,8 @@ const HOMES = [
4896
4900
  "snakeCase",
4897
4901
  "pluralize",
4898
4902
  "redactSecrets",
4899
- "errorMessage"
4903
+ "errorMessage",
4904
+ "createPrinter"
4900
4905
  ]
4901
4906
  },
4902
4907
  {
@@ -17015,7 +17020,7 @@ function unpublishedNote(home) {
17015
17020
  return home.state === "unpublished" ? ` (not on npm: use workspace:* inside ${home.repo}; elsewhere a github: specifier pinned to a commit works only if ${home.repo} keeps its built files in git, else wait for the first npm publish)` : "";
17016
17021
  }
17017
17022
  /** This function gives the message of a break: the home, and if the home already exports the name. */
17018
- function messageOf(file, name, home) {
17023
+ function messageOf$1(file, name, home) {
17019
17024
  const exporter = home.packages.find((pkg) => HOME_EXPORTS[pkg]?.names.includes(name) === true);
17020
17025
  const where = home.packages.length === 0 ? home.repo : home.packages.map((pkg) => `\`${pkg}\``).join(", ");
17021
17026
  const use = unpublishedNote(home);
@@ -17071,7 +17076,7 @@ const homePackage = {
17071
17076
  if (signature !== void 0) breaks.push({
17072
17077
  file,
17073
17078
  line: index + 1,
17074
- message: messageOf(file, name, signature.home)
17079
+ message: messageOf$1(file, name, signature.home)
17075
17080
  });
17076
17081
  });
17077
17082
  }
@@ -17091,7 +17096,7 @@ const homePackage = {
17091
17096
  */
17092
17097
  const STATIC = /^[ \t]*(?:import|export)[ \t]+(type[ \t]+)?(?:(?:(?!\b(?:import|export)\b)[^;=()"'`])*?\bfrom[ \t]*)?(["'])([^"'\r\n]+)\2/gm;
17093
17098
  /** A call that loads a module: `import("x")`, `require("x")` or `process.getBuiltinModule("x")`. */
17094
- const CALL = /\b(import|require|getBuiltinModule)[ \t]*\([ \t]*(["'`])([^"'`\r\n]+)\2[ \t]*\)/g;
17099
+ const CALL$1 = /\b(import|require|getBuiltinModule)[ \t]*\([ \t]*(["'`])([^"'`\r\n]+)\2[ \t]*\)/g;
17095
17100
  /** The text after `import("x")` that makes it a type: a member that is not a method of a promise. */
17096
17101
  const TYPE_MEMBER = /^[ \t]*\.[ \t]*(?!then\b|catch\b|finally\b)[A-Za-z_$]/;
17097
17102
  /** This function gives the line (from 1) of each index of `text`, by the starts of the lines. */
@@ -17129,7 +17134,7 @@ function moduleUses(text) {
17129
17134
  }
17130
17135
  });
17131
17136
  }
17132
- for (const match of text.matchAll(CALL)) {
17137
+ for (const match of text.matchAll(CALL$1)) {
17133
17138
  const start = text.lastIndexOf("\n", match.index) + 1;
17134
17139
  const before = text.slice(start, match.index);
17135
17140
  if (before.includes("//") || /^[ \t]*(?:\*|\/\*)/.test(before)) continue;
@@ -18082,6 +18087,126 @@ const noBuildOutput = {
18082
18087
  }));
18083
18088
  }
18084
18089
  };
18090
+ // src/rules/no-console.ts
18091
+ /**
18092
+ * The rule `no-console`: no source file calls `console`. Each call is one of two kinds, and the break names the kind.
18093
+ *
18094
+ * - Output for a person: the text, the tables and the status lines of a command-line tool. It goes to the printer of
18095
+ * `@mark1russell7/text/print` (`createPrinter`), with the streams as parameters.
18096
+ * - A diagnostic of a library or a service: a warning, a debug line, a caught error. It goes to a log record through the
18097
+ * logger of `@mark1russell7/otel-ts` (`getLogger`), with its trace context, and not to a printer.
18098
+ *
18099
+ * A call in a CLI file is output, except `console.debug` and `console.trace`. A CLI file starts with `#!`, has the name
18100
+ * `cli`, `main` or a folder `bin` or `commands` in its path, or reads `process.argv`. Each other call is a diagnostic,
18101
+ * except `console.table`, which is output. Until a repository sets the option `fail`, a break is a warning. A repository
18102
+ * sets the option when its count is 0, so the count cannot grow again.
18103
+ */
18104
+ /** The files that the rule reads: the sources of JavaScript and TypeScript, and the pages and components that hold scripts. */
18105
+ const SOURCE = /\.(?:[cm]?[jt]s|[jt]sx|svelte|vue|html)$/;
18106
+ /** The files that are not sources: tests, fixtures, scripts, benches and examples. The census of 2026-11-25 uses the same split. */
18107
+ const NOT_SOURCE = [
18108
+ "**/*.d.ts",
18109
+ "**/*.test.*",
18110
+ "**/*.spec.*",
18111
+ "**/*.e2e.*",
18112
+ "**/*.probe.ts",
18113
+ "**/test/**",
18114
+ "**/tests/**",
18115
+ "**/__tests__/**",
18116
+ "**/e2e/**",
18117
+ "**/fixture/**",
18118
+ "**/fixtures/**",
18119
+ "**/script/**",
18120
+ "**/scripts/**",
18121
+ "**/bin/**",
18122
+ "**/tools/**",
18123
+ "**/bench/**",
18124
+ "**/benches/**",
18125
+ "**/benchmark/**",
18126
+ "**/benchmarks/**",
18127
+ "**/example/**",
18128
+ "**/examples/**",
18129
+ "**/demo/**"
18130
+ ];
18131
+ /** A call of a method of `console`. The group `method` is the name of the method. */
18132
+ const CALL = /\bconsole\s*\.\s*(?<method>[A-Za-z]+)\s*\(/g;
18133
+ /** A line that is a comment: it starts with `//`, `/*` or `*`. */
18134
+ const COMMENT = /^\s*(?:\/\/|\/\*|\*)/;
18135
+ /** The path of a CLI file: a folder `cli`, `bin` or `commands`, or a file `cli.*` or `main.*`. */
18136
+ const CLI_PATH = /(?:^|\/)(?:cli|bin|commands?)(?:\/|\.)|(?:^|[/._-])(?:cli|main)\.[a-z]+$/;
18137
+ /** This function tells if a source file is a CLI file: it starts with `#!`, its path names a CLI, or it reads `process.argv`. */
18138
+ function isCliFile(file, text) {
18139
+ return text.startsWith("#!") || CLI_PATH.test(file) || /\bprocess\.argv\b/.test(text);
18140
+ }
18141
+ /** This function gives the kind of a call of `console.<method>` in a file. */
18142
+ function consoleKind(cli, method) {
18143
+ if (method === "table") return "output";
18144
+ return cli && method !== "debug" && method !== "trace" ? "output" : "diagnostic";
18145
+ }
18146
+ /** This function gives the message of a break: the call, its kind and where it goes. */
18147
+ function messageOf(file, method, kind) {
18148
+ return kind === "output" ? `${file} calls console.${method} for output to a person. Write it with createPrinter of @mark1russell7/text/print.` : `${file} calls console.${method} for a diagnostic. Emit a log record with the logger of @mark1russell7/otel-ts (getLogger), with its trace context.`;
18149
+ }
18150
+ /** This function gives a break for each call of `console` in the text of one source file. */
18151
+ function consoleBreaks(file, text) {
18152
+ const cli = isCliFile(file, text);
18153
+ const breaks = [];
18154
+ text.split(/\r?\n/).forEach((line, index) => {
18155
+ if (COMMENT.test(line)) return;
18156
+ for (const match of line.matchAll(CALL)) {
18157
+ const method = match.groups?.["method"] ?? "";
18158
+ breaks.push({
18159
+ file,
18160
+ line: index + 1,
18161
+ message: messageOf(file, method, consoleKind(cli, method))
18162
+ });
18163
+ }
18164
+ });
18165
+ return breaks;
18166
+ }
18167
+ const noConsole = {
18168
+ id: "no-console",
18169
+ title: "No source file calls `console`: output for a person goes to the printer of `@mark1russell7/text/print`, and a diagnostic goes to a log record of `@mark1russell7/otel-ts`.",
18170
+ reason: "A console line has no trace id, no level that a collector reads and no redaction of secrets. A diagnostic then does not join the trace of its request, and the output of a CLI cannot go to a buffer in a test. A census of 2026-11-25 found 1549 console calls in the sources of 36 repositories.",
18171
+ fix: "Write the output of a CLI with createPrinter({ out: process.stdout, err: process.stderr }) of @mark1russell7/text/print. Emit each diagnostic of a library or a service with the logger of @mark1russell7/otel-ts. When the count is 0, set the option fail: true.",
18172
+ sources: [{
18173
+ repo: "private",
18174
+ rule: "no-console",
18175
+ doc: "a decision of 2026-11-25: no raw console, one printer for output and one logger for diagnostics"
18176
+ }],
18177
+ options: {
18178
+ fail: {
18179
+ type: "boolean",
18180
+ default: false,
18181
+ description: "A break fails the check. Until a repository sets it, a break is a warning. Set it when the count is 0."
18182
+ },
18183
+ skip: {
18184
+ type: "strings",
18185
+ default: NOT_SOURCE,
18186
+ description: "The globs of the files that are not sources: tests, fixtures, scripts, benches and examples."
18187
+ }
18188
+ },
18189
+ failsFrom: "2026-12-09",
18190
+ check(context, options) {
18191
+ const files = context.gitFiles();
18192
+ if (files === void 0) return { skipped: "the root is not in a git repository" };
18193
+ const skip = options["skip"];
18194
+ const breaks = [];
18195
+ for (const file of files.filter((path) => SOURCE.test(path) && !matchesAny(path, skip)).sort(byCode)) {
18196
+ let text;
18197
+ try {
18198
+ text = readFileSync(join(context.root, file), "utf8");
18199
+ } catch {
18200
+ continue;
18201
+ }
18202
+ if (text.includes("console")) breaks.push(...consoleBreaks(file, text));
18203
+ }
18204
+ return breaks;
18205
+ },
18206
+ warnOnly(options) {
18207
+ return options["fail"] === true ? void 0 : "The rule fails in a repository that sets the option fail: true, when its count is 0.";
18208
+ }
18209
+ };
18085
18210
  // src/private-names.ts
18086
18211
  /**
18087
18212
  * The private name list: a JSON file outside of the public repositories, with the names of private projects. The file
@@ -24021,6 +24146,7 @@ const RULES = [
24021
24146
  requiredScripts,
24022
24147
  noBuildOutput,
24023
24148
  noLocalPaths,
24149
+ noConsole,
24024
24150
  apiReportScript,
24025
24151
  releaseFiles,
24026
24152
  unreleasedChange,
@@ -24793,8 +24919,14 @@ function runChecks(options) {
24793
24919
  message: `The entry \`${glob}\` of \`${field}\` matches no break of this rule. Remove it from the field \`conventions\`.`
24794
24920
  });
24795
24921
  }
24796
- const warns = breaks.length > 0 && rule.failsFrom !== void 0 && today < rule.failsFrom;
24797
- const reason = warns ? [ruleConfig.reason, `The rule fails from ${rule.failsFrom ?? ""}.`].filter((text) => text !== void 0).join(" ") : ruleConfig.reason;
24922
+ const beforeDay = rule.failsFrom !== void 0 && today < rule.failsFrom;
24923
+ const optIn = breaks.length > 0 ? rule.warnOnly?.(ruleConfig.options) : void 0;
24924
+ const warns = breaks.length > 0 && (beforeDay || optIn !== void 0);
24925
+ const reason = warns ? [
24926
+ ruleConfig.reason,
24927
+ beforeDay ? `The rule fails from ${rule.failsFrom ?? ""}.` : void 0,
24928
+ optIn
24929
+ ].filter((text) => text !== void 0).join(" ") : ruleConfig.reason;
24798
24930
  const note = reason === void 0 ? {} : { note: reason };
24799
24931
  let noRead;
24800
24932
  try {
@@ -25255,6 +25387,6 @@ function runHook(args, io) {
25255
25387
  git: (gitArgs) => runGit(io.cwd, gitArgs)
25256
25388
  }, io);
25257
25389
  }
25258
- export { requiredScripts as $, LICENSE_TEXTS as $n, noBuildOutput as $t, scriptsOf as A, SHARED_ACTIONS as An, parseJsonc as Ar, packNoBuildinfo as At, TEMPLATE_CALLED as B, SUMMARY_GATES as Bn, parseRuleConfig as Br, privatePatterns as Bt, setVersions as C, npmNames as Cn, codePackages as Cr, pagesAfterRelease as Ct, trustPolicy as D, serviceRunMain as Dn, lineOf as Dr, pagesSite as Dt, TRAIN_SCOPES as E, runCalls as En, keyLine as Er, pagesCalls as Et, sourceMain as F, setupCue as Fn, runGitShow as Fr, PRIVATE_PATTERNS_VARIABLE as Ft, runnerPeak as G, SECURITY_SCAN_COMMIT as Gn, isAllowedHit as Gt, calledJobs as H, hasSummaryJob as Hn, PRIVATE_NAME_LIST as Ht, HOME_TIMEOUT_MS as I, SECURITY_FILE as In, showFiles as Ir, invalidPatternBreaks as It, evaluateExpression as J, securityCallers as Jn, lineNameHits as Jt, runsAtOnce as K, SECURITY_SCAN_INPUTS as Kn, isCommonUse as Kt, blockHash as L, isSecurityGate as Ln, specifiersOf as Lr, noLocalPaths as Lt, testsRequired as M, SHARED_WORKFLOWS as Mn, replaceLine as Mr, HOME_PATTERNS as Mt, isSourcePath as N, callsSharedCi as Nn, repositoryOfRemote as Nr, PRIVATE_NAMES_FILE_CONFIG as Nt, typedScripts as O, hasTests as On, matchesAny as Or, exportsRequire as Ot, pathsOf as P, sharedCi as Pn, runGit as Pr, PRIVATE_NAMES_FILE_VARIABLE as Pt, roadmapParses as Q, scheduleMinute as Qn, pathNameHit as Qt, githubFetch as R, securityGate as Rn, defaultOptions as Rr, privateNamesFile as Rt, namedVersions as S, npmDrift as Sn, cleanPath as Sr, siteCheckInCi as St, IGNORE_AFTER as T, SERVICE_PACKAGE as Tn, inFolder as Tr, PAGES_WORKFLOWS as Tt, eventClass as U, startsOnPullRequest as Un, PrivateNameListError as Ut, UNKNOWN_MATRIX_JOBS as V, addSummaryJob as Vn, privateTextBreaks as Vt, matrixPeak as W, summaryJobRule as Wn, firstNameMatch as Wt, mayRun as X, withOneJob as Xn, nameMatches as Xt, groupParts as Y, securityOneJob as Yn, mergePrivateNames as Yt, roadmapOfLine as Z, runnerBudget as Zn, parsePrivateNames as Zt, runPrePushArgs as _, MAP_RULE as _n, yamlFaults as _r, swallowsTests as _t, listRules as a, homeModule as an, ACTIONS_COMMIT as ar, reachOf as at, GITHUB_YAML as b, mapText as bn, DEPENDENCY_FIELDS as br, isPinned as bt, runCli as c, modulesOf as cn, prPathFilters as cr, UNSHIPPED_FILES as ct, HOOK_MARKER as d, messageOf as dn, summaryName as dr, unreleasedChangeRule as dt, REAL_COMPARE as en, authorOf as er, releaseFiles as et, NO_READ_LINE as f, repoOf as fn, gateAfterCancel as fr, playwrightInstall as ft, prePush as g, HOMES as gn, readWorkflow as gr, startsTests as gt, parsePrePushArgs as h, HOME_EXPORTS as hn, readAction as hr, parseAdvisory as ht, formatResult as i, apiReportScript as in, repositoryIsPublic as ir, publishedMinorRule as it, typedFiles as j, SHARED_CI as jn, readJsonc as jr, DEFAULT_ALLOWED as jt, configsOfScript as k, tsconfigTest as kn, parseCatFileBatch as kr, publishTextSafe as kt, runFix as l, declaredName as ln, skippableJobs as lr, npmLookup as lt, installHook as m, signaturesOf as mn, parseWorkflow as mr, jobFails as mt, annotations as n, mainCheck as nn, licenseFileOf as nr, minorOf as nt, readConfig as o, moduleMessage as on, convertGate as or, NPM_REGISTRY as ot, PRE_PUSH_HOOK as p, reposOf as pn, MATRIX_EXPAND_MAX as pr, hiddenFailures as pt, workflowPeaks as q, SECURITY_TIMEOUT_MINUTES as qn, lineNameHit as qt, createContext as r, coverageProvider as rn, mitText as rr, publishedMinor as rt, runChecks as s, moduleUses as sn, gateTrigger as sr, SHIPPED_FIELDS as st, USAGE as t, hasImportMetaMain as tn, licenseFile as tr, lockedVersions as tt, summaryMarkdown as u, homePackage as un, summaryJob as ur, unreleasedChange as ut, RULES as v, findHomes as vn, STRICT_OPTIONS as vr, pipeFails as vt, versionTitle as w, readOverlay as wn, hasFile as wr, pushMainOnly as wt, workflowParses as x, mergeHomes as xn, RULE_WARN_DAYS as xr, pinnedGitDeps as xt, workspaceProtocol as y, mapMarkdown as yn, cuePreset as yr, isGitSpecifier as yt, sharedDocsRule as z, securityWorkflow as zn, parseConfig as zr, privateNamesFiles as zt };
25390
+ export { requiredScripts as $, securityCallers as $n, NOT_SOURCE as $t, scriptsOf as A, SERVICE_PACKAGE as An, inFolder as Ar, packNoBuildinfo as At, TEMPLATE_CALLED as B, setupCue as Bn, runGitShow as Br, privatePatterns as Bt, setVersions as C, findHomes as Cn, STRICT_OPTIONS as Cr, pagesAfterRelease as Ct, trustPolicy as D, npmDrift as Dn, cleanPath as Dr, pagesSite as Dt, TRAIN_SCOPES as E, mergeHomes as En, RULE_WARN_DAYS as Er, pagesCalls as Et, sourceMain as F, SHARED_ACTIONS as Fn, parseJsonc as Fr, PRIVATE_PATTERNS_VARIABLE as Ft, runnerPeak as G, SUMMARY_GATES as Gn, parseRuleConfig as Gr, isAllowedHit as Gt, calledJobs as H, isSecurityGate as Hn, specifiersOf as Hr, PRIVATE_NAME_LIST as Ht, HOME_TIMEOUT_MS as I, SHARED_CI as In, readJsonc as Ir, invalidPatternBreaks as It, evaluateExpression as J, startsOnPullRequest as Jn, lineNameHits as Jt, runsAtOnce as K, addSummaryJob as Kn, isCommonUse as Kt, blockHash as L, SHARED_WORKFLOWS as Ln, replaceLine as Lr, noLocalPaths as Lt, testsRequired as M, serviceRunMain as Mn, lineOf as Mr, HOME_PATTERNS as Mt, isSourcePath as N, hasTests as Nn, matchesAny as Nr, PRIVATE_NAMES_FILE_CONFIG as Nt, typedScripts as O, npmNames as On, codePackages as Or, exportsRequire as Ot, pathsOf as P, tsconfigTest as Pn, parseCatFileBatch as Pr, PRIVATE_NAMES_FILE_VARIABLE as Pt, roadmapParses as Q, SECURITY_TIMEOUT_MINUTES as Qn, pathNameHit as Qt, githubFetch as R, callsSharedCi as Rn, repositoryOfRemote as Rr, privateNamesFile as Rt, namedVersions as S, MAP_RULE as Sn, yamlFaults as Sr, siteCheckInCi as St, IGNORE_AFTER as T, mapText as Tn, DEPENDENCY_FIELDS as Tr, PAGES_WORKFLOWS as Tt, eventClass as U, securityGate as Un, defaultOptions as Ur, PrivateNameListError as Ut, UNKNOWN_MATRIX_JOBS as V, SECURITY_FILE as Vn, showFiles as Vr, privateTextBreaks as Vt, matrixPeak as W, securityWorkflow as Wn, parseConfig as Wr, firstNameMatch as Wt, mayRun as X, SECURITY_SCAN_COMMIT as Xn, nameMatches as Xt, groupParts as Y, summaryJobRule as Yn, mergePrivateNames as Yt, roadmapOfLine as Z, SECURITY_SCAN_INPUTS as Zn, parsePrivateNames as Zt, runPrePushArgs as _, repoOf as _n, gateAfterCancel as _r, swallowsTests as _t, listRules as a, REAL_COMPARE as an, authorOf as ar, reachOf as at, GITHUB_YAML as b, HOME_EXPORTS as bn, readAction as br, isPinned as bt, runCli as c, coverageProvider as cn, mitText as cr, UNSHIPPED_FILES as ct, HOOK_MARKER as d, moduleMessage as dn, convertGate as dr, unreleasedChangeRule as dt, consoleBreaks as en, securityOneJob as er, releaseFiles as et, NO_READ_LINE as f, moduleUses as fn, gateTrigger as fr, playwrightInstall as ft, prePush as g, messageOf$1 as gn, summaryName as gr, startsTests as gt, parsePrePushArgs as h, homePackage as hn, summaryJob as hr, parseAdvisory as ht, formatResult as i, noBuildOutput as in, LICENSE_TEXTS as ir, publishedMinorRule as it, typedFiles as j, runCalls as jn, keyLine as jr, DEFAULT_ALLOWED as jt, configsOfScript as k, readOverlay as kn, hasFile as kr, publishTextSafe as kt, runFix as l, apiReportScript as ln, repositoryIsPublic as lr, npmLookup as lt, installHook as m, declaredName as mn, skippableJobs as mr, jobFails as mt, annotations as n, isCliFile as nn, runnerBudget as nr, minorOf as nt, readConfig as o, hasImportMetaMain as on, licenseFile as or, NPM_REGISTRY as ot, PRE_PUSH_HOOK as p, modulesOf as pn, prPathFilters as pr, hiddenFailures as pt, workflowPeaks as q, hasSummaryJob as qn, lineNameHit as qt, createContext as r, noConsole as rn, scheduleMinute as rr, publishedMinor as rt, runChecks as s, mainCheck as sn, licenseFileOf as sr, SHIPPED_FIELDS as st, USAGE as t, consoleKind as tn, withOneJob as tr, lockedVersions as tt, summaryMarkdown as u, homeModule as un, ACTIONS_COMMIT as ur, unreleasedChange as ut, RULES as v, reposOf as vn, MATRIX_EXPAND_MAX as vr, pipeFails as vt, versionTitle as w, mapMarkdown as wn, cuePreset as wr, pushMainOnly as wt, workflowParses as x, HOMES as xn, readWorkflow as xr, pinnedGitDeps as xt, workspaceProtocol as y, signaturesOf as yn, parseWorkflow as yr, isGitSpecifier as yt, sharedDocsRule as z, sharedCi as zn, runGit as zr, privateNamesFiles as zt };
25259
25391
 
25260
- //# sourceMappingURL=run-DfHH0aZb.js.map
25392
+ //# sourceMappingURL=run-Bh2ogCYi.js.map