@mark1russell7/conventions 0.8.2 → 0.10.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
@@ -25,6 +25,8 @@ Each break shows the file, the line, the rule and the fix. In GitHub Actions, th
25
25
  - `runner-budget`: the minute of a schedule, a `max-parallel` of a matrix, and a concurrency group at the top of a workflow. A new run of a pull request stops the old run. A run of another event waits for the old run.
26
26
  - `tests-required`: the option `passWithNoTests` in a config or a script, in a package with test files. A package with no tests needs a person, who removes its test script.
27
27
  - `typed-files`: a config file at the root of a package (`vitest.config.ts`). The fix adds `*.config.ts` and `rootDir: "."` to the `tsconfig.test.json` of the package, when that file has no comments.
28
+ - `trust-policy`: the settings `trustPolicy`, `trustPolicyIgnoreAfter` and `trustPolicyExclude` of `pnpm-workspace.yaml`. The fix makes the file when the repository has none.
29
+ - `main-check`: a compare of `process.argv[1]` with the path of the script. The fix writes `import.meta.main` when each Node version of `engines.node` has it (`^22.18`, `>=24.2`). Else it writes a compare of the two real paths, and it adds the imports. It removes the imports that only the old compare used.
28
30
 
29
31
  The text output marks each break that has a fix. In the JSON output, such a break has `fixable: true`. The release train starts `conventions fix` in its update pull requests. Thus a break that a script can fix does not block a repository.
30
32
 
@@ -36,6 +38,7 @@ The rules come from the invariants audit of 2026-10-26 (strategy item s38). The
36
38
  |---|---|---|
37
39
  | `pinned-git-deps` | A dependency from git (`github:`, `git+https:`, `owner/repo`) names a full commit SHA. The rule also examines `overrides`, `resolutions` and `pnpm.overrides`. | coeval `pinned-deps`, `unpublished-dep-pinned`. headroom `non-npm-deps-pinned`, `pinned-github-specifier`. Graph `github-dep-full-sha`, `github-dep-pinned`. client `general-npm-version`. |
38
40
  | `workspace-protocol` | A dependency on a package of the workspace uses `workspace:`. The rule does not examine peer dependencies. | client `workspace-protocol`, `workspace-deps`. coeval `pinned-deps`. headroom `non-npm-deps-pinned`. crawler `mcp-workspace-dep`. |
41
+ | `trust-policy` | A repository with a `pnpm-lock.yaml` sets `trustPolicy: no-downgrade` in `pnpm-workspace.yaml`: pnpm refuses a version with less trust evidence than an earlier version, for example one with no provenance after versions from a trusted publisher. `trustPolicyIgnoreAfter` is 10080 or more, so the check examines the versions of the last 7 days. A stolen-token version is new, and older versions can have less evidence for other reasons. `trustPolicyExclude` has the scopes of the release train, which checks the provenance of their versions itself. | fleet `trust-policy` (STRATEGY.md, 2026-11-01). |
39
42
  | `source-main` | The `main` of each workspace package is `src/index.ts` (a package with only a `bin` has no `main`, and a private package with no entry is an app). A public package that has a source entry has the same field in `publishConfig`, and that field points at the build. | coeval `package-main-source`, `source-package-main`. crawler `pkg-source-main`, `source-package-main`, `publish-config-build`. Graph `new-package-main-index`, `source-package-main`. headroom `source-package-main`. |
40
43
  | `tsconfig-test` | Each package with a `tsconfig.json` has a `tsconfig.test.json`, and its `typecheck` script names it. | coeval, crawler, Vex `package-tsconfig-test` or `pkg-tsconfig-test`, and `tsconfig-test`. headroom `tsconfig-test`, `tsconfig-test-per-package`. |
41
44
  | `cue-preset` | The `tsconfig.json` of each package extends a preset of `@mark1russell7/cue`. No config of a package turns off a strict option that its preset turns on. | client `cue-config`, `no-manual-tsconfig`. Graph `cue-preset-strict`, `strict-preset`, `new-package-via-cli`. coeval, crawler, headroom, Vex `package-scaffold`. |
@@ -45,6 +48,7 @@ The rules come from the invariants audit of 2026-10-26 (strategy item s38). The
45
48
  | `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`. |
46
49
  | `typed-scripts` | Git keeps no JavaScript source (`.js`, `.mjs`, `.cjs`, `.jsx`, or a file with a `#!` line of `node`) and no shell script (`.sh`, `.bash`, `.zsh`, `.ps1`, or a `#!` line of a shell) of more than one line of code. Each script is TypeScript, which Node 22.18 and later starts directly. A file that must stay (generated output, vendored code, a configuration that a tool reads only as JavaScript) goes in `ignore` with its reason, so the list of exceptions can only get shorter. | fleet `typed-everything` (STRATEGY.md, direction 15). |
47
50
  | `typed-files` | Each TypeScript file that git keeps (`.ts`, `.tsx`, `.mts`, `.cts`, not `.d.ts`) is in the program of a tsconfig that a `typecheck` script names: the tests, the e2e specs, the scripts, the benches and the configs too. The rule reads the configs of each `tsc`, `tsgo` or `vue-tsc` (`-p`, `--project`, `-b`, or `tsconfig.json`) and of `svelte-check --tsconfig`, follows their `references`, and lists the files with `tsc --listFilesOnly`. A file that a covered file imports is covered. A config that does not exist, and a repository where no typecheck names a config, are a break. | fleet `fail-closed` (STRATEGY.md, 2026-10-30). |
