@mark1russell7/conventions 0.47.0 → 0.47.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -12
- package/build/cli.js +1 -1
- package/build/index.d.ts +15 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +2 -2
- package/build/{run-khnpaEqi.js → run-BLJCc6nt.js} +79 -30
- package/build/run-BLJCc6nt.js.map +1 -0
- package/package.json +1 -1
- package/build/run-khnpaEqi.js.map +0 -1
package/README.md
CHANGED
|
@@ -45,7 +45,7 @@ The rules come from the invariants audit of 2026-10-26 (strategy item s38). The
|
|
|
45
45
|
|---|---|---|
|
|
46
46
|
| `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`. |
|
|
47
47
|
| `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`. |
|
|
48
|
-
| `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` (
|
|
48
|
+
| `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` (a decision of 2026-11-01). |
|
|
49
49
|
| `security-overrides` | A lockfile with a bad path of a shared override has the override of pnpm in `pnpm-workspace.yaml`. The overrides are data (`SHARED_OVERRIDES`). Each one has a parent, a child, a range, the first fixed version of the child and its advisories. A bad path is a version of the child under the parent below the fixed version. The rule reads the lockfile, so an override with another range passes when the lockfile has a fixed version. An override ends when the lockfile has no version of its parent. Then the rule asks for its removal. The first override is `archiver-utils>glob` at `^14.0.3` (GHSA-3g3m-2fjr-6pw4 and GHSA-g3hv-75wg-m249). The rule fails from 2026-11-30. | netdiag #37 and systems #557 (2026-11-15): the same override, written by hand, with no end. A private repository has the bad path and no override. |
|
|
50
50
|
| `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`. |
|
|
51
51
|
| `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`. |
|
|
@@ -58,14 +58,14 @@ The rules come from the invariants audit of 2026-10-26 (strategy item s38). The
|
|
|
58
58
|
| `version-title` | A merge whose title names a version sets a version in a `package.json`. A title names a version in parentheses at its end, for example `(0.3.3)` before the `(#212)` of a squash, or after `Release` at its start. On a push to the default branch, the rule examines each commit of the first-parent line against its first parent. On a pull request, it reads the title of the event file and examines the merge commit against the base. On a dispatched run of a pull request, the file of `CONVENTIONS_PULL_REQUEST` gives the title. Then the rule examines the change from the merge base to the head. A version counts only when the base branch does not have it already. A title with no version passes. A title that names an other version than the version that the merge sets also passes, because the change gets a release. | template #212 (`5933b34`) and #215 (`e077054`), 2026-11-06: both set `site-pages` 0.3.3, so the squash of #215 changed no `package.json`, and no release started. Template #162 and #164 (2026-11-04) did the same with 0.2.5. crawler, coeval `release.yml`. |
|
|
59
59
|
| `published-minor` | A consumer does not stay behind the newest published minor of a package that the option `packages` names. The rule compares each range, and each version of `pnpm-lock.yaml`, with the tag `latest` of npm. A caret range of a `0.x` version cannot reach the next minor. With no `packages`, the rule does not start. | a consumer that stayed behind a published minor |
|
|
60
60
|
| `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). |
|
|
61
|
-
| `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` (
|
|
62
|
-
| `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` (
|
|
63
|
-
| `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` (
|
|
64
|
-
| `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` (
|
|
65
|
-
| `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` (
|
|
61
|
+
| `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` (a decision of direction 15). |
|
|
62
|
+
| `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` (a decision of 2026-10-30). |
|
|
63
|
+
| `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` (a decision of 2026-11-02). |
|
|
64
|
+
| `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` (a decision of 2026-10-30). |
|
|
65
|
+
| `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` (a decision of 2026-10-30). |
|
|
66
66
|
| `workflow-parses` | Each workflow of `.github/workflows` and each file `action.yml` of `.github/actions` parses as YAML, with the parser of the package `yaml`. GitHub refuses a workflow that does not parse, and starts no job. A workflow that starts only on a schedule, a dispatch or `workflow_run` does not start on its pull request. So the rule finds its fault before the merge. The break names the first fault of each file. | layout-contract `memory-probe.yml`, run 42172612147 (2026-11-06). |
|
|
67
|
-
| `runner-budget` | The repositories of each owner share the runners of its plan: 40 for the personal account, 60 for the organization (`OWNERS`). 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` (
|
|
68
|
-
| `main-runs-finish` | A workflow that starts on `push`, `workflow_call` or `workflow_run` does not cancel a run in progress. A called workflow gets the event of its caller. A run of `workflow_run` is a run of the default branch. A newer push cancels only the run of a pull request: `cancel-in-progress: ${{ github.event_name == 'pull_request' }}`. A run of `push` or `workflow_call` has the concurrency group of its commit: `${{ github.event_name == 'pull_request' && github.ref || github.sha }}`. GitHub gives a run of `workflow_run` the last commit of the default branch, so the rule does not examine its group: a newer run that takes the place of a waiting run tests the same commit or a newer one. 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` (
|
|
67
|
+
| `runner-budget` | The repositories of each owner share the runners of its plan: 40 for the personal account, 60 for the organization (`OWNERS`). 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` (a decision of 2026-10-30). |
|
|
68
|
+
| `main-runs-finish` | A workflow that starts on `push`, `workflow_call` or `workflow_run` does not cancel a run in progress. A called workflow gets the event of its caller. A run of `workflow_run` is a run of the default branch. A newer push cancels only the run of a pull request: `cancel-in-progress: ${{ github.event_name == 'pull_request' }}`. A run of `push` or `workflow_call` has the concurrency group of its commit: `${{ github.event_name == 'pull_request' && github.ref || github.sha }}`. GitHub gives a run of `workflow_run` the last commit of the default branch, so the rule does not examine its group: a newer run that takes the place of a waiting run tests the same commit or a newer one. 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` (a decision of 2026-11-03). |
|
|
69
69
|
| `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". |
|
|
70
70
|
| `pipe-fails` | A failure on the left of a pipe fails its step. With no `shell` key, GitHub has no `pipefail`, so `tests \| tee out.txt` passes when the tests fail. The fix adds `shell: bash` as the default of the workflow. A step that then turns red had a failure that the pipe hid. |
|
|
71
71
|
| `job-fails` | A failed job fails its run and each job that reads it. When a job with `continue-on-error` fails, `needs.<job>.result` is `success`, so a summary job of a gate passes over a crash. The rule also finds `continue-on-error` on a test step that no later step reads, and a `|| true` after a test command. The option `advisory` keeps a job for a time, as `<file>#<job> until <YYYY-MM-DD>: <reason>`. An entry fails after its day, and when its job hides no failure. The rule fails from 2026-12-07. | coeval run 42034457935 (2026-11-05), vex-testkit `workflow-faults.ts`, lag `ci.yml`. |
|
|
@@ -75,16 +75,16 @@ The rules come from the invariants audit of 2026-10-26 (strategy item s38). The
|
|
|
75
75
|
| `shared-ci` | The workflow `ci.yml` calls the shared workflow `reusable-ci.yml` of the template, and no workflow or action of the repository has the name of a shared one of the template. A `ci.yml` with its own steps, or a local copy, does not get the fixes and the new checks of the template. The template itself is not examined (option `home`). On 2026-11-07, 3 of 19 repositories of the account ran CI steps of their own. |
|
|
76
76
|
| `setup-cue` | No workflow or action installs the cue CLI with its own command (a download of a release asset of `cue-lang/cue`, or `go install`). A caller of `reusable-ci.yml` gives the input `cue-version`. Another job uses the action `setup-cue` of the template. The action installs the CLI from a cache, or with retries and a sha256 check. On 2026-11-08, a 504 of GitHub failed each bare `curl` of the CLI. |
|
|
77
77
|
| `playwright-install` | No workflow, action or site config installs the Playwright browsers with its own command (`playwright install` or `install-deps`). A job step uses the action `setup-playwright` of the template. The build of `reusable-pages.yml` gives the key `playwright-browsers`. The action has a cache, a time limit and one more try. On 2026-11-11 the package mirror did not resolve, and each bare install of client and lag stopped in apt. The rule fails from 2026-12-01. | client run 43034026417, lag #113 and #115, template #315 (2026-11-11). |
|
|
78
|
-
| `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` (
|
|
78
|
+
| `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` (a decision of 2026-11-02). |
|
|
79
79
|
| `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). |
|
|
80
80
|
| `coverage-provider` | When a workflow calls the shared CI and the CI starts the action `coverage`, each package whose test script starts Vitest has `@vitest/coverage-v8`. The provider has the range of `vitest`. The package or the root can hold both. On `main` of a public repository, the action skips a package with no provider, so the artifact `coverage` has no report of it. On 2026-11-09, 15 of 43 public repositories had no provider. `conventions fix` adds it at the range of `vitest`. A caller with `coverage-on-main: false` does not break. The rule fails from 2026-11-25. | template `packages/cli` (`package add`), ireko `packages/ireko/package.json`, codeatlas `packages/*/package.json`. |
|
|
81
81
|
| `pack-no-buildinfo` | npm does not pack the build info file of tsc. The rule finds the file of each tsconfig of a public package after its `extends` chain. When `incremental` and `composite` are off, tsc writes no file. When an entry of `files` takes the file and no `!<path>` removes it, the rule breaks. A package with no field `files` packs each file, so it breaks too. The file changes on each build, and the release stops when the files of an unchanged version differ from npm. On 2026-11-09 this made the main of splay-react red. `conventions fix` adds the negation after its entry. A changed list of packed files needs a PATCH version. The rule fails from 2026-11-25. | splay-react `package.json` (1.0.2), splay `package.json`, cue `npm/package/ts.cue` (2.1.3). |
|
|
82
82
|
| `publish-text-safe` | The text that npm puts in the publish document of a public package has no line in the shape of an attack. This text is each README file of the package folder, and each key and each string of `package.json`: npm puts the whole manifest in the document, with `publishConfig`. A break in the manifest names the path of the string, for example `scripts.build` or `repository.url`. The shapes are in the list `ATTACK_SHAPES` of `src/rules/publish-text-safe.ts`, and the field `seen` of each shape gives the evidence of a refusal. On 2026-11-15 the registry refused each publish of `@mark1russell7/text` 0.0.7 for the shape `sql-boolean` (E403), and the error did not name the cause. The other three shapes follow the SQL rules of the OWASP Core Rule Set, and no refusal of them is on record. They are breaks too: a false break costs one reword, and a miss costs an E403 with no cause. A script tag is not a shape of the rule: the README of `@mark1russell7/site-pages` 0.5.4 has one, and its publish passed. The text also has no token of a known service. The shapes of the tokens are `SECRET_SHAPES` of `@mark1russell7/text/redact`, and a break names the line and the shape, not the token. The registry shows the text to each reader, and its mirrors keep each version. The walk of the manifest is `findSecretShapesInValue` of the same module. The rule fails from its release day. | text `packages/text/README.md` (0.0.7, pull request 32), text `packages/text/src/redact.ts` (`SECRET_SHAPES`, `findSecretShapesInValue`, 0.0.8), private strategy (2026-11-16). |
|
|
83
83
|
| `exports-require` | Each entry of the published `exports` of a public package (`publishConfig.exports`, else `exports`) that resolves for `import` also resolves for `require`. The rule resolves each entry as Node does, with the conditions `import`, `node`, `default` and then `require`, `node`, `default`. An entry with only `types` and `import` stops `require()` with ERR_PACKAGE_PATH_NOT_EXPORTED, also on Node 22 and 24. `conventions fix` adds `"default"` with the target of `"import"` as the last member of the object. A target null for `require` is accepted. The rule warns until 2026-11-27. | rigor `package.json` (publishConfig.exports, rigor#196). packing, highways, layout-contract and vex give a `default` target in each published entry. |
|
|
84
84
|
| `home-module` | A change does not add a value import of a module that only a home of the map imports, for example `node:sqlite` out of `@mark1russell7/sqlite`. The field `modules` of a home gives these modules. The rule finds `import` and `export` with `from`, a bare `import`, `import()`, `require()` and `getBuiltinModule()`. An `import type`, an `export type`, `typeof import()` and `import().Name` do not break. A copy of the code of a home drifts from the home: on 2026-11-15 codeatlas and client opened `node:sqlite` with their own pragmas and transactions. The rule examines only the lines that the change adds. A real exception goes in `ignore` with a reason. The rule fails from 2026-11-30. | private strategy (2026-11-15). |
|
|
85
|
-
| `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 (
|
|
85
|
+
| `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 (a decision of 2026-11-02). |
|
|
86
86
|
| `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`. |
|
|
87
|
-
| `site-check-in-ci` | A repository that deploys a site with the Pages workflow has `.github/site.json`. The call of the deploy gives no site input, and no pull request starts the deploy, directly or through a call. A job that uses `reusable-pages-check.yml` checks the site, and "CI OK" needs that job. Thus the check of a pull request builds the site that `main` deploys, and a bad site does not merge. The rule fails from 2026-12-01. | private `site-probe-in-ci` (
|
|
87
|
+
| `site-check-in-ci` | A repository that deploys a site with the Pages workflow has `.github/site.json`. The call of the deploy gives no site input, and no pull request starts the deploy, directly or through a call. A job that uses `reusable-pages-check.yml` checks the site, and "CI OK" needs that job. Thus the check of a pull request builds the site that `main` deploys, and a bad site does not merge. The rule fails from 2026-12-01. | private `site-probe-in-ci` (a decision of 2026-11-08). |
|
|
88
88
|
| `pages-after-release` | A repository with a public package and a release workflow starts its Pages workflow after a release and on each day. `conventions fix` writes the triggers. A workflow with its own deploy steps needs a person. |
|
|
89
89
|
| `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). |
|
|
90
90
|
|
|
@@ -202,6 +202,10 @@ git config --global conventions.privateNamesFile ~/private/private-names.json
|
|
|
202
202
|
|
|
203
203
|
The environment variable `CONVENTIONS_PRIVATE_NAMES_FILE` has priority over the git configuration.
|
|
204
204
|
|
|
205
|
+
The settings can name more than one list. Add each more list with `git config --global --add conventions.privateNamesFile <path>`. In the environment variable, put `;` between the paths on Windows, and `:` on other systems.
|
|
206
|
+
|
|
207
|
+
The command merges the lists in their order. The index of a name in a break counts across the lists. When two lists have the same id, the push stops.
|
|
208
|
+
|
|
205
209
|
The list is a JSON file. The schema [`schema/private-names.schema.json`](schema/private-names.schema.json) tells its fields, and the package has the schema. This example has made-up names:
|
|
206
210
|
|
|
207
211
|
```json
|
|
@@ -312,5 +316,6 @@ The package also exports the functions of the tool:
|
|
|
312
316
|
- `parsePrivateNames(text)` parses and checks a private name list. It throws a `PrivateNameListError` with a reason that shows no value of the list.
|
|
313
317
|
- `lineNameHit(list, line, place)`, `pathNameHit(list, path)`, `firstNameMatch(line, names)`, `isCommonUse(line, index, rule)` and `isAllowedHit(allow, repo, path, id)` find the names of the list. They have no input or output.
|
|
314
318
|
- `lineNameHits(list, line, place)` and `nameMatches(line, names)` give each name of a line, one hit for each name. A scan that counts the names uses them. The gate takes the first hit.
|
|
315
|
-
- `privateNamesFile(env, git)`, `privatePatterns(env)` and `invalidPatternBreaks(patterns)` read the settings and the patterns.
|
|
319
|
+
- `privateNamesFiles(env, git)`, `privateNamesFile(env, git)`, `privatePatterns(env)` and `invalidPatternBreaks(patterns)` read the settings and the patterns. `privateNamesFiles` gives each path, and `privateNamesFile` gives one.
|
|
320
|
+
- `mergePrivateNames(lists)` merges the lists in order. It throws a `PrivateNameListError` when two lists have the same id.
|
|
316
321
|
- `prePush(options, io)` is the command `pre-push`, and `installHook(options, io)` is the command `hook install`. `PRE_PUSH_HOOK` is the text of the hook.
|
package/build/cli.js
CHANGED
package/build/index.d.ts
CHANGED
|
@@ -488,6 +488,13 @@ export declare class PrivateNameListError extends Error {
|
|
|
488
488
|
* expression and the ids. It throws a `PrivateNameListError` when the text is not valid. The error shows no value of the text.
|
|
489
489
|
*/
|
|
490
490
|
export declare function parsePrivateNames(text: string): PrivateNameList;
|
|
491
|
+
/**
|
|
492
|
+
* This function merges private name lists into one list, in order. The names of each list come after the names of the
|
|
493
|
+
* lists before it. Thus the index of a name in a result counts across the lists. `parsePrivateNames` makes sure that an
|
|
494
|
+
* entry of `allow` refers to a name of its own list. The function throws a `PrivateNameListError` when two lists have
|
|
495
|
+
* the same id. Then an entry of `allow` can refer to the two names.
|
|
496
|
+
*/
|
|
497
|
+
export declare function mergePrivateNames(lists: readonly PrivateNameList[]): PrivateNameList;
|
|
491
498
|
/**
|
|
492
499
|
* This function tells if the word of `rule` at `index` of `line` is a common word or code, and not the name of the
|
|
493
500
|
* project. Code is a type, a key or a part of a path. A common word comes after an article, in a title or before a noun.
|
|
@@ -578,6 +585,13 @@ export declare function privatePatterns(env: Readonly<Record<string, string | un
|
|
|
578
585
|
* else the git configuration `conventions.privateNamesFile`. It gives undefined when neither has a value.
|
|
579
586
|
*/
|
|
580
587
|
export declare function privateNamesFile(env: Readonly<Record<string, string | undefined>>, git: (args: readonly string[]) => string | undefined): string | undefined;
|
|
588
|
+
/**
|
|
589
|
+
* This function gives the paths of the private name lists, in order. The environment variable
|
|
590
|
+
* `CONVENTIONS_PRIVATE_NAMES_FILE` has priority. It has one path, or more paths with `separator` between them. The
|
|
591
|
+
* default `separator` is the `delimiter` of `node:path`: `;` on Windows, `:` on other systems. Else, each value of the git
|
|
592
|
+
* configuration `conventions.privateNamesFile` is a path. The function gives an empty array when neither has a value.
|
|
593
|
+
*/
|
|
594
|
+
export declare function privateNamesFiles(env: Readonly<Record<string, string | undefined>>, git: (args: readonly string[]) => string | undefined, separator?: string): string[];
|
|
581
595
|
/** This function gives a break for each private pattern that is not a valid regular expression. A break does not show the pattern. */
|
|
582
596
|
export declare function invalidPatternBreaks(patterns: readonly PrivatePattern[]): Break[];
|
|
583
597
|
/**
|
|
@@ -867,6 +881,7 @@ interface PrePushOptions {
|
|
|
867
881
|
* This function is the command `conventions pre-push`. It examines each new commit of the push: its message, the paths
|
|
868
882
|
* that it adds or changes, and each line that it adds. It writes the breaks to `stderr`, and gives the exit code: 1 on a
|
|
869
883
|
* break, 0 on a pass. With no private name list and no private pattern, it writes the line `NO_READ_LINE` and gives 0.
|
|
884
|
+
* The settings can name more than one list (`privateNamesFiles`). The command then examines the merge of the lists.
|
|
870
885
|
*/
|
|
871
886
|
export declare function prePush(options: PrePushOptions, io: Pick<CliIo, "stderr">): number;
|
|
872
887
|
/** The marker line of the hook that `conventions hook install` writes. The command rewrites only a hook with this line. */
|
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-after-cancel.ts","../src/rules/gate-trigger.ts","../src/rules/security-one-job.ts","../src/rules/setup-cue.ts","../src/rules/shared-ci.ts","../src/rules/service-run-main.ts","../src/map.ts","../src/rules/home-module.ts","../src/rules/home-package.ts","../src/rules/license-file.ts","../src/rules/coverage-provider.ts","../src/rules/main-check.ts","../src/rules/no-build-output.ts","../src/private-names.ts","../src/rules/no-local-paths.ts","../src/rules/pack-no-buildinfo.ts","../src/rules/publish-text-safe.ts","../src/rules/exports-require.ts","../src/rules/api-report-script.ts","../src/rules/pages-after-release.ts","../src/rules/pages-site.ts","../src/rules/site-check-in-ci.ts","../src/rules/pinned-git-deps.ts","../src/rules/pipe-fails.ts","../src/rules/job-fails.ts","../src/rules/playwright-install.ts","../src/rules/push-main-only.ts","../src/rules/unreleased-change.ts","../src/rules/published-minor.ts","../src/rules/release-files.ts","../src/rules/required-scripts.ts","../src/rules/roadmap-parses.ts","../src/rules/runner-budget.ts","../src/rules/shared-docs.ts","../src/rules/source-main.ts","../src/rules/tests-required.ts","../src/rules/tsconfig-test.ts","../src/rules/typed-files.ts","../src/rules/typed-scripts.ts","../src/rules/trust-policy.ts","../src/rules/version-title.ts","../src/rules/workflow-parses.ts","../src/rules/workspace-protocol.ts","../src/rules/index.ts","../src/run.ts","../src/pre-push.ts","../src/home-exports.ts","../src/workflow.ts","../src/release-text.ts"],"mappings":";;;;;;;;;;;;;;;;;;UASiB;WACN;WACA;WACA;;;UAIM;;WAEN;;WAEA;WACA;;WAEA;;WAEA,iBAAiB;;;;;;UAOX;;WAEN;;WAEA;;WAEA;;;wBAIK,YAAY,cAAc,cAAc;;KAQ5C;;KAGA,UAAU,SAAS,eAAe;;UAG7B;WACN;WACA,SAAS;WACT;;;KAIC,WAAW,SAAS;;UAGf;;WAEN;;WAEA;;WAEA;;WAEA;WACA,UAAU;;;UAIJ;;WAEN;;WAEA,aAAa;;WAEb,mBAAmB;;WAEnB,KAAK,SAAS;;WAEd;;WAEA;;EAET;;EAEA,IAAI;;;KAIM,uBAAuB;WAAqB;;;qBAG3C;;UAGI;;WAEN;;WAEA;;WAEA;;WAEA;;WAEA,kBAAkB;;WAElB,SAAS,SAAS,eAAe;;;;;WAKjC;;;;;;;WAOA;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;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AM;WACN;;;;;;;wBAqCK,WAAW,eAAe;;wBAyB1B,UAAU,gBAAgB,SAAS;;wBAKnC,cAAc,cAAc,mBAAmB,MAAM;qBAKxD,YAAY;;UCzEf;WACC,MAAM;WACN,SAAS;;;;;;;wBAQJ,QAAQ,MAAM;;wBASd,aAAa,gBAAgB,SAAS;;wBAKtC,aAAa;;wBAMb,OAAO,SAAS;;wBAchB,UAAU,cAAc,cAAc,MAAM;qBAS/C,aAAa;;qBC9Db,eAAe,SAAS,eAAe;;wBAQpC,cAAc;;wBAMd,SAAS;;wBAWT,QAAQ,cAAc;;;;;wBA+BtB,mBAAmB,SAAS;qBAW/B,aAAa;qBCIb,kBAAkB;;qBCnElB;;wBA6BG,kBAAkB;qBAiFrB,WAAW;qBC/GX,eAAe;;;;;;;;;;qBCLf;;UAGI;;WAEN;;WAEA;;;;;WAKA;;WAEA;;;;;WAKA;;WAEA;;;UAIM;;WAEN;;WAEA;;WAEA;;WAEA;;;UAIM;WACN,gBAAgB;WAChB,gBAAgB;;;UAIV;;WAEN;;WAEA,MAAM;;WAEN;;;UAIM;;WAEN;;WAEA;;;;;;qBAOE,6BAA6B;;WAE/B;EACT,YAAY;;;;;;wBAkGE,kBAAkB,eAAe;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/rule.ts","../src/config.ts","../src/rules/cue-preset.ts","../src/rules/gate-after-cancel.ts","../src/rules/gate-trigger.ts","../src/rules/security-one-job.ts","../src/rules/setup-cue.ts","../src/rules/shared-ci.ts","../src/rules/service-run-main.ts","../src/map.ts","../src/rules/home-module.ts","../src/rules/home-package.ts","../src/rules/license-file.ts","../src/rules/coverage-provider.ts","../src/rules/main-check.ts","../src/rules/no-build-output.ts","../src/private-names.ts","../src/rules/no-local-paths.ts","../src/rules/pack-no-buildinfo.ts","../src/rules/publish-text-safe.ts","../src/rules/exports-require.ts","../src/rules/api-report-script.ts","../src/rules/pages-after-release.ts","../src/rules/pages-site.ts","../src/rules/site-check-in-ci.ts","../src/rules/pinned-git-deps.ts","../src/rules/pipe-fails.ts","../src/rules/job-fails.ts","../src/rules/playwright-install.ts","../src/rules/push-main-only.ts","../src/rules/unreleased-change.ts","../src/rules/published-minor.ts","../src/rules/release-files.ts","../src/rules/required-scripts.ts","../src/rules/roadmap-parses.ts","../src/rules/runner-budget.ts","../src/rules/shared-docs.ts","../src/rules/source-main.ts","../src/rules/tests-required.ts","../src/rules/tsconfig-test.ts","../src/rules/typed-files.ts","../src/rules/typed-scripts.ts","../src/rules/trust-policy.ts","../src/rules/version-title.ts","../src/rules/workflow-parses.ts","../src/rules/workspace-protocol.ts","../src/rules/index.ts","../src/run.ts","../src/pre-push.ts","../src/home-exports.ts","../src/workflow.ts","../src/release-text.ts"],"mappings":";;;;;;;;;;;;;;;;;;UASiB;WACN;WACA;WACA;;;UAIM;;WAEN;;WAEA;WACA;;WAEA;;WAEA,iBAAiB;;;;;;UAOX;;WAEN;;WAEA;;WAEA;;;wBAIK,YAAY,cAAc,cAAc;;KAQ5C;;KAGA,UAAU,SAAS,eAAe;;UAG7B;WACN;WACA,SAAS;WACT;;;KAIC,WAAW,SAAS;;UAGf;;WAEN;;WAEA;;WAEA;;WAEA;WACA,UAAU;;;UAIJ;;WAEN;;WAEA,aAAa;;WAEb,mBAAmB;;WAEnB,KAAK,SAAS;;WAEd;;WAEA;;EAET;;EAEA,IAAI;;;KAIM,uBAAuB;WAAqB;;;qBAG3C;;UAGI;;WAEN;;WAEA;;WAEA;;WAEA;;WAEA,kBAAkB;;WAElB,SAAS,SAAS,eAAe;;;;;WAKjC;;;;;;;WAOA;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,OAA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AAgB,IAAI,KAAK;;qBAuF7C;;;;;;;;qBAgCA;;UAgBI;;WAEN;WACA,KAAK,SAAS;;WAEd,MAAM;;;;;;;wBAWD,YAAY,SAAS,aAAa,IAAI,KAAK;;qBCtY9C,cAAc,SAAS;WAA0B;WAA0B;;UCuIvE;WACN;WACA;WACA;;WAEA;WACA;;;UAIM;;WAEN;;WAEA;;WAEA;;;UAIM;WACN;WACA;WACA;WACA,gBAAgB;;;UAIV;;WAEN;;WAEA;;WAEA;;WAEA;WACA,iBAAiB;WACjB,eAAe;;;wBAgGV,aAAa,cAAc,eAAe;;;;;;;wBAmD1C,WAAW,cAAc,eAAe;;;;;;;;qBC1T3C;;wBAGG,QAAQ,cAAc,iBAAiB;;;;;;;;wBAavC,iBAAiB,kBAAkB,iBAAiB;;wBA+BpD,OAAO,cAAc;;;;;wBAQrB,aAAa,cAAc,iBAAiB"}
|
package/build/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as unreleasedChangeRule, $n as
|
|
1
|
+
import { $ as unreleasedChangeRule, $n as hasFile, $t as licenseFileOf, A as typedFiles, An as callsSharedCi, At as privateNamesFiles, B as roadmapParses, Bn as convertGate, Bt as mergePrivateNames, C as versionTitle, Cn as runCalls, Ct as HOME_PATTERNS, D as typedScripts, Dn as SHARED_ACTIONS, Dt as invalidPatternBreaks, E as trustPolicy, En as tsconfigTest, Et as PRIVATE_PATTERNS_VARIABLE, F as HOME_TIMEOUT_MS, Fn as SECURITY_TIMEOUT_MINUTES, Ft as firstNameMatch, G as publishedMinor, Gn as readAction, Gt as REAL_COMPARE, H as releaseFiles, Hn as prPathFilters, Ht as parsePrivateNames, I as blockHash, In as securityCallers, It as isAllowedHit, J as NPM_REGISTRY, Jn as cuePreset, Jt as coverageProvider, K as publishedMinorRule, Kn as readWorkflow, Kt as hasImportMetaMain, L as githubFetch, Ln as securityOneJob, Lt as isCommonUse, M as isSourcePath, Mn as setupCue, Mt as privateTextBreaks, N as pathsOf, Nn as SECURITY_SCAN_COMMIT, Nt as PRIVATE_NAME_LIST, O as configsOfScript, On as SHARED_CI, Ot as noLocalPaths, P as sourceMain, Pn as SECURITY_SCAN_INPUTS, Pt as PrivateNameListError, Q as unreleasedChange, Qn as codePackages, Qt as licenseFile, R as sharedDocsRule, Rn as withOneJob, Rt as lineNameHit, S as setVersions, Sn as SERVICE_PACKAGE, St as DEFAULT_ALLOWED, T as TRAIN_SCOPES, Tn as hasTests, Tt as PRIVATE_NAMES_FILE_VARIABLE, U as lockedVersions, Un as summaryName, Ut as pathNameHit, V as requiredScripts, Vn as gateTrigger, Vt as nameMatches, W as minorOf, Wn as gateAfterCancel, Wt as noBuildOutput, X as UNSHIPPED_FILES, Xn as RULE_WARN_DAYS, Xt as LICENSE_TEXTS, Y as SHIPPED_FIELDS, Yn as DEPENDENCY_FIELDS, Yt as apiReportScript, Z as npmLookup, Zn as cleanPath, Zt as authorOf, _ as workspaceProtocol, _n as mapText, _t as pagesCalls, a as listRules, an as modulesOf, ar as readJsonc, at as swallowsTests, b as yamlFaults, bn as npmNames, bt as publishTextSafe, c as runCli, cn as messageOf, cr as specifiersOf, ct as isPinned, d as HOOK_MARKER, dn as signaturesOf, dt as pagesAfterRelease, en as mitText, er as inFolder, et as playwrightInstall, f as NO_READ_LINE, fn as HOME_EXPORTS, ft as repositoryOfRemote, g as RULES, gn as mapMarkdown, gt as PAGES_WORKFLOWS, h as prePush, hn as findHomes, ht as pushMainOnly, i as formatResult, in as moduleUses, ir as parseJsonc, it as startsTests, j as testsRequired, jn as sharedCi, jt as privatePatterns, k as scriptsOf, kn as SHARED_WORKFLOWS, kt as privateNamesFile, l as runFix, ln as repoOf, lr as defaultOptions, lt as pinnedGitDeps, m as installHook, mn as MAP_RULE, mt as scheduleMinute, n as annotations, nn as homeModule, nr as lineOf, nt as jobFails, o as readConfig, on as declaredName, or as replaceLine, ot as pipeFails, p as PRE_PUSH_HOOK, pn as HOMES, pt as runnerBudget, q as reachOf, qn as STRICT_OPTIONS, qt as mainCheck, r as createContext, rn as moduleMessage, rr as matchesAny, rt as parseAdvisory, s as runChecks, sn as homePackage, sr as runGit, st as isGitSpecifier, t as USAGE, tn as repositoryIsPublic, tr as keyLine, tt as hiddenFailures, u as summaryMarkdown, un as reposOf, ur as parseConfig, ut as siteCheckInCi, v as GITHUB_YAML, vn as mergeHomes, vt as pagesSite, w as IGNORE_AFTER, wn as serviceRunMain, wt as PRIVATE_NAMES_FILE_CONFIG, x as namedVersions, xn as readOverlay, xt as packNoBuildinfo, y as workflowParses, yn as npmDrift, yt as exportsRequire, z as roadmapOfLine, zn as ACTIONS_COMMIT, zt as lineNameHits } from "./run-BLJCc6nt.js";
|
|
2
2
|
import { OWNERS, ownerOf, ownersOf, sharedNames } from "./owners.js";
|
|
3
3
|
import { i as packageFolders, n as globFolders, r as globToRegExp, s as workspaceGlobs } from "./workspace-Cx7p7bWn.js";
|
|
4
4
|
// src/release-text.ts
|
|
@@ -66,6 +66,6 @@ function releaseNotes(name, version, changelog) {
|
|
|
66
66
|
if (section.length <= 1e5) return section;
|
|
67
67
|
return `${section.slice(0, MAX_NOTES)}\n\n(The CHANGELOG.md of \`${name}\` has the full text.)`;
|
|
68
68
|
}
|
|
69
|
-
export { ACTIONS_COMMIT, DEFAULT_ALLOWED, DEPENDENCY_FIELDS, GITHUB_YAML, HOMES, HOME_EXPORTS, HOME_PATTERNS, HOME_TIMEOUT_MS, HOOK_MARKER, IGNORE_AFTER, LICENSE_TEXTS, MAP_RULE, MAX_NOTES, NO_READ_LINE, NPM_REGISTRY, OWNERS, PAGES_WORKFLOWS, PRE_PUSH_HOOK, PRIVATE_NAMES_FILE_CONFIG, PRIVATE_NAMES_FILE_VARIABLE, PRIVATE_NAME_LIST, PRIVATE_PATTERNS_VARIABLE, PrivateNameListError, REAL_COMPARE, RULES, RULE_WARN_DAYS, SECURITY_SCAN_COMMIT, SECURITY_SCAN_INPUTS, SECURITY_TIMEOUT_MINUTES, SERVICE_PACKAGE, SHARED_ACTIONS, SHARED_CI, SHARED_WORKFLOWS, SHIPPED_FIELDS, STRICT_OPTIONS, TRAIN_SCOPES, UNSHIPPED_FILES, USAGE, annotations, apiReportScript, authorOf, blockHash, callsSharedCi, changelogSection, cleanPath, codePackages, configsOfScript, convertGate, coverageProvider, createContext, cuePreset, declaredName, defaultOptions, exportsRequire, findHomes, firstNameMatch, formatResult, gateAfterCancel, gateTrigger, githubFetch, globFolders, globToRegExp, hasFile, hasImportMetaMain, hasTests, hiddenFailures, homeModule, homePackage, inFolder, installHook, invalidPatternBreaks, isAllowedHit, isCommonUse, isGitSpecifier, isPinned, isSourcePath, jobFails, keyLine, licenseFile, licenseFileOf, lineNameHit, lineNameHits, lineOf, listRules, lockedVersions, mainCheck, mapMarkdown, mapText, matchesAny, mergeHomes, messageOf, minorOf, mitText, moduleMessage, moduleUses, modulesOf, nameMatches, namedVersions, noBuildOutput, noLocalPaths, npmDrift, npmLookup, npmNames, npmUrl, ownerOf, ownersOf, packNoBuildinfo, packageFolders, pagesAfterRelease, pagesCalls, pagesSite, parseAdvisory, parseConfig, parseJsonc, parsePrivateNames, pathNameHit, pathsOf, pinnedGitDeps, pipeFails, playwrightInstall, prPathFilters, prePush, privateNamesFile, privatePatterns, privateTextBreaks, publishTextSafe, publishedMinor, publishedMinorRule, pushMainOnly, reachOf, readAction, readConfig, readJsonc, readOverlay, readWorkflow, releaseFiles, releaseNotes, replaceLine, repoOf, reposOf, repositoryIsPublic, repositoryOfRemote, requiredScripts, roadmapOfLine, roadmapParses, runCalls, runChecks, runCli, runFix, runGit, runnerBudget, scheduleMinute, scriptsOf, securityCallers, securityOneJob, serviceRunMain, setVersions, setupCue, sharedCi, sharedDocsRule, sharedNames, signaturesOf, siteCheckInCi, sourceMain, specifiersOf, startsTests, summaryMarkdown, summaryName, swallowsTests, tagName, testsRequired, trustPolicy, tsconfigTest, typedFiles, typedScripts, unreleasedChange, unreleasedChangeRule, versionTitle, withOneJob, workflowParses, workspaceGlobs, workspaceProtocol, yamlFaults };
|
|
69
|
+
export { ACTIONS_COMMIT, DEFAULT_ALLOWED, DEPENDENCY_FIELDS, GITHUB_YAML, HOMES, HOME_EXPORTS, HOME_PATTERNS, HOME_TIMEOUT_MS, HOOK_MARKER, IGNORE_AFTER, LICENSE_TEXTS, MAP_RULE, MAX_NOTES, NO_READ_LINE, NPM_REGISTRY, OWNERS, PAGES_WORKFLOWS, PRE_PUSH_HOOK, PRIVATE_NAMES_FILE_CONFIG, PRIVATE_NAMES_FILE_VARIABLE, PRIVATE_NAME_LIST, PRIVATE_PATTERNS_VARIABLE, PrivateNameListError, REAL_COMPARE, RULES, RULE_WARN_DAYS, SECURITY_SCAN_COMMIT, SECURITY_SCAN_INPUTS, SECURITY_TIMEOUT_MINUTES, SERVICE_PACKAGE, SHARED_ACTIONS, SHARED_CI, SHARED_WORKFLOWS, SHIPPED_FIELDS, STRICT_OPTIONS, TRAIN_SCOPES, UNSHIPPED_FILES, USAGE, annotations, apiReportScript, authorOf, blockHash, callsSharedCi, changelogSection, cleanPath, codePackages, configsOfScript, convertGate, coverageProvider, createContext, cuePreset, declaredName, defaultOptions, exportsRequire, findHomes, firstNameMatch, formatResult, gateAfterCancel, gateTrigger, githubFetch, globFolders, globToRegExp, hasFile, hasImportMetaMain, hasTests, hiddenFailures, homeModule, homePackage, inFolder, installHook, invalidPatternBreaks, isAllowedHit, isCommonUse, isGitSpecifier, isPinned, isSourcePath, jobFails, keyLine, licenseFile, licenseFileOf, lineNameHit, lineNameHits, lineOf, listRules, lockedVersions, mainCheck, mapMarkdown, mapText, matchesAny, mergeHomes, mergePrivateNames, messageOf, minorOf, mitText, moduleMessage, moduleUses, modulesOf, nameMatches, namedVersions, noBuildOutput, noLocalPaths, npmDrift, npmLookup, npmNames, npmUrl, ownerOf, ownersOf, packNoBuildinfo, packageFolders, pagesAfterRelease, pagesCalls, pagesSite, parseAdvisory, parseConfig, parseJsonc, parsePrivateNames, pathNameHit, pathsOf, pinnedGitDeps, pipeFails, playwrightInstall, prPathFilters, prePush, privateNamesFile, privateNamesFiles, privatePatterns, privateTextBreaks, publishTextSafe, publishedMinor, publishedMinorRule, pushMainOnly, reachOf, readAction, readConfig, readJsonc, readOverlay, readWorkflow, releaseFiles, releaseNotes, replaceLine, repoOf, reposOf, repositoryIsPublic, repositoryOfRemote, requiredScripts, roadmapOfLine, roadmapParses, runCalls, runChecks, runCli, runFix, runGit, runnerBudget, scheduleMinute, scriptsOf, securityCallers, securityOneJob, serviceRunMain, setVersions, setupCue, sharedCi, sharedDocsRule, sharedNames, signaturesOf, siteCheckInCi, sourceMain, specifiersOf, startsTests, summaryMarkdown, summaryName, swallowsTests, tagName, testsRequired, trustPolicy, tsconfigTest, typedFiles, typedScripts, unreleasedChange, unreleasedChangeRule, versionTitle, withOneJob, workflowParses, workspaceGlobs, workspaceProtocol, yamlFaults };
|
|
70
70
|
|
|
71
71
|
//# sourceMappingURL=index.js.map
|
|
@@ -3,7 +3,7 @@ import { OWNERS } from "./owners.js";
|
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import { spawnSync } from "node:child_process";
|
|
5
5
|
import { appendFileSync, chmodSync, existsSync, mkdirSync, readFileSync, readdirSync, statSync, writeFileSync } from "node:fs";
|
|
6
|
-
import { basename, dirname, extname, isAbsolute, join, posix, relative, resolve } from "node:path";
|
|
6
|
+
import { basename, delimiter, dirname, extname, isAbsolute, join, posix, relative, resolve } from "node:path";
|
|
7
7
|
import { SECRET_SHAPES, findSecretShapes, findSecretShapesInValue, redactSecretShapes } from "@mark1russell7/text/redact";
|
|
8
8
|
import { createHash } from "node:crypto";
|
|
9
9
|
import { parseAllDocuments } from "yaml";
|
|
@@ -1670,7 +1670,7 @@ const mainRunsFinish = {
|
|
|
1670
1670
|
{
|
|
1671
1671
|
repo: "private",
|
|
1672
1672
|
rule: "main-runs-finish",
|
|
1673
|
-
doc: "
|
|
1673
|
+
doc: "a decision of 2026-11-03: a run of main ends"
|
|
1674
1674
|
},
|
|
1675
1675
|
{
|
|
1676
1676
|
repo: "client",
|
|
@@ -1991,7 +1991,7 @@ const gateTrigger = {
|
|
|
1991
1991
|
sources: [{
|
|
1992
1992
|
repo: "private",
|
|
1993
1993
|
rule: "gate-trigger",
|
|
1994
|
-
doc: "
|
|
1994
|
+
doc: "a decision of 2026-11-02: a gate with paths feeds a required summary"
|
|
1995
1995
|
}],
|
|
1996
1996
|
options: { allow: {
|
|
1997
1997
|
type: "strings",
|
|
@@ -12867,7 +12867,7 @@ const homePackage = {
|
|
|
12867
12867
|
sources: [{
|
|
12868
12868
|
repo: "private",
|
|
12869
12869
|
rule: "direction-18",
|
|
12870
|
-
doc: "
|
|
12870
|
+
doc: "a decision of 2026-11-02: one map of homes, checked when the code is written"
|
|
12871
12871
|
}],
|
|
12872
12872
|
options: { scope: {
|
|
12873
12873
|
type: "string",
|
|
@@ -13004,7 +13004,7 @@ const homeModule = {
|
|
|
13004
13004
|
sources: [{
|
|
13005
13005
|
repo: "private",
|
|
13006
13006
|
rule: "home-module",
|
|
13007
|
-
doc: "
|
|
13007
|
+
doc: "a decision of 2026-11-15: a gate holds each move to a home"
|
|
13008
13008
|
}],
|
|
13009
13009
|
options: { scope: {
|
|
13010
13010
|
type: "string",
|
|
@@ -13572,7 +13572,7 @@ const mainCheck = {
|
|
|
13572
13572
|
sources: [{
|
|
13573
13573
|
repo: "private",
|
|
13574
13574
|
rule: "main-check",
|
|
13575
|
-
doc: "
|
|
13575
|
+
doc: "a decision of 2026-11-02: the main check through a link"
|
|
13576
13576
|
}],
|
|
13577
13577
|
options: {},
|
|
13578
13578
|
check(context) {
|
|
@@ -13831,6 +13831,27 @@ function parsePrivateNames(text) {
|
|
|
13831
13831
|
allow: allow.map((entry, index) => allowedOf(entry, `allow entry ${String(index + 1)} of ${PRIVATE_NAME_LIST}`, ids))
|
|
13832
13832
|
};
|
|
13833
13833
|
}
|
|
13834
|
+
/**
|
|
13835
|
+
* This function merges private name lists into one list, in order. The names of each list come after the names of the
|
|
13836
|
+
* lists before it. Thus the index of a name in a result counts across the lists. `parsePrivateNames` makes sure that an
|
|
13837
|
+
* entry of `allow` refers to a name of its own list. The function throws a `PrivateNameListError` when two lists have
|
|
13838
|
+
* the same id. Then an entry of `allow` can refer to the two names.
|
|
13839
|
+
*/
|
|
13840
|
+
function mergePrivateNames(lists) {
|
|
13841
|
+
const ids = /* @__PURE__ */ new Set();
|
|
13842
|
+
const names = [];
|
|
13843
|
+
lists.forEach((list, at) => {
|
|
13844
|
+
for (const rule of list.names) {
|
|
13845
|
+
if (ids.has(rule.id)) throw new PrivateNameListError(`name ${String(names.length + 1)} of ${PRIVATE_NAME_LIST} (list ${String(at + 1)}): the id is also the id of a name of an earlier list`);
|
|
13846
|
+
ids.add(rule.id);
|
|
13847
|
+
names.push(rule);
|
|
13848
|
+
}
|
|
13849
|
+
});
|
|
13850
|
+
return {
|
|
13851
|
+
names,
|
|
13852
|
+
allow: lists.flatMap((list) => list.allow)
|
|
13853
|
+
};
|
|
13854
|
+
}
|
|
13834
13855
|
/** The words before a name in code: a declaration, a type or an operator. */
|
|
13835
13856
|
const CODE_BEFORE = /\b(class|interface|type|new|extends|implements|const|let|enum|struct|typeof|instanceof|as)\s+$/;
|
|
13836
13857
|
/** A line of code that imports or exports names. */
|
|
@@ -14140,6 +14161,22 @@ function privateNamesFile(env, git) {
|
|
|
14140
14161
|
])?.trim() ?? "";
|
|
14141
14162
|
return fromGit === "" ? void 0 : fromGit;
|
|
14142
14163
|
}
|
|
14164
|
+
/**
|
|
14165
|
+
* This function gives the paths of the private name lists, in order. The environment variable
|
|
14166
|
+
* `CONVENTIONS_PRIVATE_NAMES_FILE` has priority. It has one path, or more paths with `separator` between them. The
|
|
14167
|
+
* default `separator` is the `delimiter` of `node:path`: `;` on Windows, `:` on other systems. Else, each value of the git
|
|
14168
|
+
* configuration `conventions.privateNamesFile` is a path. The function gives an empty array when neither has a value.
|
|
14169
|
+
*/
|
|
14170
|
+
function privateNamesFiles(env, git, separator = delimiter) {
|
|
14171
|
+
const fromEnv = (env["CONVENTIONS_PRIVATE_NAMES_FILE"] ?? "").split(separator).map((path) => path.trim()).filter((path) => path !== "");
|
|
14172
|
+
if (fromEnv.length > 0) return fromEnv;
|
|
14173
|
+
return (git([
|
|
14174
|
+
"config",
|
|
14175
|
+
"--type=path",
|
|
14176
|
+
"--get-all",
|
|
14177
|
+
"conventions.privateNamesFile"
|
|
14178
|
+
]) ?? "").split(/\r?\n/).map((path) => path.trim()).filter((path) => path !== "");
|
|
14179
|
+
}
|
|
14143
14180
|
/** This function gives a break for each private pattern that is not a valid regular expression. A break does not show the pattern. */
|
|
14144
14181
|
function invalidPatternBreaks(patterns) {
|
|
14145
14182
|
return patterns.filter((pattern) => compilePattern(pattern.source) === void 0).map((pattern) => ({
|
|
@@ -14755,7 +14792,7 @@ const publishTextSafe = {
|
|
|
14755
14792
|
{
|
|
14756
14793
|
repo: "private",
|
|
14757
14794
|
rule: "publish-text-safe",
|
|
14758
|
-
doc: "
|
|
14795
|
+
doc: "a decision of 2026-11-16: the publish document has no attack shape and no token"
|
|
14759
14796
|
}
|
|
14760
14797
|
],
|
|
14761
14798
|
options: {},
|
|
@@ -15688,7 +15725,7 @@ const runnerBudget = {
|
|
|
15688
15725
|
sources: [{
|
|
15689
15726
|
repo: "private",
|
|
15690
15727
|
rule: "runner-slots",
|
|
15691
|
-
doc: "
|
|
15728
|
+
doc: "a decision of 2026-10-30: the runner slots: a cap of 40, heavy work at most 28"
|
|
15692
15729
|
}],
|
|
15693
15730
|
options: {
|
|
15694
15731
|
maxParallel: {
|
|
@@ -16214,7 +16251,7 @@ const siteCheckInCi = {
|
|
|
16214
16251
|
sources: [{
|
|
16215
16252
|
repo: "private",
|
|
16216
16253
|
rule: "site-probe-in-ci",
|
|
16217
|
-
doc: "
|
|
16254
|
+
doc: "a decision of 2026-11-08: the site check of each pull request in CI OK"
|
|
16218
16255
|
}],
|
|
16219
16256
|
options: {
|
|
16220
16257
|
workflows: {
|
|
@@ -17250,7 +17287,7 @@ function publishedMinorRule(lookup = npmLookup, now = Date.now) {
|
|
|
17250
17287
|
sources: [{
|
|
17251
17288
|
repo: "private",
|
|
17252
17289
|
rule: "published-minor",
|
|
17253
|
-
doc: "
|
|
17290
|
+
doc: "a decision of 2026-11-04: a consumer behind a published minor"
|
|
17254
17291
|
}],
|
|
17255
17292
|
options: {
|
|
17256
17293
|
packages: {
|
|
@@ -17630,7 +17667,7 @@ const roadmapParses = {
|
|
|
17630
17667
|
sources: [{
|
|
17631
17668
|
repo: "private",
|
|
17632
17669
|
rule: "fail-closed",
|
|
17633
|
-
doc: "
|
|
17670
|
+
doc: "a decision of 2026-10-30: gates and probes fail closed"
|
|
17634
17671
|
}],
|
|
17635
17672
|
options: { roadmaps: {
|
|
17636
17673
|
type: "strings",
|
|
@@ -18209,7 +18246,7 @@ const testsRequired = {
|
|
|
18209
18246
|
sources: [{
|
|
18210
18247
|
repo: "private",
|
|
18211
18248
|
rule: "fail-closed",
|
|
18212
|
-
doc: "
|
|
18249
|
+
doc: "a decision of 2026-10-30: gates and probes fail closed"
|
|
18213
18250
|
}],
|
|
18214
18251
|
options: {},
|
|
18215
18252
|
check(context) {
|
|
@@ -18467,7 +18504,7 @@ const typedFiles = {
|
|
|
18467
18504
|
sources: [{
|
|
18468
18505
|
repo: "private",
|
|
18469
18506
|
rule: "fail-closed",
|
|
18470
|
-
doc: "
|
|
18507
|
+
doc: "a decision of 2026-10-30: gates and probes fail closed"
|
|
18471
18508
|
}],
|
|
18472
18509
|
options: { configs: {
|
|
18473
18510
|
type: "strings",
|
|
@@ -18593,7 +18630,7 @@ const typedScripts = {
|
|
|
18593
18630
|
sources: [{
|
|
18594
18631
|
repo: "private",
|
|
18595
18632
|
rule: "typed-everything",
|
|
18596
|
-
doc: "
|
|
18633
|
+
doc: "a decision of direction 15: each new script is TypeScript"
|
|
18597
18634
|
}],
|
|
18598
18635
|
options: {
|
|
18599
18636
|
javascript: {
|
|
@@ -18732,7 +18769,7 @@ const trustPolicy = {
|
|
|
18732
18769
|
sources: [{
|
|
18733
18770
|
repo: "private",
|
|
18734
18771
|
rule: "trust-policy",
|
|
18735
|
-
doc: "
|
|
18772
|
+
doc: "a decision of 2026-11-01: release age and trust policy"
|
|
18736
18773
|
}],
|
|
18737
18774
|
options: {
|
|
18738
18775
|
exclude: {
|
|
@@ -19583,30 +19620,42 @@ function repoOfPush(options) {
|
|
|
19583
19620
|
* This function is the command `conventions pre-push`. It examines each new commit of the push: its message, the paths
|
|
19584
19621
|
* that it adds or changes, and each line that it adds. It writes the breaks to `stderr`, and gives the exit code: 1 on a
|
|
19585
19622
|
* break, 0 on a pass. With no private name list and no private pattern, it writes the line `NO_READ_LINE` and gives 0.
|
|
19623
|
+
* The settings can name more than one list (`privateNamesFiles`). The command then examines the merge of the lists.
|
|
19586
19624
|
*/
|
|
19587
19625
|
function prePush(options, io) {
|
|
19588
19626
|
const readFile = options.readFile ?? ((path) => readFileSync(path, "utf8"));
|
|
19589
|
-
const
|
|
19627
|
+
const files = privateNamesFiles(options.env, options.git);
|
|
19590
19628
|
const patterns = privatePatterns(options.env);
|
|
19591
|
-
if (
|
|
19629
|
+
if (files.length === 0 && patterns.length === 0) {
|
|
19592
19630
|
io.stderr(`${NO_READ_LINE}\n`);
|
|
19593
19631
|
return 0;
|
|
19594
19632
|
}
|
|
19595
19633
|
let names;
|
|
19596
|
-
if (
|
|
19597
|
-
const source = (options.env["CONVENTIONS_PRIVATE_NAMES_FILE"]
|
|
19598
|
-
|
|
19599
|
-
|
|
19600
|
-
|
|
19601
|
-
|
|
19602
|
-
|
|
19603
|
-
|
|
19634
|
+
if (files.length > 0) {
|
|
19635
|
+
const source = privateNamesFiles({ ["CONVENTIONS_PRIVATE_NAMES_FILE"]: options.env["CONVENTIONS_PRIVATE_NAMES_FILE"] }, () => void 0).length > 0 ? PRIVATE_NAMES_FILE_VARIABLE : `the git config ${PRIVATE_NAMES_FILE_CONFIG}`;
|
|
19636
|
+
const lists = [];
|
|
19637
|
+
for (const [at, file] of files.entries()) {
|
|
19638
|
+
const which = files.length === 1 ? `the private name list that ${source} names` : `private name list ${String(at + 1)} of the ${String(files.length)} that ${source} names`;
|
|
19639
|
+
let text;
|
|
19640
|
+
try {
|
|
19641
|
+
text = readFile(resolve(options.root, file));
|
|
19642
|
+
} catch (error) {
|
|
19643
|
+
io.stderr(`conventions pre-push: Cannot read ${which}: ${readReason(error)}. Correct the setting or the file. The push stops.\n`);
|
|
19644
|
+
return 1;
|
|
19645
|
+
}
|
|
19646
|
+
try {
|
|
19647
|
+
lists.push(parsePrivateNames(text));
|
|
19648
|
+
} catch (error) {
|
|
19649
|
+
const reason = error instanceof PrivateNameListError ? error.reason : "the parse failed";
|
|
19650
|
+
io.stderr(`conventions pre-push: ${which.charAt(0).toUpperCase()}${which.slice(1)} is not valid: ${reason}. Correct the file. The push stops.\n`);
|
|
19651
|
+
return 1;
|
|
19652
|
+
}
|
|
19604
19653
|
}
|
|
19605
19654
|
try {
|
|
19606
|
-
names =
|
|
19655
|
+
names = mergePrivateNames(lists);
|
|
19607
19656
|
} catch (error) {
|
|
19608
|
-
const reason = error instanceof PrivateNameListError ? error.reason : "the
|
|
19609
|
-
io.stderr(`conventions pre-push: The private name
|
|
19657
|
+
const reason = error instanceof PrivateNameListError ? error.reason : "the merge failed";
|
|
19658
|
+
io.stderr(`conventions pre-push: The private name lists that ${source} names are not valid together: ${reason}. Give each name its own id. The push stops.\n`);
|
|
19610
19659
|
return 1;
|
|
19611
19660
|
}
|
|
19612
19661
|
}
|
|
@@ -20242,6 +20291,6 @@ function runHook(args, io) {
|
|
|
20242
20291
|
git: (gitArgs) => runGit(io.cwd, gitArgs)
|
|
20243
20292
|
}, io);
|
|
20244
20293
|
}
|
|
20245
|
-
export { unreleasedChangeRule as $,
|
|
20294
|
+
export { unreleasedChangeRule as $, hasFile as $n, licenseFileOf as $t, typedFiles as A, callsSharedCi as An, privateNamesFiles as At, roadmapParses as B, convertGate as Bn, mergePrivateNames as Bt, versionTitle as C, runCalls as Cn, HOME_PATTERNS as Ct, typedScripts as D, SHARED_ACTIONS as Dn, invalidPatternBreaks as Dt, trustPolicy as E, tsconfigTest as En, PRIVATE_PATTERNS_VARIABLE as Et, HOME_TIMEOUT_MS as F, SECURITY_TIMEOUT_MINUTES as Fn, firstNameMatch as Ft, publishedMinor as G, readAction as Gn, REAL_COMPARE as Gt, releaseFiles as H, prPathFilters as Hn, parsePrivateNames as Ht, blockHash as I, securityCallers as In, isAllowedHit as It, NPM_REGISTRY as J, cuePreset as Jn, coverageProvider as Jt, publishedMinorRule as K, readWorkflow as Kn, hasImportMetaMain as Kt, githubFetch as L, securityOneJob as Ln, isCommonUse as Lt, isSourcePath as M, setupCue as Mn, privateTextBreaks as Mt, pathsOf as N, SECURITY_SCAN_COMMIT as Nn, PRIVATE_NAME_LIST as Nt, configsOfScript as O, SHARED_CI as On, noLocalPaths as Ot, sourceMain as P, SECURITY_SCAN_INPUTS as Pn, PrivateNameListError as Pt, unreleasedChange as Q, codePackages as Qn, licenseFile as Qt, sharedDocsRule as R, withOneJob as Rn, lineNameHit as Rt, setVersions as S, SERVICE_PACKAGE as Sn, DEFAULT_ALLOWED as St, TRAIN_SCOPES as T, hasTests as Tn, PRIVATE_NAMES_FILE_VARIABLE as Tt, lockedVersions as U, summaryName as Un, pathNameHit as Ut, requiredScripts as V, gateTrigger as Vn, nameMatches as Vt, minorOf as W, gateAfterCancel as Wn, noBuildOutput as Wt, UNSHIPPED_FILES as X, RULE_WARN_DAYS as Xn, LICENSE_TEXTS as Xt, SHIPPED_FIELDS as Y, DEPENDENCY_FIELDS as Yn, apiReportScript as Yt, npmLookup as Z, cleanPath as Zn, authorOf as Zt, workspaceProtocol as _, mapText as _n, pagesCalls as _t, listRules as a, modulesOf as an, readJsonc as ar, swallowsTests as at, yamlFaults as b, npmNames as bn, publishTextSafe as bt, runCli as c, messageOf as cn, specifiersOf as cr, isPinned as ct, HOOK_MARKER as d, signaturesOf as dn, pagesAfterRelease as dt, mitText as en, inFolder as er, playwrightInstall as et, NO_READ_LINE as f, HOME_EXPORTS as fn, repositoryOfRemote as ft, RULES as g, mapMarkdown as gn, PAGES_WORKFLOWS as gt, prePush as h, findHomes as hn, pushMainOnly as ht, formatResult as i, moduleUses as in, parseJsonc as ir, startsTests as it, testsRequired as j, sharedCi as jn, privatePatterns as jt, scriptsOf as k, SHARED_WORKFLOWS as kn, privateNamesFile as kt, runFix as l, repoOf as ln, defaultOptions as lr, pinnedGitDeps as lt, installHook as m, MAP_RULE as mn, scheduleMinute as mt, annotations as n, homeModule as nn, lineOf as nr, jobFails as nt, readConfig as o, declaredName as on, replaceLine as or, pipeFails as ot, PRE_PUSH_HOOK as p, HOMES as pn, runnerBudget as pt, reachOf as q, STRICT_OPTIONS as qn, mainCheck as qt, createContext as r, moduleMessage as rn, matchesAny as rr, parseAdvisory as rt, runChecks as s, homePackage as sn, runGit as sr, isGitSpecifier as st, USAGE as t, repositoryIsPublic as tn, keyLine as tr, hiddenFailures as tt, summaryMarkdown as u, reposOf as un, parseConfig as ur, siteCheckInCi as ut, GITHUB_YAML as v, mergeHomes as vn, pagesSite as vt, IGNORE_AFTER as w, serviceRunMain as wn, PRIVATE_NAMES_FILE_CONFIG as wt, namedVersions as x, readOverlay as xn, packNoBuildinfo as xt, workflowParses as y, npmDrift as yn, exportsRequire as yt, roadmapOfLine as z, ACTIONS_COMMIT as zn, lineNameHits as zt };
|
|
20246
20295
|
|
|
20247
|
-
//# sourceMappingURL=run-
|
|
20296
|
+
//# sourceMappingURL=run-BLJCc6nt.js.map
|