@mark1russell7/conventions 0.27.0 → 0.28.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 +17 -16
- package/build/cli.js +1 -1
- package/build/index.d.ts +1 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +1 -1
- package/build/{run-DRAlJPKd.js → run-BhRY6Axj.js} +55 -26
- package/build/run-BhRY6Axj.js.map +1 -0
- package/package.json +2 -2
- package/build/run-DRAlJPKd.js.map +0 -1
package/README.md
CHANGED
|
@@ -39,29 +39,29 @@ The rules come from the invariants audit of 2026-10-26 (strategy item s38). The
|
|
|
39
39
|
|
|
40
40
|
| Rule | What it examines | From |
|
|
41
41
|
|---|---|---|
|
|
42
|
-
| `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`.
|
|
42
|
+
| `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`. private `github-dep-full-sha`, `github-dep-pinned`. client `general-npm-version`. |
|
|
43
43
|
| `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`. |
|
|
44
|
-
| `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. |
|
|
45
|
-
| `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`.
|
|
44
|
+
| `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. | private `trust-policy` (STRATEGY.md, 2026-11-01). |
|
|
45
|
+
| `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`. private `new-package-main-index`, `source-package-main`. headroom `source-package-main`. |
|
|
46
46
|
| `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`. |
|
|
47
|
-
| `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. `erasableSyntaxOnly` is one of these options, because `node` cannot strip the other syntax. | client `cue-config`, `no-manual-tsconfig`.
|
|
48
|
-
| `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,
|
|
47
|
+
| `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. `erasableSyntaxOnly` is one of these options, because `node` cannot strip the other syntax. | client `cue-config`, `no-manual-tsconfig`. private `cue-preset-strict`, `strict-preset`, `new-package-via-cli`. coeval, crawler, headroom, Vex `package-scaffold`. |
|
|
48
|
+
| `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`. |
|
|
49
49
|
| `no-build-output` | Git keeps no file in a folder named `dist` or `build`. | 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. |
|
|
50
50
|
| `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. | client `I12`. systems `no-identifying-names`, `no-private-identifiers`, `no-private-names`. coeval `no-private-names`. |
|
|
51
51
|
| `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`. |
|
|
52
52
|
| `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 git tracks each entry of the field `files`, only those entries 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`. |
|
|
53
53
|
| `changelog-version` | The top version section of the changelog of a package (`CHANGELOG.md` in its folder) is not above the version of its `package.json`. A section "Unreleased" does not count. With the option `everyVersion`, the top section is the same version. On 2026-11-03 a pull request added the section 0.5.0 with two breaking changes and left `package.json` at 0.4.1. A change of a dependency range then made the train plan the PATCH 0.4.2. | packing #249 and #253, release-train (2026-11-03). |
|
|
54
|
-
| `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. |
|
|
55
|
-
| `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. |
|
|
56
|
-
| `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. |
|
|
57
|
-
| `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. |
|
|
58
|
-
| `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. |
|
|
59
|
-
| `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`. |
|
|
60
|
-
| `main-runs-finish` | A workflow that starts on `push` or on `workflow_call` does not cancel a run in progress. A called workflow gets the event of its caller. A newer push cancels only the run of a pull request: `cancel-in-progress: ${{ github.event_name == 'pull_request' }}`. Each commit of `main` has its own concurrency group: `${{ github.event_name == 'pull_request' && github.ref || github.sha }}`. In one group, GitHub cancels a run that waits when a newer run comes, whatever `cancel-in-progress` says. On 2026-11-03 four waiting CI runs of `main` in client were cancelled, so its version commit had no result and no release. On 2026-11-03 the next merge cancelled the CI run of a commit on `main`, so the main check of that commit had no result. A bench run on `main` was cancelled too, and its claim had no measurement. |
|
|
54
|
+
| `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. | private `typed-everything` (STRATEGY.md, direction 15). |
|
|
55
|
+
| `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. | private `fail-closed` (STRATEGY.md, 2026-10-30). |
|
|
56
|
+
| `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. | private `main-check` (STRATEGY.md, 2026-11-02). |
|
|
57
|
+
| `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. | private `fail-closed` (STRATEGY.md, 2026-10-30). |
|
|
58
|
+
| `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. | private `fail-closed` (STRATEGY.md, 2026-10-30). |
|
|
59
|
+
| `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`. | private `runner-slots` (STRATEGY.md, 2026-10-30). |
|
|
60
|
+
| `main-runs-finish` | A workflow that starts on `push` or on `workflow_call` does not cancel a run in progress. A called workflow gets the event of its caller. A newer push cancels only the run of a pull request: `cancel-in-progress: ${{ github.event_name == 'pull_request' }}`. Each commit of `main` has its own concurrency group: `${{ github.event_name == 'pull_request' && github.ref || github.sha }}`. In one group, GitHub cancels a run that waits when a newer run comes, whatever `cancel-in-progress` says. On 2026-11-03 four waiting CI runs of `main` in client were cancelled, so its version commit had no result and no release. On 2026-11-03 the next merge cancelled the CI run of a commit on `main`, so the main check of that commit had no result. A bench run on `main` was cancelled too, and its claim had no measurement. | private `main-runs-finish` (STRATEGY.md, 2026-11-03). |
|
|
61
61
|
| `push-main-only` | A workflow that starts on `push` and on `pull_request` limits `push` to the default branch with `branches`, and has `workflow_dispatch`. Without the limit, each commit of a pull request starts two runs. A `push` with only a tag filter, a `pull_request` with `types` that do not have `synchronize`, and `pull_request_target` are not breaks. `CI.md` tells each case in "One run for each commit". |
|
|
62
|
-
| `gate-trigger` | No workflow has `paths` or `paths-ignore` on `on.pull_request` or `on.pull_request_target`. The ruleset needs the summary check `<Name> OK` of each gate, and a workflow with a path filter does not start on each pull request. Then its check is not there, the ruleset cannot ask for it, and a pull request can merge before the gate ends. A gate uses the actions `changes` and `gate-summary` of the template (`CI.md`, "A gate with paths"). |
|
|
63
|
-
| `license-file` | Each public package has a license field, and a license file with the same license in its own folder. A public repository, or a repository with a public package, has a license file at its root. In a GitHub Actions run, the event file tells if the repository is public, and the option `license` (MIT by default) is the license of a root with no public package. npm packs only the license file of the folder of the package, and GitHub reads only the one of the root: on 2026-11-02 five public repositories showed no license on GitHub while npm said MIT. `conventions fix` writes the missing files. |
|
|
64
|
-
| `home-package` | A change does not add a function with a signature name of another home of the map (for example `median`, `mulberry32` or `writeFileAtomic`). A local copy drifts from the home and splits the fixes. On 2026-11-02 the
|
|
62
|
+
| `gate-trigger` | No workflow has `paths` or `paths-ignore` on `on.pull_request` or `on.pull_request_target`. The ruleset needs the summary check `<Name> OK` of each gate, and a workflow with a path filter does not start on each pull request. Then its check is not there, the ruleset cannot ask for it, and a pull request can merge before the gate ends. A gate uses the actions `changes` and `gate-summary` of the template (`CI.md`, "A gate with paths"). | private `gate-trigger` (STRATEGY.md, 2026-11-02). |
|
|
63
|
+
| `license-file` | Each public package has a license field, and a license file with the same license in its own folder. A public repository, or a repository with a public package, has a license file at its root. In a GitHub Actions run, the event file tells if the repository is public, and the option `license` (MIT by default) is the license of a root with no public package. npm packs only the license file of the folder of the package, and GitHub reads only the one of the root: on 2026-11-02 five public repositories showed no license on GitHub while npm said MIT. `conventions fix` writes the missing files. | private strategy (2026-11-02). |
|
|
64
|
+
| `home-package` | A change does not add a function with a signature name of another home of the map (for example `median`, `mulberry32` or `writeFileAtomic`). A local copy drifts from the home and splits the fixes. On 2026-11-02 the repositories had 68 local statistics functions in 14 repositories. The rule examines only the lines that the change adds, so the copies that exist do not break. | private direction 18 (STRATEGY.md, 2026-11-02). |
|
|
65
65
|
| `pages-site` | A public repository has a workflow that calls the Pages workflow of the template (`mark1russell7/template/.github/workflows/reusable-pages.yml`, any ref), and the call deploys. A call with `deploy: false` makes a test site only. In a GitHub Actions run, the event file tells if the repository is public. Outside a run, the rule shows `skip`. On 2026-11-02 eight public repositories had no site with a Releases page and a Status page. | vex, crawler, client, coeval `pages.yml`. |
|
|
66
66
|
| `shared-docs` | Each lock file `shared.lock.json` names a document in its field `file`. Each shared block of the document (`<!-- shared:<id> -->` to `<!-- /shared:<id> -->`) has the SHA-256 that the lock gives, and the lock has each block. A linked block has its home in another repository. Its lock entry gives `{repo, path, commit, sha256}`, with a full commit. The document has a `<!-- linked:<id> -->` block with the link to the home at that commit, and no copy. In CI, the rule downloads each home and compares the hash. A home that does not answer in 30 seconds is a break. On 2026-11-03 three repositories kept copies of a block whose home in rigor had a different hash. | layout-contract `scripts/check-shared.mjs` (#155). |
|
|
67
67
|
|
|
@@ -144,7 +144,8 @@ An unknown rule, an unknown option, or an exception or a changed option without
|
|
|
144
144
|
| `--list` | Show each rule: the reason, the fix, the options, the state and the audit rows. |
|
|
145
145
|
| `--root <folder>` | The root of the repository. The default is the current folder. |
|
|
146
146
|
| `--rule <id>` | Only this rule. Use it again for more rules. |
|
|
147
|
-
| `--base <ref>` | The base commit of the change, for the rules `release-files`, `home-package` and `unreleased-change`. |
|
|
147
|
+
| `--base <ref>` | The base commit of the change, for the rules `release-files`, `home-package` and `unreleased-change`. Outside CI, the default is the default branch of origin, so a local check examines the same added lines as the check of the pull request. |
|
|
148
|
+
| `--no-base` | Do not use that default. |
|
|
148
149
|
| `--json` | Write the result as JSON. |
|
|
149
150
|
|
|
150
151
|
## The map of homes
|
package/build/cli.js
CHANGED
package/build/index.d.ts
CHANGED
|
@@ -210,7 +210,7 @@ interface Home {
|
|
|
210
210
|
}
|
|
211
211
|
/** The rule of the map. Each session and each review applies it. */
|
|
212
212
|
export declare const MAP_RULE = "Before you write a helper, find its home in this map. If the home does not have the function, add it to the home, in a pull request of the home repository. Do not make a local copy, a new package or a new repository for an area that has a home: that needs the strategist. A home that is not on npm is used with workspace:* or a github: specifier pinned to a commit. If no area fits, ask the strategist for a home before you write the code.";
|
|
213
|
-
/** The public homes. Each package
|
|
213
|
+
/** The public homes. Each package that other code can use has one area. */
|
|
214
214
|
export declare const HOMES: readonly Home[];
|
|
215
215
|
/** A file of more homes, for example the private repositories, in the shape `{ "homes": Home[] }`. */
|
|
216
216
|
export declare function readOverlay(file: string): readonly Home[];
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/rule.ts","../src/config.ts","../src/rules/cue-preset.ts","../src/rules/gate-trigger.ts","../src/map.ts","../src/rules/home-package.ts","../src/rules/license-file.ts","../src/rules/main-check.ts","../src/rules/no-build-output.ts","../src/rules/no-local-paths.ts","../src/rules/pages-site.ts","../src/rules/pinned-git-deps.ts","../src/rules/push-main-only.ts","../src/rules/release-files.ts","../src/rules/required-scripts.ts","../src/rules/roadmap-parses.ts","../src/rules/runner-budget.ts","../src/rules/shared-docs.ts","../src/rules/source-main.ts","../src/rules/tests-required.ts","../src/rules/tsconfig-test.ts","../src/rules/typed-files.ts","../src/rules/typed-scripts.ts","../src/rules/trust-policy.ts","../src/rules/unreleased-change.ts","../src/rules/workspace-protocol.ts","../src/rules/index.ts","../src/home-exports.ts","../src/workflow.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;;;;;WAKjC;EACT,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;;UC1M9E;;WAEN;;WAEA;;WAEA;;WAEA,SAAS;;;UAIH;;WAEN;;WAEA,OAAO,SAAS,eAAe;;;wBAW1B,eAAe,MAAM,OAAO;;;;;;;wBAU5B,YAAY,gBAAgB,gBAAgB,SAAS;;qBCnCxD;qBA4FA,WAAW;;UCtFP;WACN;WACA;WACA;;;wBAIK,cAAc,eAAe;;qBAoBhC;;wBAyBG,YAAY;;;;;;;wBAkBZ,YAAY,cAAc,cAAc;EAAoC;;EAAmB;;qBAwIlG,aAAa;;KC1Nd;;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;qBAGA;qBA6DA,aAAa;;;;;KC9Dd;WAA4B;WAAsC,QAAQ,SAAS;;WAAuC;;;KAG1H,kBAAkB,0BAA0B,qBAAqB,oBAAoB;;qBAGpF;;qBAGA;;qBAkBA;;;;;qBAyBA,WAAW;;wBAmGR,qBAAqB,SAAQ,iBAA6B;qBA4G7D,kBAAkB;qBCxQlB,mBAAmB;;qBCuBnB,gBAAgB;;qBC7BhB,cAAc,SAAS;WAA0B;WAA0B;;UC6EvE;WACN;WACA;WACA;;WAEA;WACA;;;UAIM;;WAEN;;WAEA;;WAEA;;;UAIM;WACN;WACA;WACA;WACA,gBAAgB;;;UAIV;;WAEN;;WAEA;;WAEA;WACA,iBAAiB;WACjB,eAAe;;;wBAgGV,aAAa,cAAc,eAAe;;UCrMzC;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;;UAmDjC;;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;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/rule.ts","../src/config.ts","../src/rules/cue-preset.ts","../src/rules/gate-trigger.ts","../src/map.ts","../src/rules/home-package.ts","../src/rules/license-file.ts","../src/rules/main-check.ts","../src/rules/no-build-output.ts","../src/rules/no-local-paths.ts","../src/rules/pages-site.ts","../src/rules/pinned-git-deps.ts","../src/rules/push-main-only.ts","../src/rules/release-files.ts","../src/rules/required-scripts.ts","../src/rules/roadmap-parses.ts","../src/rules/runner-budget.ts","../src/rules/shared-docs.ts","../src/rules/source-main.ts","../src/rules/tests-required.ts","../src/rules/tsconfig-test.ts","../src/rules/typed-files.ts","../src/rules/typed-scripts.ts","../src/rules/trust-policy.ts","../src/rules/unreleased-change.ts","../src/rules/workspace-protocol.ts","../src/rules/index.ts","../src/home-exports.ts","../src/workflow.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;;;;;WAKjC;EACT,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;;UC1M9E;;WAEN;;WAEA;;WAEA;;WAEA,SAAS;;;UAIH;;WAEN;;WAEA,OAAO,SAAS,eAAe;;;wBAW1B,eAAe,MAAM,OAAO;;;;;;;wB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B,IAAI;;;;;;wBClTpC,aAAa,eAAe;;;;;wBAsD5B,YAAY,cAAc;;;;;;wBA8B1B,eAAe;;;;;;;wBAwCf,eAAe,cAAc"}
|
package/build/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { St as ACTIONS_COMMIT, X as DEFAULT_ALLOWED, At as DEPENDENCY_FIELDS, mt as HOMES, xt as HOME_EXPORTS, Z as HOME_PATTERNS, M as HOME_TIMEOUT_MS, y as IGNORE_AFTER, rt as LICENSE_TEXTS, ht as MAP_RULE, p as NPM_REGISTRY, q as PAGES_WORKFLOWS, et as REAL_COMPARE, d as RULES, m as SHIPPED_FIELDS, Ot as STRICT_OPTIONS, b as TRAIN_SCOPES, h as UNSHIPPED_FILES, t as USAGE, n as annotations, it as authorOf, N as blockHash, jt as cleanPath, Mt as codePackages, C as configsOfScript, Ct as convertGate, r as createContext, kt as cuePreset, lt as declaredName, qt as defaultOptions, gt as findHomes, i as formatResult, wt as gateTrigger, P as githubFetch, Ut as globFolders, Wt as globToRegExp, Nt as hasFile, tt as hasImportMetaMain, D as hasTests, ut as homePackage, Pt as inFolder, W as isGitSpecifier, G as isPinned, k as isSourcePath, Ft as keyLine, at as licenseFile, ot as licenseFileOf, It as lineOf, a as listRules, nt as mainCheck, _t as mapMarkdown, vt as mapText, Lt as matchesAny, yt as mergeHomes, dt as messageOf, st as mitText, $ as noBuildOutput, Q as noLocalPaths, g as npmLookup, Gt as packageFolders, J as pagesCalls, Y as pagesSite, Jt as parseConfig, Rt as parseJsonc, A as pathsOf, K as pinnedGitDeps, Tt as prPathFilters, U as pushMainOnly, o as readConfig, zt as readJsonc, bt as readOverlay, Dt as readWorkflow, H as releaseFiles, Bt as replaceLine, ft as repoOf, ct as repositoryIsPublic, I as repositoryOfRemote, V as requiredScripts, z as roadmapOfLine, B as roadmapParses, s as runChecks, c as runCli, l as runFix, Vt as runGit, L as runnerBudget, R as scheduleMinute, w as scriptsOf, F as sharedDocsRule, pt as signaturesOf, j as sourceMain, Ht as specifiersOf, u as summaryMarkdown, Et as summaryName, E as testsRequired, x as trustPolicy, O as tsconfigTest, T as typedFiles, S as typedScripts, _ as unreleasedChange, v as unreleasedChangeRule, Kt as workspaceGlobs, f as workspaceProtocol } from "./run-
|
|
1
|
+
export { St as ACTIONS_COMMIT, X as DEFAULT_ALLOWED, At as DEPENDENCY_FIELDS, mt as HOMES, xt as HOME_EXPORTS, Z as HOME_PATTERNS, M as HOME_TIMEOUT_MS, y as IGNORE_AFTER, rt as LICENSE_TEXTS, ht as MAP_RULE, p as NPM_REGISTRY, q as PAGES_WORKFLOWS, et as REAL_COMPARE, d as RULES, m as SHIPPED_FIELDS, Ot as STRICT_OPTIONS, b as TRAIN_SCOPES, h as UNSHIPPED_FILES, t as USAGE, n as annotations, it as authorOf, N as blockHash, jt as cleanPath, Mt as codePackages, C as configsOfScript, Ct as convertGate, r as createContext, kt as cuePreset, lt as declaredName, qt as defaultOptions, gt as findHomes, i as formatResult, wt as gateTrigger, P as githubFetch, Ut as globFolders, Wt as globToRegExp, Nt as hasFile, tt as hasImportMetaMain, D as hasTests, ut as homePackage, Pt as inFolder, W as isGitSpecifier, G as isPinned, k as isSourcePath, Ft as keyLine, at as licenseFile, ot as licenseFileOf, It as lineOf, a as listRules, nt as mainCheck, _t as mapMarkdown, vt as mapText, Lt as matchesAny, yt as mergeHomes, dt as messageOf, st as mitText, $ as noBuildOutput, Q as noLocalPaths, g as npmLookup, Gt as packageFolders, J as pagesCalls, Y as pagesSite, Jt as parseConfig, Rt as parseJsonc, A as pathsOf, K as pinnedGitDeps, Tt as prPathFilters, U as pushMainOnly, o as readConfig, zt as readJsonc, bt as readOverlay, Dt as readWorkflow, H as releaseFiles, Bt as replaceLine, ft as repoOf, ct as repositoryIsPublic, I as repositoryOfRemote, V as requiredScripts, z as roadmapOfLine, B as roadmapParses, s as runChecks, c as runCli, l as runFix, Vt as runGit, L as runnerBudget, R as scheduleMinute, w as scriptsOf, F as sharedDocsRule, pt as signaturesOf, j as sourceMain, Ht as specifiersOf, u as summaryMarkdown, Et as summaryName, E as testsRequired, x as trustPolicy, O as tsconfigTest, T as typedFiles, S as typedScripts, _ as unreleasedChange, v as unreleasedChangeRule, Kt as workspaceGlobs, f as workspaceProtocol } from "./run-BhRY6Axj.js";
|
|
@@ -1052,7 +1052,7 @@ const changelogVersion = {
|
|
|
1052
1052
|
doc: "the train plans a PATCH for a change of a dependency range"
|
|
1053
1053
|
},
|
|
1054
1054
|
{
|
|
1055
|
-
repo: "
|
|
1055
|
+
repo: "private",
|
|
1056
1056
|
rule: "semver",
|
|
1057
1057
|
doc: "the global CLAUDE.md, npm packages use Semantic Versioning"
|
|
1058
1058
|
}
|
|
@@ -1210,17 +1210,17 @@ const cuePreset = {
|
|
|
1210
1210
|
doc: "CLAUDE.md:64"
|
|
1211
1211
|
},
|
|
1212
1212
|
{
|
|
1213
|
-
repo: "
|
|
1213
|
+
repo: "private",
|
|
1214
1214
|
rule: "cue-preset-strict",
|
|
1215
1215
|
doc: "docs/architecture/ecosystem-and-structure.md:58"
|
|
1216
1216
|
},
|
|
1217
1217
|
{
|
|
1218
|
-
repo: "
|
|
1218
|
+
repo: "private",
|
|
1219
1219
|
rule: "strict-preset",
|
|
1220
1220
|
doc: "docs/architecture/ecosystem-and-structure.md:58"
|
|
1221
1221
|
},
|
|
1222
1222
|
{
|
|
1223
|
-
repo: "
|
|
1223
|
+
repo: "private",
|
|
1224
1224
|
rule: "new-package-via-cli",
|
|
1225
1225
|
doc: "CLAUDE.md:14"
|
|
1226
1226
|
},
|
|
@@ -1544,7 +1544,7 @@ const mainRunsFinish = {
|
|
|
1544
1544
|
fix: `Set \`cancel-in-progress: ${PULL_REQUEST_ONLY}\`, and end the concurrency group with \`${OWN_GROUP}\`. In one group, GitHub cancels a run that waits when a newer run comes, whatever \`cancel-in-progress\` says.`,
|
|
1545
1545
|
sources: [
|
|
1546
1546
|
{
|
|
1547
|
-
repo: "
|
|
1547
|
+
repo: "private",
|
|
1548
1548
|
rule: "main-runs-finish",
|
|
1549
1549
|
doc: "docs/STRATEGY.md (2026-11-03, a run of main ends)"
|
|
1550
1550
|
},
|
|
@@ -1858,7 +1858,7 @@ const gateTrigger = {
|
|
|
1858
1858
|
reason: "The ruleset requires the summary check \"<Name> OK\" of each gate. A workflow with a path filter does not start on a pull request that changes no file of the filter, so its check is not there, and the ruleset cannot require it. Then a pull request can merge before such a gate ends. On 2026-11-02, 19 such workflows in 11 repositories fed no required check.",
|
|
1859
1859
|
fix: "Remove the paths from on.pull_request. Add a job \"changes\" with the action mark1russell7/template/.github/actions/changes and the same paths, and \"if: needs.changes.outputs.match == 'true'\" on each gate job. Add a job \"<Name> OK\" with \"if: always()\", \"needs\" with each job, and the action gate-summary (CI.md, \"A gate with paths\"). Then start ruleset-ci-ok.ts again. A workflow that is not a gate can go in the option allow.",
|
|
1860
1860
|
sources: [{
|
|
1861
|
-
repo: "
|
|
1861
|
+
repo: "private",
|
|
1862
1862
|
rule: "gate-trigger",
|
|
1863
1863
|
doc: "docs/STRATEGY.md (2026-11-02, a gate with paths feeds a required summary)"
|
|
1864
1864
|
}],
|
|
@@ -6796,7 +6796,7 @@ const HOME_EXPORTS = {
|
|
|
6796
6796
|
// src/map.ts
|
|
6797
6797
|
/** The rule of the map. Each session and each review applies it. */
|
|
6798
6798
|
const MAP_RULE = "Before you write a helper, find its home in this map. If the home does not have the function, add it to the home, in a pull request of the home repository. Do not make a local copy, a new package or a new repository for an area that has a home: that needs the strategist. A home that is not on npm is used with workspace:* or a github: specifier pinned to a commit. If no area fits, ask the strategist for a home before you write the code.";
|
|
6799
|
-
/** The public homes. Each package
|
|
6799
|
+
/** The public homes. Each package that other code can use has one area. */
|
|
6800
6800
|
const HOMES = [
|
|
6801
6801
|
{
|
|
6802
6802
|
area: "statistics",
|
|
@@ -7568,10 +7568,10 @@ function messageOf(file, name, home) {
|
|
|
7568
7568
|
const homePackage = {
|
|
7569
7569
|
id: "home-package",
|
|
7570
7570
|
title: "A change does not add a function that belongs in the home of another area: a name that a home of the map of homes gives as its signature.",
|
|
7571
|
-
reason: "Each area of code has one home package (conventions map). A local copy of a helper of another area drifts from the home and splits the fixes: on 2026-11-02 the
|
|
7571
|
+
reason: "Each area of code has one home package (conventions map). A local copy of a helper of another area drifts from the home and splits the fixes: on 2026-11-02 the repositories had 68 local statistics functions (median, quantile, bootstrap and more) in 14 repositories, while @mark1russell7/rigor-statistics was on npm. The check examines only the lines that a change adds, so the copies that exist do not break, and the count can only go down.",
|
|
7572
7572
|
fix: "Import the function from its home. If the home does not have it, add it to the home in a pull request of the home repository, then import it. A function that only has the name of a signature and does another thing gets a new name.",
|
|
7573
7573
|
sources: [{
|
|
7574
|
-
repo: "
|
|
7574
|
+
repo: "private",
|
|
7575
7575
|
rule: "direction-18",
|
|
7576
7576
|
doc: "docs/STRATEGY.md (2026-11-02, one map of homes, checked when the code is written)"
|
|
7577
7577
|
}],
|
|
@@ -7901,7 +7901,7 @@ const mainCheck = {
|
|
|
7901
7901
|
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.",
|
|
7902
7902
|
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.",
|
|
7903
7903
|
sources: [{
|
|
7904
|
-
repo: "
|
|
7904
|
+
repo: "private",
|
|
7905
7905
|
rule: "main-check",
|
|
7906
7906
|
doc: "docs/STRATEGY.md (2026-11-02, the main check through a link)"
|
|
7907
7907
|
}],
|
|
@@ -8255,12 +8255,12 @@ const pinnedGitDeps = {
|
|
|
8255
8255
|
doc: "CLAUDE.md:38"
|
|
8256
8256
|
},
|
|
8257
8257
|
{
|
|
8258
|
-
repo: "
|
|
8258
|
+
repo: "private",
|
|
8259
8259
|
rule: "github-dep-full-sha",
|
|
8260
8260
|
doc: "docs/decisions.md:1384"
|
|
8261
8261
|
},
|
|
8262
8262
|
{
|
|
8263
|
-
repo: "
|
|
8263
|
+
repo: "private",
|
|
8264
8264
|
rule: "github-dep-pinned",
|
|
8265
8265
|
doc: "docs/decisions.md:1384"
|
|
8266
8266
|
},
|
|
@@ -8861,7 +8861,7 @@ const requiredScripts = {
|
|
|
8861
8861
|
doc: "CLAUDE.md:5"
|
|
8862
8862
|
},
|
|
8863
8863
|
{
|
|
8864
|
-
repo: "
|
|
8864
|
+
repo: "private",
|
|
8865
8865
|
rule: "ste-prose",
|
|
8866
8866
|
doc: "CLAUDE.md:5"
|
|
8867
8867
|
},
|
|
@@ -8997,7 +8997,7 @@ const roadmapParses = {
|
|
|
8997
8997
|
reason: "Only the Pages job on main reads the roadmap. A pull request with a bad table row passes each check, and then the build of the site stops and the site stays stale. On 2026-10-30, one repository had 3 red Pages runs in a row because of one row with 2 cells under a header with 4. A site with no roadmap is the same fault with no error: its Status page shows no item of the plan, and each check is green. On 2026-10-30, 2 repositories had a site with no roadmap.",
|
|
8998
8998
|
fix: "Give the roadmap file to the Pages workflow (`roadmap: docs/ROADMAP.md`). Correct the row or the heading that the message names. Each table row has one cell for each column of its header, and the file has a table with an ID column and a Status column, or a heading \"### `id`: Title\".",
|
|
8999
8999
|
sources: [{
|
|
9000
|
-
repo: "
|
|
9000
|
+
repo: "private",
|
|
9001
9001
|
rule: "fail-closed",
|
|
9002
9002
|
doc: "docs/STRATEGY.md (2026-10-30, gates and probes fail closed)"
|
|
9003
9003
|
}],
|
|
@@ -9270,7 +9270,7 @@ const runnerBudget = {
|
|
|
9270
9270
|
reason: "All repositories of the account share 40 runners, and heavy work keeps at most 28 of them. On 2026-10-30, a matrix with no max-parallel and the sync pull requests of about 20 repositories filled 39 of the 40 runners, with 88 jobs in the queue. Each repository copied the weekly scan at `23 5 * * 1`, so all scans started at the same minute. A workflow with no concurrency group starts a new run on each push, and the old runs keep their runners.",
|
|
9271
9271
|
fix: "Add `max-parallel: 3` (or less) under `strategy`. Add a concurrency group at the top of the workflow (`concurrency: { group: <name>-${{ github.event_name == 'pull_request' && github.ref || github.sha }}, cancel-in-progress: ${{ github.event_name == 'pull_request' }} }`), or in each job. Change the minute of each `cron` to the minute that the message gives; the hour and the days stay.",
|
|
9272
9272
|
sources: [{
|
|
9273
|
-
repo: "
|
|
9273
|
+
repo: "private",
|
|
9274
9274
|
rule: "runner-slots",
|
|
9275
9275
|
doc: "docs/STRATEGY.md (2026-10-30, the runner slots: a cap of 40, heavy work at most 28)"
|
|
9276
9276
|
}],
|
|
@@ -9698,12 +9698,12 @@ const sourceMain = {
|
|
|
9698
9698
|
doc: "CLAUDE.md:41"
|
|
9699
9699
|
},
|
|
9700
9700
|
{
|
|
9701
|
-
repo: "
|
|
9701
|
+
repo: "private",
|
|
9702
9702
|
rule: "new-package-main-index",
|
|
9703
9703
|
doc: "CLAUDE.md:15"
|
|
9704
9704
|
},
|
|
9705
9705
|
{
|
|
9706
|
-
repo: "
|
|
9706
|
+
repo: "private",
|
|
9707
9707
|
rule: "source-package-main",
|
|
9708
9708
|
doc: "CLAUDE.md:15"
|
|
9709
9709
|
},
|
|
@@ -9925,10 +9925,10 @@ function removeOption(context, files, file, text, index) {
|
|
|
9925
9925
|
const testsRequired = {
|
|
9926
9926
|
id: "tests-required",
|
|
9927
9927
|
title: "No test runner passes when it finds no test: no `passWithNoTests: true` in a config, and no `--passWithNoTests` in a script.",
|
|
9928
|
-
reason: "With the option, a test step that finds 0 tests passes. A broken include pattern, a moved folder or a renamed file then turns the gate green with no test run. In
|
|
9928
|
+
reason: "With the option, a test step that finds 0 tests passes. A broken include pattern, a moved folder or a renamed file then turns the gate green with no test run. In an audit of 2026-10-30, vex had the option in all 9 vitest configs and client in 2 packages that have tests.",
|
|
9929
9929
|
fix: "Remove the option. A package with no tests has no test script, so the shared CI skips it. A package whose tests a later change adds keeps no test script until then.",
|
|
9930
9930
|
sources: [{
|
|
9931
|
-
repo: "
|
|
9931
|
+
repo: "private",
|
|
9932
9932
|
rule: "fail-closed",
|
|
9933
9933
|
doc: "docs/STRATEGY.md (2026-10-30, gates and probes fail closed)"
|
|
9934
9934
|
}],
|
|
@@ -10212,10 +10212,10 @@ const fromRoot = (root, file) => relative(root, file).split("\\").join("/");
|
|
|
10212
10212
|
const typedFiles = {
|
|
10213
10213
|
id: "typed-files",
|
|
10214
10214
|
title: "Each TypeScript file that git keeps is in a tsconfig that a `typecheck` script examines: the tests, the e2e specs, the scripts, the benches and the configs too.",
|
|
10215
|
-
reason: "A file that no tsconfig of a typecheck holds has no type check. Its type errors hide until it runs, and a broken test or script can pass a gate. A test runner such as vitest strips the types, so it does not examine them. In
|
|
10215
|
+
reason: "A file that no tsconfig of a typecheck holds has no type check. Its type errors hide until it runs, and a broken test or script can pass a gate. A test runner such as vitest strips the types, so it does not examine them. In an audit of 2026-10-30, every repository had such files (in one, 90 of 612 files, its e2e specs among them), and the new checks found real defects.",
|
|
10216
10216
|
fix: "Add the file to the `include` of a tsconfig that the `typecheck` script names (for example `tsconfig.test.json`, with `*.config.ts`, `scripts/**`, `bench/**` and `e2e/**`). A config file at the root of a package needs `rootDir: \".\"` there. For the files at the root of the repository, add a `tsconfig.repo.json` and name it in the root `typecheck`. A file that cannot be in a typecheck (it imports a module that only a tool makes) goes in `ignore` with its reason.",
|
|
10217
10217
|
sources: [{
|
|
10218
|
-
repo: "
|
|
10218
|
+
repo: "private",
|
|
10219
10219
|
rule: "fail-closed",
|
|
10220
10220
|
doc: "docs/STRATEGY.md (2026-10-30, gates and probes fail closed)"
|
|
10221
10221
|
}],
|
|
@@ -10341,7 +10341,7 @@ const typedScripts = {
|
|
|
10341
10341
|
reason: "A script has bugs like the code, and types and tests find them. Node 22.18 and later runs a `.ts` file directly, so a script in JavaScript or in a shell language has no cost to save and no check. A shell file stays only as a launcher of one line.",
|
|
10342
10342
|
fix: "Rename the file to `.ts`, add the types, and check it with `tsc --noEmit` and a test. Move the logic of a shell script into a `.ts` file, and keep the shell file as one line that starts it, or remove it. A file that must stay (generated output, vendored code, a configuration that a tool reads only as JavaScript) goes in `ignore` with its reason.",
|
|
10343
10343
|
sources: [{
|
|
10344
|
-
repo: "
|
|
10344
|
+
repo: "private",
|
|
10345
10345
|
rule: "typed-everything",
|
|
10346
10346
|
doc: "docs/STRATEGY.md:78"
|
|
10347
10347
|
}],
|
|
@@ -10480,7 +10480,7 @@ const trustPolicy = {
|
|
|
10480
10480
|
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.",
|
|
10481
10481
|
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.",
|
|
10482
10482
|
sources: [{
|
|
10483
|
-
repo: "
|
|
10483
|
+
repo: "private",
|
|
10484
10484
|
rule: "trust-policy",
|
|
10485
10485
|
doc: "docs/STRATEGY.md (2026-11-01, release age and trust policy)"
|
|
10486
10486
|
}],
|
|
@@ -11188,7 +11188,9 @@ const USAGE = `Usage: conventions check [options]
|
|
|
11188
11188
|
|
|
11189
11189
|
--root <folder> The root of the repository. The default is the current folder.
|
|
11190
11190
|
--rule <id> Only this rule. Use it again for more rules.
|
|
11191
|
-
--base <ref> The base commit of the change, for the
|
|
11191
|
+
--base <ref> The base commit of the change, for the rules that examine a change. On a pull request, the
|
|
11192
|
+
rules find it. Outside CI, the default is the default branch of origin.
|
|
11193
|
+
--no-base Do not use the default base.
|
|
11192
11194
|
--json Write the result as JSON.
|
|
11193
11195
|
-h, --help Show this text.
|
|
11194
11196
|
|
|
@@ -11199,6 +11201,30 @@ with a reason, and sets the options of a rule with a reason:
|
|
|
11199
11201
|
"cue-preset": { "ignore": ["packages/web/**"], "reason": "<reason>" },
|
|
11200
11202
|
"workspace-protocol": { "prefix": "workspace:*", "reason": "<reason>" } } }
|
|
11201
11203
|
`;
|
|
11204
|
+
/**
|
|
11205
|
+
* This function gives the default base of a check outside CI: the default branch of origin. So a local check examines the same
|
|
11206
|
+
* added lines as the check of the pull request. On 2026-11-04, two pull requests went red at the first push because a plain local
|
|
11207
|
+
* check skipped those rules. In CI, the event gives the change, so this function gives undefined.
|
|
11208
|
+
*/
|
|
11209
|
+
function localBase(root, env) {
|
|
11210
|
+
if (env["CI"] !== void 0 || env["GITHUB_ACTIONS"] !== void 0) return void 0;
|
|
11211
|
+
const head = runGit(root, [
|
|
11212
|
+
"symbolic-ref",
|
|
11213
|
+
"--quiet",
|
|
11214
|
+
"--short",
|
|
11215
|
+
"refs/remotes/origin/HEAD"
|
|
11216
|
+
])?.trim();
|
|
11217
|
+
for (const ref of [
|
|
11218
|
+
head,
|
|
11219
|
+
"origin/main",
|
|
11220
|
+
"origin/master"
|
|
11221
|
+
]) if (ref !== void 0 && ref !== "" && runGit(root, [
|
|
11222
|
+
"rev-parse",
|
|
11223
|
+
"--verify",
|
|
11224
|
+
"--quiet",
|
|
11225
|
+
`${ref}^{commit}`
|
|
11226
|
+
]) !== void 0) return ref;
|
|
11227
|
+
}
|
|
11202
11228
|
/** An error of the arguments: exit code 2 and the help text. */
|
|
11203
11229
|
var UsageError = class extends Error {};
|
|
11204
11230
|
/** This function starts the bin with the arguments `args`, and gives its exit code. */
|
|
@@ -11210,6 +11236,7 @@ function runCli(args, io) {
|
|
|
11210
11236
|
let json = false;
|
|
11211
11237
|
let root = io.cwd;
|
|
11212
11238
|
let base;
|
|
11239
|
+
let noBase = false;
|
|
11213
11240
|
const only = [];
|
|
11214
11241
|
try {
|
|
11215
11242
|
for (let index = 0; index < args.length; index++) {
|
|
@@ -11226,6 +11253,7 @@ function runCli(args, io) {
|
|
|
11226
11253
|
else if (arg === "--root") root = resolve(io.cwd, value());
|
|
11227
11254
|
else if (arg === "--rule") only.push(value());
|
|
11228
11255
|
else if (arg === "--base") base = value();
|
|
11256
|
+
else if (arg === "--no-base") noBase = true;
|
|
11229
11257
|
else if (arg === "--help" || arg === "-h") {
|
|
11230
11258
|
io.stdout(USAGE);
|
|
11231
11259
|
return 0;
|
|
@@ -11251,11 +11279,12 @@ function runCli(args, io) {
|
|
|
11251
11279
|
let result;
|
|
11252
11280
|
let fixed;
|
|
11253
11281
|
try {
|
|
11282
|
+
const change = noBase ? void 0 : base ?? localBase(root, io.env);
|
|
11254
11283
|
const options = {
|
|
11255
11284
|
root,
|
|
11256
11285
|
only,
|
|
11257
11286
|
env: io.env,
|
|
11258
|
-
...
|
|
11287
|
+
...change === void 0 ? {} : { base: change }
|
|
11259
11288
|
};
|
|
11260
11289
|
if (fix) {
|
|
11261
11290
|
fixed = runFix(options);
|
|
@@ -11317,4 +11346,4 @@ function runMap(args, io) {
|
|
|
11317
11346
|
}
|
|
11318
11347
|
export { noBuildOutput as $, pathsOf as A, DEPENDENCY_FIELDS as At, roadmapParses as B, replaceLine as Bt, configsOfScript as C, convertGate as Ct, hasTests as D, readWorkflow as Dt, testsRequired as E, summaryName as Et, sharedDocsRule as F, keyLine as Ft, isPinned as G, packageFolders as Gt, releaseFiles as H, specifiersOf as Ht, repositoryOfRemote as I, lineOf as It, pagesCalls as J, parseConfig as Jt, pinnedGitDeps as K, workspaceGlobs as Kt, runnerBudget as L, matchesAny as Lt, HOME_TIMEOUT_MS as M, codePackages as Mt, blockHash as N, hasFile as Nt, tsconfigTest as O, STRICT_OPTIONS as Ot, githubFetch as P, inFolder as Pt, noLocalPaths as Q, scheduleMinute as R, parseJsonc as Rt, typedScripts as S, ACTIONS_COMMIT as St, typedFiles as T, prPathFilters as Tt, pushMainOnly as U, globFolders as Ut, requiredScripts as V, runGit as Vt, isGitSpecifier as W, globToRegExp as Wt, DEFAULT_ALLOWED as X, pagesSite as Y, HOME_PATTERNS as Z, unreleasedChange as _, mapMarkdown as _t, listRules as a, licenseFile as at, TRAIN_SCOPES as b, readOverlay as bt, runCli as c, repositoryIsPublic as ct, RULES as d, messageOf as dt, REAL_COMPARE as et, workspaceProtocol as f, repoOf as ft, npmLookup as g, findHomes as gt, UNSHIPPED_FILES as h, MAP_RULE as ht, formatResult as i, authorOf as it, sourceMain as j, cleanPath as jt, isSourcePath as k, cuePreset as kt, runFix as l, declaredName as lt, SHIPPED_FIELDS as m, HOMES as mt, annotations as n, mainCheck as nt, readConfig as o, licenseFileOf as ot, NPM_REGISTRY as p, signaturesOf as pt, PAGES_WORKFLOWS as q, defaultOptions as qt, createContext as r, LICENSE_TEXTS as rt, runChecks as s, mitText as st, USAGE as t, hasImportMetaMain as tt, summaryMarkdown as u, homePackage as ut, unreleasedChangeRule as v, mapText as vt, scriptsOf as w, gateTrigger as wt, trustPolicy as x, HOME_EXPORTS as xt, IGNORE_AFTER as y, mergeHomes as yt, roadmapOfLine as z, readJsonc as zt };
|
|
11319
11348
|
|
|
11320
|
-
//# sourceMappingURL=run-
|
|
11349
|
+
//# sourceMappingURL=run-BhRY6Axj.js.map
|