51
+ | `main-check` | No script finds out that it is the main module by a compare of `process.argv[1]` with its own path. Through a link (for example `~/git` to `D:/git`), the two paths differ: the script does nothing, and it ends with exit code 0. A script uses `import.meta.main`, or `realpathSync` on each side. | fleet `main-check` (STRATEGY.md, 2026-11-02). |
48
52
  | `tests-required` | No test runner passes when it finds no test: no `passWithNoTests: true` in a config of vitest, vite, jest or Playwright, and no `--passWithNoTests` in `package.json`. With the option, a broken include pattern turns the test gate green with no test run. | fleet `fail-closed` (STRATEGY.md, 2026-10-30). |
49
53
  | `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). |
50
54
  | `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). |
@@ -98,6 +102,8 @@ An unknown rule, an unknown option, or an exception or a changed option without
98
102
  | `typed-scripts.shellLines` | `1` | The most lines of code of a shell script (a launcher). Empty lines and comments do not count. |
99
103
  | `typed-files.configs` | `[]` | More tsconfig files, relative to the root, that CI examines with another command (for example a script that the typecheck starts). |
100
104
  | `roadmap-parses.roadmaps` | `[]` | More roadmap files, relative to the root, for a roadmap that no workflow names. |
105
+ | `trust-policy.exclude` | `["@mark1russell7/*", "@procedures/*"]` | The patterns that `trustPolicyExclude` must have. |
106
+ | `trust-policy.ignoreAfter` | `10080` | The smallest `trustPolicyIgnoreAfter`, in minutes. |
101
107
  | `runner-budget.maxParallel` | `3` | The largest `max-parallel` of a matrix. |
102
108
  | `runner-budget.minute` | `true` | When `false`, the rule does not examine the minute of the schedules. |
103
109
  | `runner-budget.grouped` | `["reusable-ai-review.yml", "reusable-codex-review.yml"]` | The shared workflows that give a concurrency group in each of their jobs. |
package/build/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { c as runCli } from "./run-DD72yQn7.js";
2
+ import { c as runCli } from "./run-DvvaHCjC.js";
3
3
  // src/cli.ts
4
4
  try {
5
5
  process.exitCode = runCli(process.argv.slice(2), {
package/build/index.d.ts CHANGED
@@ -23,7 +23,7 @@ interface Break {
23
23
  interface Edit {
24
24
  /** The file, relative to the root, with `/`. */
25
25
  readonly file: string;
26
- /** The whole text of the file before the change. */
26
+ /** The whole text of the file before the change. An empty text makes a file that does not exist. */
27
27
  readonly before: string;
28
28
  /** The whole text of the file after the change. */
29
29
  readonly after: string;
@@ -152,6 +152,11 @@ export declare function parseConfig(value: unknown, rules: readonly Rule[]): Con
152
152
  /** The compiler options that make the type check strict. A package does not turn them off. */
153
153
  export declare const STRICT_OPTIONS: readonly ["strict", "noImplicitAny", "strictNullChecks", "strictFunctionTypes", "strictBindCallApply", "strictPropertyInitialization", "strictBuiltinIteratorReturn", "noImplicitThis", "useUnknownInCatchVariables", "alwaysStrict", "noUncheckedIndexedAccess", "exactOptionalPropertyTypes", "noImplicitOverride", "noImplicitReturns", "noFallthroughCasesInSwitch", "noPropertyAccessFromIndexSignature"];
154
154
  export declare const cuePreset: Rule;
155
+ /** The compare of two real paths. It is true through a link too, and it works on each Node version. */
156
+ export declare const REAL_COMPARE = "process.argv[1] !== undefined && realpathSync(process.argv[1]) === realpathSync(fileURLToPath(import.meta.url))";
157
+ /** This function tells if each Node version of the range has `import.meta.main`: 22.18 and later in 22, and 24.2 and later. Node 23 does not have it. */
158
+ export declare function hasImportMetaMain(range: unknown): boolean;
159
+ export declare const mainCheck: Rule;
155
160
  export declare const noBuildOutput: Rule;
156
161
  /** The names in a home path that do not identify a person: CI users, container users and placeholders. */
157
162
  export declare const DEFAULT_ALLOWED: readonly string[];
@@ -198,6 +203,11 @@ export declare function configsOfScript(script: string): string[];
198
203
  export declare function scriptsOf(scripts: Readonly<Record<string, unknown>>, name: string, seen?: Set<string>): string[];
199
204
  export declare const typedFiles: Rule;
200
205
  export declare const typedScripts: Rule;
206
+ /** The scopes that the release train updates. The train checks the provenance of their versions itself. */
207
+ export declare const TRAIN_SCOPES: readonly ["@mark1russell7/*", "@procedures/*"];
208
+ /** 7 days, in minutes. */
209
+ export declare const IGNORE_AFTER = 10080;
210
+ export declare const trustPolicy: Rule;
201
211
  export declare const workspaceProtocol: Rule;
202
212
  /** Each rule of the check. */
203
213
  export declare const RULES: readonly Rule[];
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../src/rule.ts","../src/config.ts","../src/rules/cue-preset.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/workspace-protocol.ts","../src/rules/index.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;;WAEA,SAAS;;;UAIH;;WAEN;;WAEA,OAAO,SAAS,eAAe;;;wBAW1B,eAAe,MAAM,OAAO;;;;;;;wBAU5B,YAAY,gBAAgB,gBAAgB,SAAS;;qBCnCxD;qBA2FA,WAAW;qBC/FX,eAAe;;qBCYf;;qBAGA,wBAAwB;qBAOxB,cAAc;;wBCnBX,eAAe;;;;;wBAaf,SAAS,cAAc;qBAqB1B,eAAe;qBCEf,cAAc;qBCrBd,iBAAiB;;wBCqCd,cAAc;qBAajB,eAAe;;;;;;wBCnBZ,eAAe,oBAAoB;;wBAUnC,mBAAmB;qBAsJtB,cAAc;;wBC7MX,QAAQ;;wBAQR,aAAa;qBAKhB,YAAY;qBCkBZ,eAAe;;wBCpBZ,SAAS,0BAA0B;qBAKtC,cAAc;;wBCiCX,gBAAgB;;;;;wBA4BhB,UAAU,SAAS,SAAS,0BAA0B,cAAc,OAAM;qBAgG7E,YAAY;qBCjJZ,cAAc;qBC9Bd,mBAAmB;;qBCYnB,gBAAgB;;UCRZ;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;;UAoCjC;;WAEN;;WAEA;;WAEA,QAAQ;;;;;;;wBAWH,OAAO,SAAS,eAAe;;wBAuC/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;;wBA0BG,OAAO,yBAAyB,IAAI;;;;;;wBC5QpC,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/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/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;;WAEA,SAAS;;;UAIH;;WAEN;;WAEA,OAAO,SAAS,eAAe;;;wBAW1B,eAAe,MAAM,OAAO;;;;;;;wBAU5B,YAAY,gBAAgB,gBAAgB,SAAS;;qBCnCxD;qBA2FA,WAAW;;qBCrFX;;wBA2BG,kBAAkB;qBAiFrB,WAAW;qBCtHX,eAAe;;qBCYf;;qBAGA,wBAAwB;qBAOxB,cAAc;;wBCnBX,eAAe;;;;;wBAaf,SAAS,cAAc;qBAqB1B,eAAe;qBCEf,cAAc;qBCrBd,iBAAiB;;wBCqCd,cAAc;qBAajB,eAAe;;;;;;wBCnBZ,eAAe,oBAAoB;;wBAUnC,mBAAmB;qBAsJtB,cAAc;;wBC7MX,QAAQ;;wBAQR,aAAa;qBAKhB,YAAY;qBCkBZ,eAAe;;wBCpBZ,SAAS,0BAA0B;qBAKtC,cAAc;;wBCiCX,gBAAgB;;;;;wBA4BhB,UAAU,SAAS,SAAS,0BAA0B,cAAc,OAAM;qBAgG7E,YAAY;qBCjJZ,cAAc;;qBC3Bd;;qBAGA;qBA6DA,aAAa;qBCnEb,mBAAmB;;qBCcnB,gBAAgB;;UCVZ;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;;UAoCjC;;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;;wBA0BG,OAAO,yBAAyB,IAAI;;;;;;wBC9QpC,aAAa,eAAe;;;;;wBAsD5B,YAAY,cAAc;;;;;;wBA8B1B,eAAe;;;;;;;wBAwCf,eAAe,cAAc"}
package/build/index.js CHANGED
@@ -1 +1 @@
1
- export { N as DEFAULT_ALLOWED, z as DEPENDENCY_FIELDS, P as HOME_PATTERNS, d as RULES, L as STRICT_OPTIONS, t as USAGE, n as annotations, B as cleanPath, V as codePackages, m as configsOfScript, r as createContext, R as cuePreset, nt as defaultOptions, i as formatResult, Q as globFolders, $ as globToRegExp, H as hasFile, v as hasTests, U as inFolder, A as isGitSpecifier, j as isPinned, b as isSourcePath, W as keyLine, G as lineOf, a as listRules, K as matchesAny, I as noBuildOutput, F as noLocalPaths, et as packageFolders, rt as parseConfig, q as parseJsonc, x as pathsOf, M as pinnedGitDeps, o as readConfig, J as readJsonc, k as releaseFiles, Y as replaceLine, C as repositoryOfRemote, O as requiredScripts, E as roadmapOfLine, D as roadmapParses, s as runChecks, c as runCli, l as runFix, X as runGit, w as runnerBudget, T as scheduleMinute, h as scriptsOf, S as sourceMain, Z as specifiersOf, u as summaryMarkdown, _ as testsRequired, y as tsconfigTest, g as typedFiles, p as typedScripts, tt as workspaceGlobs, f as workspaceProtocol } from "./run-DD72yQn7.js";
1
+ export { I as DEFAULT_ALLOWED, G as DEPENDENCY_FIELDS, L as HOME_PATTERNS, p as IGNORE_AFTER, B as REAL_COMPARE, d as RULES, U as STRICT_OPTIONS, m as TRAIN_SCOPES, t as USAGE, n as annotations, K as cleanPath, q as codePackages, _ as configsOfScript, r as createContext, W as cuePreset, ct as defaultOptions, i as formatResult, it as globFolders, at as globToRegExp, J as hasFile, V as hasImportMetaMain, x as hasTests, Y as inFolder, N as isGitSpecifier, P as isPinned, C as isSourcePath, X as keyLine, Z as lineOf, a as listRules, H as mainCheck, Q as matchesAny, z as noBuildOutput, R as noLocalPaths, ot as packageFolders, lt as parseConfig, $ as parseJsonc, w as pathsOf, F as pinnedGitDeps, o as readConfig, et as readJsonc, M as releaseFiles, tt as replaceLine, E as repositoryOfRemote, j as requiredScripts, k as roadmapOfLine, A as roadmapParses, s as runChecks, c as runCli, l as runFix, nt as runGit, D as runnerBudget, O as scheduleMinute, v as scriptsOf, T as sourceMain, rt as specifiersOf, u as summaryMarkdown, b as testsRequired, h as trustPolicy, S as tsconfigTest, y as typedFiles, g as typedScripts, st as workspaceGlobs, f as workspaceProtocol } from "./run-DvvaHCjC.js";
@@ -1,6 +1,6 @@
1
1
  import { createRequire } from "node:module";
2
2
  import { spawnSync } from "node:child_process";
3
- import { appendFileSync, existsSync, readFileSync, readdirSync, statSync, writeFileSync } from "node:fs";
3
+ import { appendFileSync, existsSync, mkdirSync, readFileSync, readdirSync, statSync, writeFileSync } from "node:fs";
4
4
  import { basename, dirname, extname, join, posix, relative, resolve, sep } from "node:path";
5
5
  // src/config.ts
6
6
  /** The fields of the configuration of a rule that are not options. */
@@ -503,6 +503,186 @@ const cuePreset = {
503
503
  return breaks;
504
504
  }
505
505
  };
506
+ // src/rules/main-check.ts
507
+ /**
508
+ * The rule `main-check`: a script does not find out that it is the main module by a compare of `process.argv[1]` with
509
+ * its own path. Through a link (a junction, a symbolic link, `~/git` to `D:/git`), the two paths differ. Then the
510
+ * script does nothing, and it ends with exit code 0.
511
+ */
512
+ /** The extensions of the files that the rule reads. */
513
+ const SCRIPT = /* @__PURE__ */ new Set([
514
+ ".ts",
515
+ ".mts",
516
+ ".cts",
517
+ ".js",
518
+ ".mjs"
519
+ ]);
520
+ /** The largest file that the rule reads, in bytes. */
521
+ const MAX_BYTES$1 = 1048576;
522
+ /** The compare of two real paths. It is true through a link too, and it works on each Node version. */
523
+ const REAL_COMPARE = "process.argv[1] !== undefined && realpathSync(process.argv[1]) === realpathSync(fileURLToPath(import.meta.url))";
524
+ /** The imports that the compare of two real paths uses. */
525
+ const REAL_IMPORTS = [["realpathSync", "node:fs"], ["fileURLToPath", "node:url"]];
526
+ /** The names of the imports that only a path compare uses. The fix removes the ones that become unused. */
527
+ const PATH_NAMES = [
528
+ "fileURLToPath",
529
+ "pathToFileURL",
530
+ "resolve",
531
+ "realpathSync"
532
+ ];
533
+ /** This function tells if a text compares `process.argv[1]` with the path of the module, without a real path of each side. */
534
+ function isPathCompare(text) {
535
+ if (!text.includes("process.argv[1]") || !/import\.meta\.(url|filename|dirname)\b/.test(text)) return false;
536
+ return (text.match(/realpathSync\s*\(/g) ?? []).length < 2;
537
+ }
538
+ /** The lowest version of a range of `engines.node` (for example `>=22.19` or `^24.2.0`). It is undefined when the range has no single lower bound. */
539
+ function lowestNode(range) {
540
+ if (typeof range !== "string" || range.includes("||")) return void 0;
541
+ const found = /^(?:>=|\^|~)?\s*v?(\d+)(?:\.(\d+))?/.exec(range.trim());
542
+ return found ? [Number(found[1]), Number(found[2] ?? 0)] : void 0;
543
+ }
544
+ /** This function tells if each Node version of the range has `import.meta.main`: 22.18 and later in 22, and 24.2 and later. Node 23 does not have it. */
545
+ function hasImportMetaMain(range) {
546
+ const lowest = lowestNode(range);
547
+ if (lowest === void 0) return false;
548
+ const [major, minor] = lowest;
549
+ if (major === 22) return minor >= 18 && typeof range === "string" && /^[\^~]/.test(range.trim());
550
+ return major > 24 || major === 24 && minor >= 2;
551
+ }
552
+ /** This function gives the line with `condition` in place of the condition of its `if (...)`. It gives undefined when no `if` has only the main check. */
553
+ function fixLine(line, condition) {
554
+ const start = line.indexOf("if (");
555
+ if (start < 0) return void 0;
556
+ let depth = 0;
557
+ let end = -1;
558
+ for (let index = start + 3; index < line.length; index++) {
559
+ if (line[index] === "(") depth++;
560
+ if (line[index] === ")" && --depth === 0) {
561
+ end = index;
562
+ break;
563
+ }
564
+ }
565
+ if (end < 0) return void 0;
566
+ const old = line.slice(start + 4, end);
567
+ if (!old.split("&&").every((part) => part.includes("process.argv[1]")) || !isPathCompare(old)) return void 0;
568
+ return `${line.slice(0, start)}if (${condition})${line.slice(end + 1)}`;
569
+ }
570
+ /** The import line of `module` with named imports, as `[index, prefix, names, suffix]`. */
571
+ function namedImport(lines, module) {
572
+ const pattern = new RegExp(`^(\\s*import\\s*\\{)([^}]*)(\\}\\s*from\\s*["']${module}["'];?\\s*)$`);
573
+ for (let index = 0; index < lines.length; index++) {
574
+ const found = pattern.exec(lines[index] ?? "");
575
+ if (found) return [
576
+ index,
577
+ found[1] ?? "",
578
+ (found[2] ?? "").split(",").map((part) => part.trim()).filter((part) => part !== ""),
579
+ found[3] ?? ""
580
+ ];
581
+ }
582
+ }
583
+ const importLine = (prefix, names, suffix) => `${prefix.trimEnd()} ${names.join(", ")} ${suffix.trimStart()}`;
584
+ /** The local name of an import part, for example `type A`, `A as B` or `A`. */
585
+ const imported = (part) => part.replace(/^type\s+/, "").split(/\s+as\s+/)[0] ?? "";
586
+ /** This function adds the imports in `needs` that the text does not have. Then it removes the named imports of PATH_NAMES that the text does not use. */
587
+ function fixImports(text, needs) {
588
+ const eol = text.includes("\r\n") ? "\r\n" : "\n";
589
+ let lines = text.split(/\r?\n/);
590
+ const isImport = (line) => /^\s*import\b/.test(line);
591
+ for (const [name, module] of needs) {
592
+ if (lines.some((line) => isImport(line) && new RegExp(`\\b${name}\\b`).test(line))) continue;
593
+ const found = namedImport(lines, module) ?? namedImport(lines, module.replace(/^node:/, ""));
594
+ if (found) {
595
+ lines = lines.map((line, index) => index === found[0] ? importLine(found[1], [...found[2], name], found[3]) : line);
596
+ continue;
597
+ }
598
+ let last = -1;
599
+ lines.forEach((line, index) => {
600
+ if (isImport(line) && /from\s*["'][^"']+["'];?\s*$/.test(line)) last = index;
601
+ });
602
+ const at = last >= 0 ? last + 1 : lines[0]?.startsWith("#!") ? 1 : 0;
603
+ const style = lines.find((line) => isImport(line) && /from\s*["']/.test(line)) ?? "";
604
+ const quote = /from\s*'/.test(style) ? "'" : "\"";
605
+ const semi = style === "" || /;\s*$/.test(style) ? ";" : "";
606
+ lines = [
607
+ ...lines.slice(0, at),
608
+ `import { ${name} } from ${quote}${module}${quote}${semi}`,
609
+ ...lines.slice(at)
610
+ ];
611
+ }
612
+ for (const name of PATH_NAMES) {
613
+ if (lines.some((line) => !isImport(line) && new RegExp(`\\b${name}\\b`).test(line))) continue;
614
+ for (const module of [
615
+ "node:url",
616
+ "node:path",
617
+ "node:fs",
618
+ "url",
619
+ "path",
620
+ "fs"
621
+ ]) {
622
+ const found = namedImport(lines, module);
623
+ if (!found || !found[2].some((part) => imported(part) === name)) continue;
624
+ const kept = found[2].filter((part) => imported(part) !== name);
625
+ lines = kept.length === 0 ? lines.filter((_, index) => index !== found[0]) : lines.map((line, index) => index === found[0] ? importLine(found[1], kept, found[3]) : line);
626
+ }
627
+ }
628
+ return lines.join(eol);
629
+ }
630
+ const mainCheck = {
631
+ id: "main-check",
632
+ title: "A script finds out that it is the main module with `import.meta.main`, or with a real path of each side, not by a compare of `process.argv[1]` with its path.",
633
+ reason: "Through a link, `process.argv[1]` has the path of the link, and the module has the real path. The compare is false, so the script does nothing and ends with exit code 0: a check that looks done but did not start.",
634
+ fix: "Write `if (import.meta.main)` when `engines.node` allows only versions that have it (`^22.18`, `>=24.2`). Else compare `realpathSync(process.argv[1])` with `realpathSync(fileURLToPath(import.meta.url))`. `conventions fix` writes the one that fits.",
635
+ sources: [{
636
+ repo: "fleet",
637
+ rule: "main-check",
638
+ doc: "docs/STRATEGY.md (2026-11-02, the main check through a link)"
639
+ }],
640
+ options: {},
641
+ check(context) {
642
+ const files = context.gitFiles();
643
+ if (files === void 0) return { skipped: "the root is not in a git repository" };
644
+ const packages = [...codePackages(context), context.rootPackage].sort((a, b) => b.folder.length - a.folder.length);
645
+ const breaks = [];
646
+ for (const file of files) {
647
+ if (!SCRIPT.has(extname(file).toLowerCase()) || /(^|\/)(node_modules|dist)\//.test(file)) continue;
648
+ const path = join(context.root, file);
649
+ let text;
650
+ try {
651
+ if (statSync(path).size > MAX_BYTES$1) continue;
652
+ text = readFileSync(path, "utf8");
653
+ } catch {
654
+ continue;
655
+ }
656
+ if (!text.includes("process.argv[1]")) continue;
657
+ const engines = (packages.find((p) => p.folder === "" || file.startsWith(`${p.folder}/`))?.manifest)?.engines?.node;
658
+ const main = hasImportMetaMain(engines);
659
+ const lines = text.split(/\r?\n/);
660
+ for (let index = 0; index < lines.length; index++) {
661
+ const line = lines[index] ?? "";
662
+ const next = lines[index + 1] ?? "";
663
+ if (!(isPathCompare(line) || line.includes("process.argv[1]") && !/import\.meta/.test(line) && !isPathCompare(next) && isPathCompare(`${line} ${next}`))) continue;
664
+ const fixed = fixLine(line, main ? "import.meta.main" : REAL_COMPARE);
665
+ const eol = text.includes("\r\n") ? "\r\n" : "\n";
666
+ const after = fixed === void 0 ? void 0 : fixImports([
667
+ ...lines.slice(0, index),
668
+ fixed,
669
+ ...lines.slice(index + 1)
670
+ ].join(eol), main ? [] : REAL_IMPORTS);
671
+ breaks.push({
672
+ file,
673
+ line: index + 1,
674
+ message: "The script compares process.argv[1] with its own path, which is false through a link.",
675
+ ...after === void 0 ? { fix: "Change the condition by hand: it has more than the main check, or it is on more than one line." } : { edits: [{
676
+ file,
677
+ before: text,
678
+ after
679
+ }] }
680
+ });
681
+ }
682
+ }
683
+ return breaks;
684
+ }
685
+ };
506
686
  // src/rules/no-build-output.ts
507
687
  /**
508
688
  * The rule `no-build-output`: git does not keep build output.
@@ -1757,7 +1937,7 @@ const roadmapParses = {
1757
1937
  const WORKFLOW = /^\.github\/workflows\/[^/]+\.ya?ml$/;
1758
1938
  const indentOf = (line) => line.length - line.trimStart().length;
1759
1939
  /** This function removes a comment at the end of a value, and the quotes around it. */
1760
- function valueOf(raw) {
1940
+ function valueOf$1(raw) {
1761
1941
  const comment = raw.indexOf(" #");
1762
1942
  let value = (comment >= 0 ? raw.slice(0, comment) : raw).trim();
1763
1943
  const quote = value.charAt(0);
@@ -1769,7 +1949,7 @@ function keyValue(line, key) {
1769
1949
  let text = line.trimStart();
1770
1950
  if (text.startsWith("- ")) text = text.slice(2).trimStart();
1771
1951
  if (!text.startsWith(`${key}:`)) return void 0;
1772
- return valueOf(text.slice(key.length + 1));
1952
+ return valueOf$1(text.slice(key.length + 1));
1773
1953
  }
1774
1954
  /** This function gives the lines of the block under the line `index`: the next lines with a larger indent. */
1775
1955
  function blockEnd(lines, index) {
@@ -2745,6 +2925,150 @@ const typedScripts = {
2745
2925
  return breaks;
2746
2926
  }
2747
2927
  };
2928
+ // src/rules/trust-policy.ts
2929
+ /**
2930
+ * The rule `trust-policy`: a pnpm repository sets `trustPolicy: no-downgrade` in `pnpm-workspace.yaml`. It checks each
2931
+ * version for 7 days after its publish (`trustPolicyIgnoreAfter`). It excludes the scopes of the release train.
2932
+ */
2933
+ const WORKSPACE = "pnpm-workspace.yaml";
2934
+ /** The scopes that the release train updates. The train checks the provenance of their versions itself. */
2935
+ const TRAIN_SCOPES = ["@mark1russell7/*", "@procedures/*"];
2936
+ /** 7 days, in minutes. */
2937
+ const IGNORE_AFTER = 10080;
2938
+ const POLICY_COMMENT = ["# An install fails when a new version has less trust evidence than an earlier version of the same package: for", "# example, a version with no provenance after versions from a trusted publisher. Such a version can be a stolen token."];
2939
+ const IGNORE_COMMENT = ["# The check examines the versions of the last 7 days. A stolen-token version is new, and the registry removes it in", "# hours. Older versions can have less evidence for other reasons: for example undici-types 6.21.0 under @types/node."];
2940
+ const EXCLUDE_COMMENT = ["# The release train updates our own scopes, and it checks the provenance of each version. pnpm cannot use them: it", "# ranks the first versions, which were staged by hand, above the versions from release.yml (pnpm/pnpm#16689)."];
2941
+ /** A top-level key of the file: its line index, and its value without a comment or quotes. */
2942
+ function valueOf(lines, key) {
2943
+ const index = lines.findIndex((line) => line.startsWith(`${key}:`));
2944
+ if (index < 0) return void 0;
2945
+ return {
2946
+ index,
2947
+ value: (lines[index] ?? "").slice(key.length + 1).replace(/\s+#.*$/, "").trim().replace(/^["']|["']$/g, "")
2948
+ };
2949
+ }
2950
+ /** This function gives the items of the block list under the line `start`, the index of its last item, and its indent. */
2951
+ function blockList(lines, start) {
2952
+ const items = [];
2953
+ let last = start;
2954
+ let indent = " ";
2955
+ for (let index = start + 1; index < lines.length; index++) {
2956
+ const line = lines[index] ?? "";
2957
+ const text = line.trim();
2958
+ if (text === "" || text.startsWith("#")) continue;
2959
+ if (!text.startsWith("- ") || line === line.trimStart()) break;
2960
+ indent = line.slice(0, line.length - line.trimStart().length);
2961
+ items.push(text.slice(2).replace(/\s+#.*$/, "").trim().replace(/^["']|["']$/g, ""));
2962
+ last = index;
2963
+ }
2964
+ return {
2965
+ items,
2966
+ last,
2967
+ indent
2968
+ };
2969
+ }
2970
+ /** This function gives the text with the lines `added` after the line `after` (-1: at the end), with the line ends of the text. */
2971
+ function insert(text, after, added) {
2972
+ const eol = text.includes("\r\n") ? "\r\n" : "\n";
2973
+ const lines = text.split(/\r?\n/);
2974
+ if (after >= 0) {
2975
+ lines.splice(after + 1, 0, ...added);
2976
+ return lines.join(eol);
2977
+ }
2978
+ while (lines.length > 0 && lines[lines.length - 1] === "") lines.pop();
2979
+ return [
2980
+ ...lines,
2981
+ ...lines.length > 0 ? [""] : [],
2982
+ ...added,
2983
+ ""
2984
+ ].join(eol);
2985
+ }
2986
+ /** This function gives the text with the value of the top-level key on the line `index` replaced. */
2987
+ function setValue(text, index, key, value) {
2988
+ const eol = text.includes("\r\n") ? "\r\n" : "\n";
2989
+ const lines = text.split(/\r?\n/);
2990
+ lines[index] = `${key}: ${value}`;
2991
+ return lines.join(eol);
2992
+ }
2993
+ const trustPolicy = {
2994
+ id: "trust-policy",
2995
+ title: "A pnpm repository sets `trustPolicy: no-downgrade` for the versions of the last 7 days, and excludes the scopes of the release train.",
2996
+ reason: "A stolen npm token can publish a version with no provenance, and the next install takes it. With `no-downgrade`, pnpm refuses a version with less trust evidence than an earlier version. The release age of pnpm keeps out the versions of the last day; this check covers the next days. The release train updates our own scopes at once and checks their provenance itself.",
2997
+ fix: "Add `trustPolicy: no-downgrade`, `trustPolicyIgnoreAfter: 10080` and a `trustPolicyExclude` with the scopes of the option `exclude` to `pnpm-workspace.yaml`. `conventions fix` writes them.",
2998
+ sources: [{
2999
+ repo: "fleet",
3000
+ rule: "trust-policy",
3001
+ doc: "docs/STRATEGY.md (2026-11-01, release age and trust policy)"
3002
+ }],
3003
+ options: {
3004
+ exclude: {
3005
+ type: "strings",
3006
+ default: [...TRAIN_SCOPES],
3007
+ description: "The patterns that `trustPolicyExclude` must have: the scopes whose versions the release train checks."
3008
+ },
3009
+ ignoreAfter: {
3010
+ type: "number",
3011
+ default: IGNORE_AFTER,
3012
+ description: "The smallest `trustPolicyIgnoreAfter`, in minutes. A larger value checks more versions."
3013
+ }
3014
+ },
3015
+ check(context, options) {
3016
+ if (!hasFile(context.root, "pnpm-lock.yaml")) return { skipped: "the repository has no pnpm-lock.yaml" };
3017
+ const exclude = Array.isArray(options["exclude"]) ? options["exclude"] : TRAIN_SCOPES;
3018
+ const ignoreAfter = typeof options["ignoreAfter"] === "number" ? options["ignoreAfter"] : IGNORE_AFTER;
3019
+ const exists = hasFile(context.root, WORKSPACE);
3020
+ const text = exists ? readFileSync(join(context.root, WORKSPACE), "utf8") : "";
3021
+ const lines = text.split(/\r?\n/);
3022
+ const edit = (after) => after === text ? [] : [{
3023
+ file: WORKSPACE,
3024
+ before: text,
3025
+ after
3026
+ }];
3027
+ const at = (index) => index === void 0 ? {} : { line: index + 1 };
3028
+ const breaks = [];
3029
+ const policy = valueOf(lines, "trustPolicy");
3030
+ if (policy?.value !== "no-downgrade") breaks.push({
3031
+ file: WORKSPACE,
3032
+ ...at(policy?.index),
3033
+ message: policy === void 0 ? `${exists ? WORKSPACE : "The repository"} does not set trustPolicy.` : `trustPolicy is "${policy.value}", not "no-downgrade".`,
3034
+ edits: edit(policy === void 0 ? insert(text, -1, [...POLICY_COMMENT, "trustPolicy: no-downgrade"]) : setValue(text, policy.index, "trustPolicy", "no-downgrade"))
3035
+ });
3036
+ const ignore = valueOf(lines, "trustPolicyIgnoreAfter");
3037
+ const minutes = ignore === void 0 ? void 0 : Number(ignore.value);
3038
+ if (minutes === void 0 || !Number.isInteger(minutes) || minutes < ignoreAfter) {
3039
+ const after = ignore !== void 0 ? setValue(text, ignore.index, "trustPolicyIgnoreAfter", String(ignoreAfter)) : policy !== void 0 ? insert(text, policy.index, [...IGNORE_COMMENT, `trustPolicyIgnoreAfter: ${String(ignoreAfter)}`]) : text;
3040
+ breaks.push({
3041
+ file: WORKSPACE,
3042
+ ...at(ignore?.index),
3043
+ message: ignore === void 0 ? `${WORKSPACE} does not set trustPolicyIgnoreAfter, so pnpm also refuses old versions that have less evidence for other reasons.` : `trustPolicyIgnoreAfter is ${ignore.value}, not a whole number of at least ${String(ignoreAfter)} minutes.`,
3044
+ edits: edit(after)
3045
+ });
3046
+ }
3047
+ const start = lines.findIndex((line) => line.startsWith("trustPolicyExclude:"));
3048
+ const inline = start >= 0 && (valueOf(lines, "trustPolicyExclude")?.value ?? "") !== "";
3049
+ const list = start >= 0 && !inline ? blockList(lines, start) : {
3050
+ items: [],
3051
+ last: start,
3052
+ indent: " "
3053
+ };
3054
+ const missing = exclude.filter((pattern) => !list.items.includes(pattern));
3055
+ if (missing.length > 0) {
3056
+ const items = missing.map((pattern) => `${list.indent}- ${JSON.stringify(pattern)}`);
3057
+ const after = inline ? text : start >= 0 ? insert(text, list.last, items) : policy === void 0 ? text : insert(text, -1, [
3058
+ ...EXCLUDE_COMMENT,
3059
+ "trustPolicyExclude:",
3060
+ ...items
3061
+ ]);
3062
+ breaks.push({
3063
+ file: WORKSPACE,
3064
+ ...at(start >= 0 ? start : void 0),
3065
+ message: `trustPolicyExclude does not have ${missing.join(", ")}.`,
3066
+ edits: edit(after)
3067
+ });
3068
+ }
3069
+ return breaks;
3070
+ }
3071
+ };
2748
3072
  // src/rules/workspace-protocol.ts
2749
3073
  /**
2750
3074
  * The rule `workspace-protocol`: a package uses another package of the workspace through `workspace:`.
@@ -2814,6 +3138,7 @@ const workspaceProtocol = {
2814
3138
  const RULES = [
2815
3139
  pinnedGitDeps,
2816
3140
  workspaceProtocol,
3141
+ trustPolicy,
2817
3142
  sourceMain,
2818
3143
  tsconfigTest,
2819
3144
  cuePreset,
@@ -2823,6 +3148,7 @@ const RULES = [
2823
3148
  releaseFiles,
2824
3149
  typedScripts,
2825
3150
  typedFiles,
3151
+ mainCheck,
2826
3152
  testsRequired,
2827
3153
  roadmapParses,
2828
3154
  runnerBudget
@@ -2963,7 +3289,8 @@ function runFix(options) {
2963
3289
  for (const rule of result.rules) for (const edit of rule.breaks.flatMap((item) => item.edits ?? [])) {
2964
3290
  if (written.has(edit.file)) continue;
2965
3291
  const path = join(root, edit.file);
2966
- if (!existsSync(path) || readFileSync(path, "utf8") !== edit.before) continue;
3292
+ if ((existsSync(path) ? readFileSync(path, "utf8") : "") !== edit.before) continue;
3293
+ mkdirSync(dirname(path), { recursive: true });
2967
3294
  writeFileSync(path, edit.after);
2968
3295
  written.add(edit.file);
2969
3296
  if (!changed.includes(edit.file)) changed.push(edit.file);
@@ -3178,6 +3505,6 @@ function runCli(args, io) {
3178
3505
  if (summary) appendFileSync(summary, summaryMarkdown(result));
3179
3506
  return result.failed ? 1 : 0;
3180
3507
  }
3181
- export { globToRegExp as $, isGitSpecifier as A, cleanPath as B, repositoryOfRemote as C, roadmapParses as D, roadmapOfLine as E, noLocalPaths as F, lineOf as G, hasFile as H, noBuildOutput as I, readJsonc as J, matchesAny as K, STRICT_OPTIONS as L, pinnedGitDeps as M, DEFAULT_ALLOWED as N, requiredScripts as O, HOME_PATTERNS as P, globFolders as Q, cuePreset as R, sourceMain as S, scheduleMinute as T, inFolder as U, codePackages as V, keyLine as W, runGit as X, replaceLine as Y, specifiersOf as Z, testsRequired as _, listRules as a, isSourcePath as b, runCli as c, RULES as d, packageFolders as et, workspaceProtocol as f, typedFiles as g, scriptsOf as h, formatResult as i, isPinned as j, releaseFiles as k, runFix as l, configsOfScript as m, annotations as n, defaultOptions as nt, readConfig as o, typedScripts as p, parseJsonc as q, createContext as r, parseConfig as rt, runChecks as s, USAGE as t, workspaceGlobs as tt, summaryMarkdown as u, hasTests as v, runnerBudget as w, pathsOf as x, tsconfigTest as y, DEPENDENCY_FIELDS as z };
3508
+ export { parseJsonc as $, roadmapParses as A, REAL_COMPARE as B, isSourcePath as C, runnerBudget as D, repositoryOfRemote as E, pinnedGitDeps as F, DEPENDENCY_FIELDS as G, mainCheck as H, DEFAULT_ALLOWED as I, hasFile as J, cleanPath as K, HOME_PATTERNS as L, releaseFiles as M, isGitSpecifier as N, scheduleMinute as O, isPinned as P, matchesAny as Q, noLocalPaths as R, tsconfigTest as S, sourceMain as T, STRICT_OPTIONS as U, hasImportMetaMain as V, cuePreset as W, keyLine as X, inFolder as Y, lineOf as Z, configsOfScript as _, listRules as a, globToRegExp as at, testsRequired as b, runCli as c, defaultOptions as ct, RULES as d, readJsonc as et, workspaceProtocol as f, typedScripts as g, trustPolicy as h, formatResult as i, globFolders as it, requiredScripts as j, roadmapOfLine as k, runFix as l, parseConfig as lt, TRAIN_SCOPES as m, annotations as n, runGit as nt, readConfig as o, packageFolders as ot, IGNORE_AFTER as p, codePackages as q, createContext as r, specifiersOf as rt, runChecks as s, workspaceGlobs as st, USAGE as t, replaceLine as tt, summaryMarkdown as u, scriptsOf as v, pathsOf as w, hasTests as x, typedFiles as y, noBuildOutput as z };
3182
3509
 
3183
- //# sourceMappingURL=run-DD72yQn7.js.map
3510
+ //# sourceMappingURL=run-DvvaHCjC.js.map