@mark1russell7/conventions 0.52.2 → 0.52.4
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 -0
- package/build/cli.js +1 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +1 -1
- package/build/{run-z_zuxE9M.js → run-DfHH0aZb.js} +412 -9
- package/build/run-DfHH0aZb.js.map +1 -0
- package/package.json +1 -1
- package/build/run-z_zuxE9M.js.map +0 -1
package/README.md
CHANGED
|
@@ -81,6 +81,7 @@ The rules come from the invariants audit of 2026-10-26 (strategy item s38). The
|
|
|
81
81
|
| `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. |
|
|
82
82
|
| `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). |
|
|
83
83
|
| `moved-repo-calls` | No `uses:` of a workflow or composite action names a repository by its old owner after the repository moved. GitHub does not follow the redirect of a moved repository for `uses:`, so each run fails before it starts ("workflow file issue"). The package knows the moves (`src/moves.ts`), and the option `moves` adds more (`owner/name=owner/name`). `conventions fix` writes the new owner. The rule fails from 2026-12-09. | ireko #133 (2026-11-24). |
|
|
84
|
+
| `moved-repo-names` | No package field, Markdown link, workflow key or config value names a repository by its old owner after the repository moved. Some old names break at once: npm provenance compares the field `repository` of `package.json` with the repository of the run, and a GitHub Pages address of the old owner gives 404. The kinds of place are data (`src/places.ts`): the fields and git dependencies of each `package.json`, the links of each Markdown file except a change log, the addresses and the key `repository` of each workflow, and the key `repo` of the config of Changesets. The rule `moved-repo-calls` holds `uses:`. The option `moves` adds more moves. `conventions fix` writes the new owner. The rule fails from 2026-12-10. | private `repo-move-tool` (a decision of 2026-11-25). |
|
|
84
85
|
| `schedule-literals` | In a workflow that reads `github.event.schedule`, each cron in quotes is a cron of its own `on.schedule`. A scheduled run gives the cron that started it, so an old copy of a cron matches no run. `conventions fix` writes the cron when the file has one cron that no comparison names and one copy that no schedule has. The rule fails from 2026-12-09. | systems #669 (2026-11-24). |
|
|
85
86
|
| `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). |
|
|
86
87
|
| `summary-job` | Each gate workflow (`ci.yml`, `security.yml`) that starts on pull requests has one summary job `<Name> OK` that needs each of its jobs. The ruleset names only the summary checks. Without them, it must name each job: then it does not wait for a new job, and a renamed job blocks each pull request. On 2026-11-09, 21 of 43 public repositories had a gate with no summary job. | private `summary-job` (a decision of 2026-11-09). |
|
|
@@ -193,6 +194,8 @@ An unknown rule, an unknown option, or an exception or a changed option without
|
|
|
193
194
|
| `pre-push <remote> [<url>]` | Examine the new commits of a push with the private name list. The git hook `pre-push` starts it. |
|
|
194
195
|
| `pre-push --base <ref> [--head <ref>]` | Examine the commits of `<base>..<head>` (the default head is `HEAD`) and the text of the pull request of the run, with the same rules. The shared CI starts a bundle of this command before the install. |
|
|
195
196
|
| `hook install` | Write the git hook `pre-push`. In CI, or outside a git repository, the command does nothing. |
|
|
197
|
+
| `move plan <owner/name=owner/name>...` | Show each place of the repository that names a moved repository by its old name, and the steps of the move that no file holds. `--known` adds the moves that the package knows. `--json` writes the plan as JSON. No file changes. |
|
|
198
|
+
| `move apply <owner/name=owner/name>...` | Write the new name in each place of the plan, and show the plan that stays. |
|
|
196
199
|
|
|
197
200
|
A run that `workflow_dispatch` starts has no pull request in its event file. A person can start the gates of a pull request in this way. For such a run, the shared CI finds the pull request of the branch, and gives two environment variables to the check:
|
|
198
201
|
|
|
@@ -203,6 +206,20 @@ A run that `workflow_dispatch` starts has no pull request in its event file. A p
|
|
|
203
206
|
|
|
204
207
|
With the two variables, the rules `release-files`, `unreleased-change`, `home-package`, `home-module`, `version-title` and `no-local-paths` examine the change of the pull request, as on a `pull_request` run.
|
|
205
208
|
|
|
209
|
+
## A move of a repository
|
|
210
|
+
|
|
211
|
+
Before or after a repository moves to a new owner, `conventions move plan` shows the work of the move in one list:
|
|
212
|
+
|
|
213
|
+
```sh
|
|
214
|
+
conventions move plan mark1russell7/vex=metrograph-labs/vex
|
|
215
|
+
conventions move apply mark1russell7/vex=metrograph-labs/vex
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
The plan has two parts:
|
|
219
|
+
|
|
220
|
+
- **The places.** Each line of a file that names the old name. The kinds are the fields of `package.json`, the links of Markdown (not a change log), the keys of workflows and the Changesets config. The `uses:` lines of workflows and actions are places too. These are the places of the rules `moved-repo-names` and `moved-repo-calls`, so the plan and the gate agree. `move apply` writes each one.
|
|
221
|
+
- **The steps that no file holds.** A trusted publisher on npm for the new repository, when a `package.json` names the old name. The new GitHub Pages address, when a file names the old address. The `uses:` lines of the repositories that call this one, and the remote of each clone. Each step is data in `MOVE_STEPS`.
|
|
222
|
+
|
|
206
223
|
## The private name list and the hook `pre-push`
|
|
207
224
|
|
|
208
225
|
A private name must not get into a public repository. The private names are in a private name list, outside of the public repositories. The git hook `pre-push` examines each push with that list, on the computer of the push.
|
package/build/cli.js
CHANGED
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-gate.ts","../src/rules/security-one-job.ts","../src/rules/summary-job.ts","../src/rules/setup-cue.ts","../src/rules/shared-ci.ts","../src/rules/service-run-main.ts","../src/map.ts","../src/rules/home-module.ts","../src/rules/home-package.ts","../src/rules/license-file.ts","../src/rules/coverage-provider.ts","../src/rules/main-check.ts","../src/rules/no-build-output.ts","../src/private-names.ts","../src/rules/no-local-paths.ts","../src/rules/pack-no-buildinfo.ts","../src/rules/publish-text-safe.ts","../src/rules/exports-require.ts","../src/rules/api-report-script.ts","../src/rules/pages-after-release.ts","../src/rules/pages-site.ts","../src/rules/site-check-in-ci.ts","../src/rules/pinned-git-deps.ts","../src/rules/pipe-fails.ts","../src/rules/job-fails.ts","../src/rules/playwright-install.ts","../src/rules/push-main-only.ts","../src/rules/unreleased-change.ts","../src/rules/published-minor.ts","../src/rules/release-files.ts","../src/rules/required-scripts.ts","../src/rules/roadmap-parses.ts","../src/rules/runner-budget.ts","../src/workflow.ts","../src/rules/runner-peak.ts","../src/rules/shared-docs.ts","../src/rules/source-main.ts","../src/rules/tests-required.ts","../src/rules/tsconfig-test.ts","../src/rules/typed-files.ts","../src/rules/typed-scripts.ts","../src/rules/trust-policy.ts","../src/rules/version-title.ts","../src/rules/workflow-parses.ts","../src/rules/workspace-protocol.ts","../src/rules/index.ts","../src/run.ts","../src/pre-push.ts","../src/workflow-expression.ts","../src/home-exports.ts","../src/release-text.ts"],"mappings":";;;;;;;;;;;;;;;;;;UASiB;WACN;WACA;WACA;;;UAIM;;WAEN;;WAEA;WACA;;WAEA;;WAEA,iBAAiB;;;;;;UAOX;;WAEN;;WAEA;;WAEA;;;wBAIK,YAAY,cAAc,cAAc;;KAQ5C;;KAGA,UAAU,SAAS,eAAe;;UAG7B;WACN;WACA,SAAS;WACT;;;KAIC,WAAW,SAAS;;UAGf;;WAEN;;WAEA;;WAEA;;WAEA;WACA,UAAU;;;UAIJ;;WAEN;;WAEA,aAAa;;WAEb,mBAAmB;;W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src/config.ts","../src/rules/cue-preset.ts","../src/rules/gate-after-cancel.ts","../src/rules/gate-trigger.ts","../src/rules/security-gate.ts","../src/rules/security-one-job.ts","../src/rules/summary-job.ts","../src/rules/setup-cue.ts","../src/rules/shared-ci.ts","../src/rules/service-run-main.ts","../src/map.ts","../src/rules/home-module.ts","../src/rules/home-package.ts","../src/rules/license-file.ts","../src/rules/coverage-provider.ts","../src/rules/main-check.ts","../src/rules/no-build-output.ts","../src/private-names.ts","../src/rules/no-local-paths.ts","../src/rules/pack-no-buildinfo.ts","../src/rules/publish-text-safe.ts","../src/rules/exports-require.ts","../src/rules/api-report-script.ts","../src/rules/pages-after-release.ts","../src/rules/pages-site.ts","../src/rules/site-check-in-ci.ts","../src/rules/pinned-git-deps.ts","../src/rules/pipe-fails.ts","../src/rules/job-fails.ts","../src/rules/playwright-install.ts","../src/rules/push-main-only.ts","../src/rules/unreleased-change.ts","../src/rules/published-minor.ts","../src/rules/release-files.ts","../src/rules/required-scripts.ts","../src/rules/roadmap-parses.ts","../src/rules/runner-budget.ts","../src/workflow.ts","../src/rules/runner-peak.ts","../src/rules/shared-docs.ts","../src/rules/source-main.ts","../src/rules/tests-required.ts","../src/rules/tsconfig-test.ts","../src/rules/typed-files.ts","../src/rules/typed-scripts.ts","../src/rules/trust-policy.ts","../src/rules/version-title.ts","../src/rules/workflow-parses.ts","../src/rules/workspace-protocol.ts","../src/rules/index.ts","../src/run.ts","../src/pre-push.ts","../src/workflow-expression.ts","../src/home-exports.ts","../src/release-text.ts"],"mappings":";;;;;;;;;;;;;;;;;;UASiB;WACN;WACA;WACA;;;UAIM;;WAEN;;WAEA;WACA;;WAEA;;WAEA,iBAAiB;;;;;;UAOX;;WAEN;;WAEA;;WAEA;;;wBAIK,YAAY,cAAc,cAAc;;KAQ5C;;KAGA,UAAU,SAAS,eAAe;;UAG7B;WACN;WACA,SAAS;WACT;;;KAIC,WAAW,SAAS;;UAGf;;WAEN;;WAEA;;WAEA;;WAEA;WACA,UAAU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iB;;;;;;;;wBAavC,iBAAiB,kBAAkB,iBAAiB;;wBA+BpD,OAAO,cAAc;;;;;wBAQrB,aAAa,cAAc,iBAAiB"}
|
package/build/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as requiredScripts, $n as LICENSE_TEXTS, $t as noBuildOutput, A as scriptsOf, An as SHARED_ACTIONS, Ar as parseJsonc, At as packNoBuildinfo, B as TEMPLATE_CALLED, Bn as SUMMARY_GATES, Br as parseRuleConfig, Bt as privatePatterns, C as setVersions, Cn as npmNames, Cr as codePackages, Ct as pagesAfterRelease, D as trustPolicy, Dn as serviceRunMain, Dr as lineOf, Dt as pagesSite, E as TRAIN_SCOPES, En as runCalls, Er as keyLine, Et as pagesCalls, F as sourceMain, Fn as setupCue, Fr as runGitShow, Ft as PRIVATE_PATTERNS_VARIABLE, G as runnerPeak, Gn as SECURITY_SCAN_COMMIT, Gt as isAllowedHit, H as calledJobs, Hn as hasSummaryJob, Ht as PRIVATE_NAME_LIST, I as HOME_TIMEOUT_MS, In as SECURITY_FILE, Ir as showFiles, It as invalidPatternBreaks, J as evaluateExpression, Jn as securityCallers, Jt as lineNameHits, K as runsAtOnce, Kn as SECURITY_SCAN_INPUTS, Kt as isCommonUse, L as blockHash, Ln as isSecurityGate, Lr as specifiersOf, Lt as noLocalPaths, M as testsRequired, Mn as SHARED_WORKFLOWS, Mr as replaceLine, Mt as HOME_PATTERNS, N as isSourcePath, Nn as callsSharedCi, Nr as repositoryOfRemote, Nt as PRIVATE_NAMES_FILE_CONFIG, O as typedScripts, On as hasTests, Or as matchesAny, Ot as exportsRequire, P as pathsOf, Pn as sharedCi, Pr as runGit, Pt as PRIVATE_NAMES_FILE_VARIABLE, Q as roadmapParses, Qn as scheduleMinute, Qt as pathNameHit, R as githubFetch, Rn as securityGate, Rr as defaultOptions, Rt as privateNamesFile, S as namedVersions, Sn as npmDrift, Sr as cleanPath, St as siteCheckInCi, T as IGNORE_AFTER, Tn as SERVICE_PACKAGE, Tr as inFolder, Tt as PAGES_WORKFLOWS, U as eventClass, Un as startsOnPullRequest, Ut as PrivateNameListError, V as UNKNOWN_MATRIX_JOBS, Vn as addSummaryJob, Vt as privateTextBreaks, W as matrixPeak, Wn as summaryJobRule, Wt as firstNameMatch, X as mayRun, Xn as withOneJob, Xt as nameMatches, Y as groupParts, Yn as securityOneJob, Yt as mergePrivateNames, Z as roadmapOfLine, Zn as runnerBudget, Zt as parsePrivateNames, _ as runPrePushArgs, _n as MAP_RULE, _r as yamlFaults, _t as swallowsTests, a as listRules, an as homeModule, ar as ACTIONS_COMMIT, at as reachOf, b as GITHUB_YAML, bn as mapText, br as DEPENDENCY_FIELDS, bt as isPinned, c as runCli, cn as modulesOf, cr as prPathFilters, ct as UNSHIPPED_FILES, d as HOOK_MARKER, dn as messageOf, dr as summaryName, dt as unreleasedChangeRule, en as REAL_COMPARE, er as authorOf, et as releaseFiles, f as NO_READ_LINE, fn as repoOf, fr as gateAfterCancel, ft as playwrightInstall, g as prePush, gn as HOMES, gr as readWorkflow, gt as startsTests, h as parsePrePushArgs, hn as HOME_EXPORTS, hr as readAction, ht as parseAdvisory, i as formatResult, in as apiReportScript, ir as repositoryIsPublic, it as publishedMinorRule, j as typedFiles, jn as SHARED_CI, jr as readJsonc, jt as DEFAULT_ALLOWED, k as configsOfScript, kn as tsconfigTest, kr as parseCatFileBatch, kt as publishTextSafe, l as runFix, ln as declaredName, lr as skippableJobs, lt as npmLookup, m as installHook, mn as signaturesOf, mr as parseWorkflow, mt as jobFails, n as annotations, nn as mainCheck, nr as licenseFileOf, nt as minorOf, o as readConfig, on as moduleMessage, or as convertGate, ot as NPM_REGISTRY, p as PRE_PUSH_HOOK, pn as reposOf, pr as MATRIX_EXPAND_MAX, pt as hiddenFailures, q as workflowPeaks, qn as SECURITY_TIMEOUT_MINUTES, qt as lineNameHit, r as createContext, rn as coverageProvider, rr as mitText, rt as publishedMinor, s as runChecks, sn as moduleUses, sr as gateTrigger, st as SHIPPED_FIELDS, t as USAGE, tn as hasImportMetaMain, tr as licenseFile, tt as lockedVersions, u as summaryMarkdown, un as homePackage, ur as summaryJob, ut as unreleasedChange, v as RULES, vn as findHomes, vr as STRICT_OPTIONS, vt as pipeFails, w as versionTitle, wn as readOverlay, wr as hasFile, wt as pushMainOnly, x as workflowParses, xn as mergeHomes, xr as RULE_WARN_DAYS, xt as pinnedGitDeps, y as workspaceProtocol, yn as mapMarkdown, yr as cuePreset, yt as isGitSpecifier, z as sharedDocsRule, zn as securityWorkflow, zr as parseConfig, zt as privateNamesFiles } from "./run-
|
|
1
|
+
import { $ as requiredScripts, $n as LICENSE_TEXTS, $t as noBuildOutput, A as scriptsOf, An as SHARED_ACTIONS, Ar as parseJsonc, At as packNoBuildinfo, B as TEMPLATE_CALLED, Bn as SUMMARY_GATES, Br as parseRuleConfig, Bt as privatePatterns, C as setVersions, Cn as npmNames, Cr as codePackages, Ct as pagesAfterRelease, D as trustPolicy, Dn as serviceRunMain, Dr as lineOf, Dt as pagesSite, E as TRAIN_SCOPES, En as runCalls, Er as keyLine, Et as pagesCalls, F as sourceMain, Fn as setupCue, Fr as runGitShow, Ft as PRIVATE_PATTERNS_VARIABLE, G as runnerPeak, Gn as SECURITY_SCAN_COMMIT, Gt as isAllowedHit, H as calledJobs, Hn as hasSummaryJob, Ht as PRIVATE_NAME_LIST, I as HOME_TIMEOUT_MS, In as SECURITY_FILE, Ir as showFiles, It as invalidPatternBreaks, J as evaluateExpression, Jn as securityCallers, Jt as lineNameHits, K as runsAtOnce, Kn as SECURITY_SCAN_INPUTS, Kt as isCommonUse, L as blockHash, Ln as isSecurityGate, Lr as specifiersOf, Lt as noLocalPaths, M as testsRequired, Mn as SHARED_WORKFLOWS, Mr as replaceLine, Mt as HOME_PATTERNS, N as isSourcePath, Nn as callsSharedCi, Nr as repositoryOfRemote, Nt as PRIVATE_NAMES_FILE_CONFIG, O as typedScripts, On as hasTests, Or as matchesAny, Ot as exportsRequire, P as pathsOf, Pn as sharedCi, Pr as runGit, Pt as PRIVATE_NAMES_FILE_VARIABLE, Q as roadmapParses, Qn as scheduleMinute, Qt as pathNameHit, R as githubFetch, Rn as securityGate, Rr as defaultOptions, Rt as privateNamesFile, S as namedVersions, Sn as npmDrift, Sr as cleanPath, St as siteCheckInCi, T as IGNORE_AFTER, Tn as SERVICE_PACKAGE, Tr as inFolder, Tt as PAGES_WORKFLOWS, U as eventClass, Un as startsOnPullRequest, Ut as PrivateNameListError, V as UNKNOWN_MATRIX_JOBS, Vn as addSummaryJob, Vt as privateTextBreaks, W as matrixPeak, Wn as summaryJobRule, Wt as firstNameMatch, X as mayRun, Xn as withOneJob, Xt as nameMatches, Y as groupParts, Yn as securityOneJob, Yt as mergePrivateNames, Z as roadmapOfLine, Zn as runnerBudget, Zt as parsePrivateNames, _ as runPrePushArgs, _n as MAP_RULE, _r as yamlFaults, _t as swallowsTests, a as listRules, an as homeModule, ar as ACTIONS_COMMIT, at as reachOf, b as GITHUB_YAML, bn as mapText, br as DEPENDENCY_FIELDS, bt as isPinned, c as runCli, cn as modulesOf, cr as prPathFilters, ct as UNSHIPPED_FILES, d as HOOK_MARKER, dn as messageOf, dr as summaryName, dt as unreleasedChangeRule, en as REAL_COMPARE, er as authorOf, et as releaseFiles, f as NO_READ_LINE, fn as repoOf, fr as gateAfterCancel, ft as playwrightInstall, g as prePush, gn as HOMES, gr as readWorkflow, gt as startsTests, h as parsePrePushArgs, hn as HOME_EXPORTS, hr as readAction, ht as parseAdvisory, i as formatResult, in as apiReportScript, ir as repositoryIsPublic, it as publishedMinorRule, j as typedFiles, jn as SHARED_CI, jr as readJsonc, jt as DEFAULT_ALLOWED, k as configsOfScript, kn as tsconfigTest, kr as parseCatFileBatch, kt as publishTextSafe, l as runFix, ln as declaredName, lr as skippableJobs, lt as npmLookup, m as installHook, mn as signaturesOf, mr as parseWorkflow, mt as jobFails, n as annotations, nn as mainCheck, nr as licenseFileOf, nt as minorOf, o as readConfig, on as moduleMessage, or as convertGate, ot as NPM_REGISTRY, p as PRE_PUSH_HOOK, pn as reposOf, pr as MATRIX_EXPAND_MAX, pt as hiddenFailures, q as workflowPeaks, qn as SECURITY_TIMEOUT_MINUTES, qt as lineNameHit, r as createContext, rn as coverageProvider, rr as mitText, rt as publishedMinor, s as runChecks, sn as moduleUses, sr as gateTrigger, st as SHIPPED_FIELDS, t as USAGE, tn as hasImportMetaMain, tr as licenseFile, tt as lockedVersions, u as summaryMarkdown, un as homePackage, ur as summaryJob, ut as unreleasedChange, v as RULES, vn as findHomes, vr as STRICT_OPTIONS, vt as pipeFails, w as versionTitle, wn as readOverlay, wr as hasFile, wt as pushMainOnly, x as workflowParses, xn as mergeHomes, xr as RULE_WARN_DAYS, xt as pinnedGitDeps, y as workspaceProtocol, yn as mapMarkdown, yr as cuePreset, yt as isGitSpecifier, z as sharedDocsRule, zn as securityWorkflow, zr as parseConfig, zt as privateNamesFiles } from "./run-DfHH0aZb.js";
|
|
2
2
|
import { OWNERS, ownerOf, ownersOf, repoKeyer, sharedNames } from "./owners.js";
|
|
3
3
|
import { a as packageFolders, i as isWorkspaceFolder, l as workspaceGlobs, n as globFolders, o as parseWorkspaceGlobs, r as globToRegExp } from "./workspace-_CIq-8ei.js";
|
|
4
4
|
// src/release-text.ts
|
|
@@ -3265,7 +3265,7 @@ const securityGate = {
|
|
|
3265
3265
|
* GitHub fails at times with a 504, and a bare `curl` then fails the job.
|
|
3266
3266
|
*/
|
|
3267
3267
|
/** The files of a composite action. */
|
|
3268
|
-
const ACTION$
|
|
3268
|
+
const ACTION$5 = /^\.github\/actions\/.+\/action\.ya?ml$/;
|
|
3269
3269
|
/** The action of the template itself. It is the one place with the download. */
|
|
3270
3270
|
const SHARED_ACTION$1 = ".github/actions/setup-cue/action.yml";
|
|
3271
3271
|
/** A hand-written install of the cue CLI: a download of a release asset, or a build with `go install`. */
|
|
@@ -3312,7 +3312,7 @@ const setupCue = {
|
|
|
3312
3312
|
const files = context.gitFiles();
|
|
3313
3313
|
if (files === void 0) return { skipped: "the root is not in a git repository" };
|
|
3314
3314
|
const breaks = [];
|
|
3315
|
-
for (const file of files.filter((path) => (WORKFLOW$1.test(path) || ACTION$
|
|
3315
|
+
for (const file of files.filter((path) => (WORKFLOW$1.test(path) || ACTION$5.test(path)) && path !== SHARED_ACTION$1).sort(byCode)) {
|
|
3316
3316
|
let text;
|
|
3317
3317
|
try {
|
|
3318
3318
|
text = readFileSync(join(context.root, file), "utf8");
|
|
@@ -3380,7 +3380,7 @@ const SHARED_ACTIONS = [
|
|
|
3380
3380
|
/** The `uses` value of a job that calls the shared CI, with no pin. */
|
|
3381
3381
|
const SHARED_CI = "mark1russell7/template/.github/workflows/reusable-ci.yml";
|
|
3382
3382
|
/** The action folder of a path: `.github/actions/<name>/action.yml` gives `<name>`. */
|
|
3383
|
-
const ACTION$
|
|
3383
|
+
const ACTION$4 = /^\.github\/actions\/([^/]+)\//;
|
|
3384
3384
|
/** The file name of a path. */
|
|
3385
3385
|
const baseName = (path) => path.slice(path.lastIndexOf("/") + 1);
|
|
3386
3386
|
/** This function tells if a job of a workflow text uses the shared CI of the template. */
|
|
@@ -3444,7 +3444,7 @@ const sharedCi = {
|
|
|
3444
3444
|
});
|
|
3445
3445
|
const actions = /* @__PURE__ */ new Set();
|
|
3446
3446
|
for (const file of files) {
|
|
3447
|
-
const folder = ACTION$
|
|
3447
|
+
const folder = ACTION$4.exec(file)?.[1];
|
|
3448
3448
|
if (folder !== void 0 && SHARED_ACTIONS.includes(folder) && !actions.has(folder)) {
|
|
3449
3449
|
actions.add(folder);
|
|
3450
3450
|
breaks.push({
|
|
@@ -17716,7 +17716,7 @@ function movedTo(repo, moves) {
|
|
|
17716
17716
|
* Each run of the workflow then fails before it starts ("workflow file issue"), and no job shows why.
|
|
17717
17717
|
*/
|
|
17718
17718
|
/** The files of a composite action. */
|
|
17719
|
-
const ACTION$
|
|
17719
|
+
const ACTION$3 = /^\.github\/actions\/.+\/action\.ya?ml$/;
|
|
17720
17720
|
/** The value of `uses:` that names another repository: `owner/name`, then a path or nothing, then `@` and the ref. */
|
|
17721
17721
|
const REMOTE = /^([\w.-]+)\/([\w.-]+)(\/[^@\s]*)?@\S+$/;
|
|
17722
17722
|
/** This function gives each `uses:` of a workflow or an action that names another repository. A local path (`./`) and a Docker image (`docker://`) are not calls of a repository. */
|
|
@@ -17772,7 +17772,7 @@ const movedRepoCalls = {
|
|
|
17772
17772
|
if (bad !== void 0) return { skipped: `the option moves has "${bad.text}", which is not in the form owner/name=owner/name` };
|
|
17773
17773
|
const moves = [...MOVES, ...extra.map((each) => each.move)];
|
|
17774
17774
|
const breaks = [];
|
|
17775
|
-
for (const file of files.filter((path) => WORKFLOW$1.test(path) || ACTION$
|
|
17775
|
+
for (const file of files.filter((path) => WORKFLOW$1.test(path) || ACTION$3.test(path)).sort(byCode)) {
|
|
17776
17776
|
let text;
|
|
17777
17777
|
try {
|
|
17778
17778
|
text = readFileSync(join(context.root, file), "utf8");
|
|
@@ -17800,6 +17800,222 @@ const movedRepoCalls = {
|
|
|
17800
17800
|
return breaks;
|
|
17801
17801
|
}
|
|
17802
17802
|
};
|
|
17803
|
+
// src/places.ts
|
|
17804
|
+
/**
|
|
17805
|
+
* The places of a repository that name another repository: links, package fields, workflow keys and config values.
|
|
17806
|
+
* When a repository moves to another owner, each such place that names the old owner is stale. Some places break at
|
|
17807
|
+
* once. npm provenance compares the field `repository` with the repository of the run. A GitHub Pages address of the
|
|
17808
|
+
* old owner gives 404. A `uses:` line does not follow the move (the rule `moved-repo-calls` holds that kind). The other
|
|
17809
|
+
* places go through a redirect only until a new repository takes the old name.
|
|
17810
|
+
*
|
|
17811
|
+
* A kind of place is data: its id, the files it reads and a pure function. The function finds each place in a file.
|
|
17812
|
+
* The rule `moved-repo-names` and the move plan read the same kinds. This file reads no file and starts no program.
|
|
17813
|
+
*/
|
|
17814
|
+
/** An owner or a name of a repository on GitHub. */
|
|
17815
|
+
const PART = "[A-Za-z0-9_.-]+";
|
|
17816
|
+
/**
|
|
17817
|
+
* A repository in a URL or a specifier: `github.com/owner/name`, `github.com:owner/name` (SSH) and `github:owner/name`.
|
|
17818
|
+
* The name stops before `/`, `#`, `?`, a quote, a bracket, a space or the end.
|
|
17819
|
+
*/
|
|
17820
|
+
const HOSTED = new RegExp(`(?<![\\w.-])(?:github\\.com[/:]|github:)(${PART})/(${PART})`, "gd");
|
|
17821
|
+
/** A GitHub Pages address of a project: `owner.github.io/name`. */
|
|
17822
|
+
const PAGES = new RegExp(`(?<![\\w.-])(${PART})\\.github\\.io/(${PART})`, "gd");
|
|
17823
|
+
/** The paths of GitHub that are not owners. */
|
|
17824
|
+
const NOT_OWNERS = /* @__PURE__ */ new Set([
|
|
17825
|
+
"orgs",
|
|
17826
|
+
"users",
|
|
17827
|
+
"settings",
|
|
17828
|
+
"marketplace",
|
|
17829
|
+
"features",
|
|
17830
|
+
"sponsors",
|
|
17831
|
+
"apps",
|
|
17832
|
+
"topics",
|
|
17833
|
+
"collections",
|
|
17834
|
+
"login",
|
|
17835
|
+
"about",
|
|
17836
|
+
"pricing"
|
|
17837
|
+
]);
|
|
17838
|
+
/** This function gives the name of a repository without the end `.git` and without dots at the end (the end of a sentence). */
|
|
17839
|
+
function bareName(name) {
|
|
17840
|
+
return name.replace(/\.git$/i, "").replace(/\.+$/, "");
|
|
17841
|
+
}
|
|
17842
|
+
/** This function gives each match of `pattern` in the lines of `text`, as a name of a repository. The pattern has the flag d, and the place starts at its group 1 (the owner). */
|
|
17843
|
+
function matches(text, pattern, form, skip = () => false) {
|
|
17844
|
+
const found = [];
|
|
17845
|
+
text.split(/\r?\n/).forEach((line, index) => {
|
|
17846
|
+
if (skip(line)) return;
|
|
17847
|
+
for (const match of line.matchAll(pattern)) {
|
|
17848
|
+
const owner = match[1] ?? "";
|
|
17849
|
+
const name = bareName(match[2] ?? "");
|
|
17850
|
+
if (name === "" || NOT_OWNERS.has(owner.toLowerCase())) continue;
|
|
17851
|
+
const written = form === "pages" ? `${owner}.github.io/${name}` : `${owner}/${name}`;
|
|
17852
|
+
const column = match.indices?.[1]?.[0] ?? 0;
|
|
17853
|
+
found.push({
|
|
17854
|
+
line: index + 1,
|
|
17855
|
+
column,
|
|
17856
|
+
text: written,
|
|
17857
|
+
repo: `${owner}/${name}`.toLowerCase(),
|
|
17858
|
+
form
|
|
17859
|
+
});
|
|
17860
|
+
}
|
|
17861
|
+
});
|
|
17862
|
+
return found;
|
|
17863
|
+
}
|
|
17864
|
+
/** This function gives each GitHub address and each Pages address in a text. */
|
|
17865
|
+
function links(text, skip) {
|
|
17866
|
+
return [...matches(text, HOSTED, "repo", skip), ...matches(text, PAGES, "pages", skip)].sort((a, b) => a.line - b.line || a.column - b.column);
|
|
17867
|
+
}
|
|
17868
|
+
/** This function gives each value `"owner/name"` of a key in a JSON text, for a key that names a repository with no host. */
|
|
17869
|
+
function bareValues(text, keys) {
|
|
17870
|
+
return matches(text, new RegExp(`"(?:${keys.join("|")})"\\s*:\\s*"(${PART})/(${PART})"`, "gd"), "repo");
|
|
17871
|
+
}
|
|
17872
|
+
/** The file of a package. */
|
|
17873
|
+
const MANIFEST = /(^|\/)package\.json$/;
|
|
17874
|
+
/** A Markdown file. A change log is a record of the past: its links go through the redirect, so the kinds do not read it. */
|
|
17875
|
+
const MARKDOWN = /\.mdx?$/i;
|
|
17876
|
+
const CHANGELOG = /(^|\/)CHANGELOG\.md$/i;
|
|
17877
|
+
/** A file of a composite action. */
|
|
17878
|
+
const ACTION$2 = /^\.github\/actions\/.+\/action\.ya?ml$/;
|
|
17879
|
+
/** The kinds of place of the core, in the order of a report. */
|
|
17880
|
+
const PLACE_KINDS = [
|
|
17881
|
+
{
|
|
17882
|
+
id: "package-fields",
|
|
17883
|
+
title: "The fields repository, homepage and bugs and the git dependencies of each package.json. npm provenance compares the field repository with the repository of the run.",
|
|
17884
|
+
reads: (file) => MANIFEST.test(file),
|
|
17885
|
+
find: (text) => [...links(text), ...bareValues(text, ["repository"])]
|
|
17886
|
+
},
|
|
17887
|
+
{
|
|
17888
|
+
id: "doc-links",
|
|
17889
|
+
title: "The links, the badges and the Pages addresses of each Markdown file, except a change log.",
|
|
17890
|
+
reads: (file) => MARKDOWN.test(file) && !CHANGELOG.test(file),
|
|
17891
|
+
find: (text) => links(text)
|
|
17892
|
+
},
|
|
17893
|
+
{
|
|
17894
|
+
id: "workflow-names",
|
|
17895
|
+
title: "The addresses and each key repository of a workflow or a composite action, except uses: (the rule moved-repo-calls).",
|
|
17896
|
+
reads: (file) => WORKFLOW$1.test(file) || ACTION$2.test(file),
|
|
17897
|
+
find: (text) => {
|
|
17898
|
+
const skip = (line) => line.trimStart().startsWith("#") || keyValue(line, "uses") !== void 0;
|
|
17899
|
+
const keys = [];
|
|
17900
|
+
text.split(/\r?\n/).forEach((line, index) => {
|
|
17901
|
+
if (skip(line)) return;
|
|
17902
|
+
const value = keyValue(line, "repository");
|
|
17903
|
+
const match = value === void 0 ? null : new RegExp(`^(${PART})/(${PART})$`).exec(value);
|
|
17904
|
+
if (match === null) return;
|
|
17905
|
+
const written = `${match[1] ?? ""}/${match[2] ?? ""}`;
|
|
17906
|
+
keys.push({
|
|
17907
|
+
line: index + 1,
|
|
17908
|
+
column: line.indexOf(written),
|
|
17909
|
+
text: written,
|
|
17910
|
+
repo: written.toLowerCase(),
|
|
17911
|
+
form: "repo"
|
|
17912
|
+
});
|
|
17913
|
+
});
|
|
17914
|
+
return [...links(text, skip), ...keys].sort((a, b) => a.line - b.line || a.column - b.column);
|
|
17915
|
+
}
|
|
17916
|
+
},
|
|
17917
|
+
{
|
|
17918
|
+
id: "config-repos",
|
|
17919
|
+
title: "The key repo of the change log of Changesets, and the addresses in the config of Renovate.",
|
|
17920
|
+
reads: (file) => file === ".changeset/config.json" || /^(\.github\/)?renovate\.json5?$/.test(file),
|
|
17921
|
+
find: (text) => [...links(text), ...bareValues(text, ["repo"])]
|
|
17922
|
+
}
|
|
17923
|
+
];
|
|
17924
|
+
/**
|
|
17925
|
+
* This function gives each place of a file that names a moved repository by an old name. A name that the moves do not
|
|
17926
|
+
* know is not stale. The replacement keeps the form of the place: `owner/name` or `owner.github.io/name`.
|
|
17927
|
+
*/
|
|
17928
|
+
function stalePlaces(file, text, moves, kinds = PLACE_KINDS) {
|
|
17929
|
+
const found = [];
|
|
17930
|
+
for (const kind of kinds) {
|
|
17931
|
+
if (!kind.reads(file)) continue;
|
|
17932
|
+
for (const named of kind.find(text, file)) {
|
|
17933
|
+
const to = movedTo(named.repo, moves);
|
|
17934
|
+
if (to === void 0) continue;
|
|
17935
|
+
const [owner = "", name = ""] = to.split("/");
|
|
17936
|
+
const replacement = named.form === "pages" ? `${owner}.github.io/${name}` : to;
|
|
17937
|
+
found.push({
|
|
17938
|
+
...named,
|
|
17939
|
+
kind: kind.id,
|
|
17940
|
+
file,
|
|
17941
|
+
to,
|
|
17942
|
+
replacement
|
|
17943
|
+
});
|
|
17944
|
+
}
|
|
17945
|
+
}
|
|
17946
|
+
return found;
|
|
17947
|
+
}
|
|
17948
|
+
/**
|
|
17949
|
+
* This function gives the text with each stale place replaced. A place whose text is not at its line and column (an
|
|
17950
|
+
* earlier replacement moved it) stays as it is, and the next check finds it again.
|
|
17951
|
+
*/
|
|
17952
|
+
function replacePlaces(text, places) {
|
|
17953
|
+
const eol = text.includes("\r\n") ? "\r\n" : "\n";
|
|
17954
|
+
const lines = text.split(/\r?\n/);
|
|
17955
|
+
const order = [...places].sort((a, b) => a.line - b.line || b.column - a.column);
|
|
17956
|
+
for (const place of order) {
|
|
17957
|
+
const line = lines[place.line - 1];
|
|
17958
|
+
if (line === void 0 || line.slice(place.column, place.column + place.text.length) !== place.text) continue;
|
|
17959
|
+
lines[place.line - 1] = line.slice(0, place.column) + place.replacement + line.slice(place.column + place.text.length);
|
|
17960
|
+
}
|
|
17961
|
+
return lines.join(eol);
|
|
17962
|
+
}
|
|
17963
|
+
// src/rules/moved-repo-names.ts
|
|
17964
|
+
/**
|
|
17965
|
+
* The rule `moved-repo-names`: no package field, Markdown link, workflow key or config value names a repository by the
|
|
17966
|
+
* old name of a move. The kinds of place are in `places.ts`. The rule `moved-repo-calls` holds `uses:`.
|
|
17967
|
+
*/
|
|
17968
|
+
const movedRepoNames = {
|
|
17969
|
+
id: "moved-repo-names",
|
|
17970
|
+
title: "No package field, Markdown link, workflow key or config value names a repository by an old owner after the repository moved.",
|
|
17971
|
+
reason: "Some old names break at once: npm provenance compares the field repository of package.json with the repository of the run, and a GitHub Pages address of the old owner gives 404. The other old names go through a redirect only until a new repository takes the old name. On 2026-11-24, 11 repositories moved to metrograph-labs, and each place was found and changed by hand.",
|
|
17972
|
+
fix: "Write the new owner in each place. `conventions fix` writes each one. A change log is not read: it is a record of the past.",
|
|
17973
|
+
sources: [{
|
|
17974
|
+
repo: "private",
|
|
17975
|
+
rule: "repo-move-tool",
|
|
17976
|
+
doc: "a decision of 2026-11-25: one gate holds each place that names a moved repository"
|
|
17977
|
+
}],
|
|
17978
|
+
options: { moves: {
|
|
17979
|
+
type: "strings",
|
|
17980
|
+
default: [],
|
|
17981
|
+
description: "More moves for this repository, each in the form `owner/name=owner/name`, after the moves that the package knows."
|
|
17982
|
+
} },
|
|
17983
|
+
failsFrom: "2026-12-10",
|
|
17984
|
+
check(context, options) {
|
|
17985
|
+
const files = context.gitFiles();
|
|
17986
|
+
if (files === void 0) return { skipped: "the root is not in a git repository" };
|
|
17987
|
+
const extra = options["moves"].map((text) => ({
|
|
17988
|
+
text,
|
|
17989
|
+
move: parseMove(text)
|
|
17990
|
+
}));
|
|
17991
|
+
const bad = extra.find((each) => each.move === void 0);
|
|
17992
|
+
if (bad !== void 0) return { skipped: `the option moves has "${bad.text}", which is not in the form owner/name=owner/name` };
|
|
17993
|
+
const moves = [...MOVES, ...extra.map((each) => each.move)];
|
|
17994
|
+
const breaks = [];
|
|
17995
|
+
for (const file of files.filter((path) => PLACE_KINDS.some((kind) => kind.reads(path))).sort(byCode)) {
|
|
17996
|
+
let text;
|
|
17997
|
+
try {
|
|
17998
|
+
text = readFileSync(join(context.root, file), "utf8");
|
|
17999
|
+
} catch {
|
|
18000
|
+
continue;
|
|
18001
|
+
}
|
|
18002
|
+
const places = stalePlaces(file, text, moves);
|
|
18003
|
+
if (places.length === 0) continue;
|
|
18004
|
+
const after = replacePlaces(text, places);
|
|
18005
|
+
for (const place of places) breaks.push({
|
|
18006
|
+
file,
|
|
18007
|
+
line: place.line,
|
|
18008
|
+
message: `${file} names ${place.text} (${place.kind}), which moved to ${place.to}. Write ${place.replacement} in its place.`,
|
|
18009
|
+
...after === text ? {} : { edits: [{
|
|
18010
|
+
file,
|
|
18011
|
+
before: text,
|
|
18012
|
+
after
|
|
18013
|
+
}] }
|
|
18014
|
+
});
|
|
18015
|
+
}
|
|
18016
|
+
return breaks;
|
|
18017
|
+
}
|
|
18018
|
+
};
|
|
17803
18019
|
// src/rules/no-build-output.ts
|
|
17804
18020
|
/**
|
|
17805
18021
|
* The rule `no-build-output`: git does not keep build output.
|
|
@@ -20755,7 +20971,7 @@ const jobFails = {
|
|
|
20755
20971
|
* more try. A bare `playwright install --with-deps` waits for the package mirror with no limit.
|
|
20756
20972
|
*/
|
|
20757
20973
|
/** The files of a composite action. */
|
|
20758
|
-
const ACTION = /^\.github\/actions\/.+\/action\.ya?ml$/;
|
|
20974
|
+
const ACTION$1 = /^\.github\/actions\/.+\/action\.ya?ml$/;
|
|
20759
20975
|
/** The folder of the action of the template itself. It is the one place with the install. */
|
|
20760
20976
|
const SHARED_ACTION = ".github/actions/setup-playwright/";
|
|
20761
20977
|
/**
|
|
@@ -20832,7 +21048,7 @@ const playwrightInstall = {
|
|
|
20832
21048
|
return;
|
|
20833
21049
|
}
|
|
20834
21050
|
};
|
|
20835
|
-
for (const file of files.filter((path) => (WORKFLOW$1.test(path) || ACTION.test(path)) && !path.startsWith(SHARED_ACTION)).sort(byCode)) {
|
|
21051
|
+
for (const file of files.filter((path) => (WORKFLOW$1.test(path) || ACTION$1.test(path)) && !path.startsWith(SHARED_ACTION)).sort(byCode)) {
|
|
20836
21052
|
const text = read(file);
|
|
20837
21053
|
if (text === void 0) continue;
|
|
20838
21054
|
for (const install of playwrightInstalls(text)) breaks.push({
|
|
@@ -23832,6 +24048,7 @@ const RULES = [
|
|
|
23832
24048
|
setupCue,
|
|
23833
24049
|
playwrightInstall,
|
|
23834
24050
|
movedRepoCalls,
|
|
24051
|
+
movedRepoNames,
|
|
23835
24052
|
scheduleLiterals,
|
|
23836
24053
|
homePackage,
|
|
23837
24054
|
homeModule,
|
|
@@ -24331,6 +24548,114 @@ function installHook(options, io) {
|
|
|
24331
24548
|
io.stdout(`conventions hook install: ${before === void 0 ? "wrote" : "updated"} ${shown}.\n`);
|
|
24332
24549
|
return 0;
|
|
24333
24550
|
}
|
|
24551
|
+
// src/move-plan.ts
|
|
24552
|
+
/**
|
|
24553
|
+
* The plan of a move of a repository to another owner. It has each place of a repository that names the old name, and each
|
|
24554
|
+
* step that no file holds. The rules `moved-repo-names` and `moved-repo-calls` read the same places, so the plan and the gate
|
|
24555
|
+
* agree. A step is data: its id, what to do, and the function that tells if the places of the plan need it.
|
|
24556
|
+
*
|
|
24557
|
+
* This file reads no file and starts no program. The command `conventions move plan` gives it the files of git.
|
|
24558
|
+
*/
|
|
24559
|
+
/** The files of a composite action. */
|
|
24560
|
+
const ACTION = /^\.github\/actions\/.+\/action\.ya?ml$/;
|
|
24561
|
+
/** The steps of a move that no file holds, in the order of the work. */
|
|
24562
|
+
const MOVE_STEPS = [
|
|
24563
|
+
{
|
|
24564
|
+
id: "npm-trust",
|
|
24565
|
+
title: "For each package that this repository publishes, add a trusted publisher on npm for the new repository, before the next release: npm provenance compares the field repository with the repository of the run.",
|
|
24566
|
+
needed: (places) => places.some((place) => place.kind === "package-fields" && place.file.endsWith("package.json"))
|
|
24567
|
+
},
|
|
24568
|
+
{
|
|
24569
|
+
id: "pages-address",
|
|
24570
|
+
title: "The GitHub Pages address changes to the new owner. Make sure that each link from outside the repository (a profile, a package page, another site) uses the new address: the old address gives 404.",
|
|
24571
|
+
needed: (places) => places.some((place) => place.form === "pages")
|
|
24572
|
+
},
|
|
24573
|
+
{
|
|
24574
|
+
id: "workflow-calls",
|
|
24575
|
+
title: "Each repository that calls a workflow or an action of the moved repository needs the new name in its uses: line: GitHub does not follow the move for uses:. Run this plan in each such repository.",
|
|
24576
|
+
needed: () => true
|
|
24577
|
+
},
|
|
24578
|
+
{
|
|
24579
|
+
id: "clone-remotes",
|
|
24580
|
+
title: "In each clone, write the new address of the remote: git remote set-url origin https://github.com/<new owner>/<name>.git.",
|
|
24581
|
+
needed: () => true
|
|
24582
|
+
}
|
|
24583
|
+
];
|
|
24584
|
+
/** This function gives the plan of the moves over the files of a repository, in the order of the files and the lines. */
|
|
24585
|
+
function movePlan(files, moves) {
|
|
24586
|
+
const places = [];
|
|
24587
|
+
for (const file of files) {
|
|
24588
|
+
if (PLACE_KINDS.some((kind) => kind.reads(file.path))) for (const place of stalePlaces(file.path, file.text, moves)) places.push(toPlace(place));
|
|
24589
|
+
if (WORKFLOW$1.test(file.path) || ACTION.test(file.path)) for (const call of remoteCalls(file.text)) {
|
|
24590
|
+
const to = movedTo(call.repo, moves);
|
|
24591
|
+
if (to !== void 0) places.push({
|
|
24592
|
+
file: file.path,
|
|
24593
|
+
line: call.line,
|
|
24594
|
+
kind: "workflow-calls",
|
|
24595
|
+
text: call.repo,
|
|
24596
|
+
replacement: to,
|
|
24597
|
+
form: "repo"
|
|
24598
|
+
});
|
|
24599
|
+
}
|
|
24600
|
+
}
|
|
24601
|
+
places.sort((a, b) => a.file < b.file ? -1 : a.file > b.file ? 1 : a.line - b.line);
|
|
24602
|
+
return {
|
|
24603
|
+
moves,
|
|
24604
|
+
places,
|
|
24605
|
+
steps: MOVE_STEPS.filter((step) => step.needed(places))
|
|
24606
|
+
};
|
|
24607
|
+
}
|
|
24608
|
+
function toPlace(place) {
|
|
24609
|
+
return {
|
|
24610
|
+
file: place.file,
|
|
24611
|
+
line: place.line,
|
|
24612
|
+
kind: place.kind,
|
|
24613
|
+
text: place.text,
|
|
24614
|
+
replacement: place.replacement,
|
|
24615
|
+
form: place.form
|
|
24616
|
+
};
|
|
24617
|
+
}
|
|
24618
|
+
/**
|
|
24619
|
+
* This function gives each file that the moves change, with its new text. It writes each place of a kind of `places.ts`.
|
|
24620
|
+
* It also writes each `uses:` line that names a moved repository. A file with no place is not in the result.
|
|
24621
|
+
*/
|
|
24622
|
+
function applyMoves(files, moves) {
|
|
24623
|
+
const changed = [];
|
|
24624
|
+
for (const file of files) {
|
|
24625
|
+
let text = file.text;
|
|
24626
|
+
if (PLACE_KINDS.some((kind) => kind.reads(file.path))) text = replacePlaces(text, stalePlaces(file.path, text, moves));
|
|
24627
|
+
if (WORKFLOW$1.test(file.path) || ACTION.test(file.path)) {
|
|
24628
|
+
const calls = remoteCalls(text);
|
|
24629
|
+
if (calls.length > 0) {
|
|
24630
|
+
const eol = text.includes("\r\n") ? "\r\n" : "\n";
|
|
24631
|
+
const lines = text.split(/\r?\n/);
|
|
24632
|
+
for (const call of calls) {
|
|
24633
|
+
const to = movedTo(call.repo, moves);
|
|
24634
|
+
const line = lines[call.line - 1];
|
|
24635
|
+
if (to !== void 0 && line !== void 0) lines[call.line - 1] = movedLine(line, call.repo, to);
|
|
24636
|
+
}
|
|
24637
|
+
text = lines.join(eol);
|
|
24638
|
+
}
|
|
24639
|
+
}
|
|
24640
|
+
if (text !== file.text) changed.push({
|
|
24641
|
+
path: file.path,
|
|
24642
|
+
text
|
|
24643
|
+
});
|
|
24644
|
+
}
|
|
24645
|
+
return changed;
|
|
24646
|
+
}
|
|
24647
|
+
/** This function gives the plan as text: one line for each place, then the steps. */
|
|
24648
|
+
function movePlanText(plan) {
|
|
24649
|
+
const lines = [`The plan of ${plan.moves.map((move) => `${move.from} to ${move.to}`).join(", ")}:`];
|
|
24650
|
+
if (plan.places.length === 0) lines.push("", "No file names an old name.");
|
|
24651
|
+
else {
|
|
24652
|
+
lines.push("", `${plan.places.length} places. \`conventions move apply\` with the same moves writes each one:`);
|
|
24653
|
+
for (const place of plan.places) lines.push(` ${place.file}:${place.line} ${place.kind} ${place.text} -> ${place.replacement}`);
|
|
24654
|
+
}
|
|
24655
|
+
lines.push("", "The steps that no file holds:");
|
|
24656
|
+
plan.steps.forEach((step, index) => lines.push(` ${index + 1}. ${step.title}`));
|
|
24657
|
+
return `${lines.join("\n")}\n`;
|
|
24658
|
+
}
|
|
24334
24659
|
// src/run.ts
|
|
24335
24660
|
/**
|
|
24336
24661
|
* The commands `check`, `fix` and `--list` of the bin `conventions`, as functions. `runChecks` starts the
|
|
@@ -24638,6 +24963,7 @@ const USAGE = `Usage: conventions check [options]
|
|
|
24638
24963
|
conventions pre-push <remote> [<url>]
|
|
24639
24964
|
conventions pre-push --base <ref> [--head <ref>]
|
|
24640
24965
|
conventions hook install
|
|
24966
|
+
conventions move plan|apply <owner/name=owner/name>... [--known] [--root <folder>] [--json]
|
|
24641
24967
|
|
|
24642
24968
|
check Start each rule. Exit code 1 when a rule has a break.
|
|
24643
24969
|
fix Write the fixes of the breaks that have one, and check again. Exit code 1 when a break stays.
|
|
@@ -24654,6 +24980,11 @@ const USAGE = `Usage: conventions check [options]
|
|
|
24654
24980
|
request of the run. It reads no standard input.
|
|
24655
24981
|
hook install Write the hook pre-push into the hooks folder of git. It keeps a hook that it did not write.
|
|
24656
24982
|
In CI, or outside a git repository, it does nothing.
|
|
24983
|
+
move plan Show each place of the repository that names a moved repository by its old name (package
|
|
24984
|
+
fields, Markdown links, workflow keys and uses: lines, config values), and the steps of the
|
|
24985
|
+
move that no file holds (npm trust, the Pages address, the callers, the remotes). --known adds
|
|
24986
|
+
the moves that the package knows.
|
|
24987
|
+
move apply Write the new name in each place of the plan, and show the plan that stays.
|
|
24657
24988
|
|
|
24658
24989
|
--root <folder> The root of the repository. The default is the current folder.
|
|
24659
24990
|
--rule <id> Only this rule. Use it again for more rules.
|
|
@@ -24714,6 +25045,7 @@ function runCli(args, io) {
|
|
|
24714
25045
|
if (args[0] === "map") return runMap(args.slice(1), io);
|
|
24715
25046
|
if (args[0] === "pre-push") return runPrePush(args.slice(1), io);
|
|
24716
25047
|
if (args[0] === "hook") return runHook(args.slice(1), io);
|
|
25048
|
+
if (args[0] === "move") return runMove(args.slice(1), io);
|
|
24717
25049
|
let check = false;
|
|
24718
25050
|
let fix = false;
|
|
24719
25051
|
let list = false;
|
|
@@ -24797,6 +25129,77 @@ function runCli(args, io) {
|
|
|
24797
25129
|
return result.failed ? 1 : 0;
|
|
24798
25130
|
}
|
|
24799
25131
|
/** The command `map`: the home of each area, or of the areas that match the words. */
|
|
25132
|
+
/** This function starts `conventions move plan` or `conventions move apply`. */
|
|
25133
|
+
function runMove(args, io) {
|
|
25134
|
+
const [action, ...rest] = args;
|
|
25135
|
+
const moves = [];
|
|
25136
|
+
let root = io.cwd;
|
|
25137
|
+
let json = false;
|
|
25138
|
+
let known = false;
|
|
25139
|
+
const usage = (message) => {
|
|
25140
|
+
io.stderr(`conventions: ${message}
|
|
25141
|
+
|
|
25142
|
+
${USAGE}`);
|
|
25143
|
+
return 2;
|
|
25144
|
+
};
|
|
25145
|
+
if (action !== "plan" && action !== "apply") return usage("Give the command move plan or move apply.");
|
|
25146
|
+
for (let index = 0; index < rest.length; index++) {
|
|
25147
|
+
const arg = rest[index] ?? "";
|
|
25148
|
+
if (arg === "--json") json = true;
|
|
25149
|
+
else if (arg === "--known") known = true;
|
|
25150
|
+
else if (arg === "--root") {
|
|
25151
|
+
const next = rest[++index];
|
|
25152
|
+
if (next === void 0 || next.startsWith("-")) return usage("The option --root needs a value.");
|
|
25153
|
+
root = resolve(io.cwd, next);
|
|
25154
|
+
} else if (arg.startsWith("-")) return usage(`An unknown argument: ${arg}`);
|
|
25155
|
+
else {
|
|
25156
|
+
const move = parseMove(arg);
|
|
25157
|
+
if (move === void 0) return usage(`The move "${arg}" is not in the form owner/name=owner/name.`);
|
|
25158
|
+
moves.push(move);
|
|
25159
|
+
}
|
|
25160
|
+
}
|
|
25161
|
+
if (known) moves.push(...MOVES);
|
|
25162
|
+
if (moves.length === 0) return usage("Give one move or more, or --known.");
|
|
25163
|
+
const listed = runGit(root, [
|
|
25164
|
+
"ls-files",
|
|
25165
|
+
"-z",
|
|
25166
|
+
"--cached"
|
|
25167
|
+
]);
|
|
25168
|
+
if (listed === void 0) {
|
|
25169
|
+
io.stderr(`conventions: ${root} is not in a git repository.
|
|
25170
|
+
`);
|
|
25171
|
+
return 1;
|
|
25172
|
+
}
|
|
25173
|
+
const read = () => listed.split("\0").filter((path) => path !== "").flatMap((path) => {
|
|
25174
|
+
try {
|
|
25175
|
+
return [{
|
|
25176
|
+
path,
|
|
25177
|
+
text: readFileSync(join(root, path), "utf8")
|
|
25178
|
+
}];
|
|
25179
|
+
} catch {
|
|
25180
|
+
return [];
|
|
25181
|
+
}
|
|
25182
|
+
});
|
|
25183
|
+
if (action === "apply") {
|
|
25184
|
+
const changed = applyMoves(read(), moves);
|
|
25185
|
+
for (const file of changed) writeFileSync(join(root, file.path), file.text);
|
|
25186
|
+
if (!json) io.stdout(`Wrote ${changed.length} files.
|
|
25187
|
+
|
|
25188
|
+
`);
|
|
25189
|
+
}
|
|
25190
|
+
const plan = movePlan(read(), moves);
|
|
25191
|
+
if (json) io.stdout(`${JSON.stringify({
|
|
25192
|
+
moves: plan.moves,
|
|
25193
|
+
places: plan.places,
|
|
25194
|
+
steps: plan.steps.map(({ id, title }) => ({
|
|
25195
|
+
id,
|
|
25196
|
+
title
|
|
25197
|
+
}))
|
|
25198
|
+
}, null, 2)}
|
|
25199
|
+
`);
|
|
25200
|
+
else io.stdout(movePlanText(plan));
|
|
25201
|
+
return 0;
|
|
25202
|
+
}
|
|
24800
25203
|
function runMap(args, io) {
|
|
24801
25204
|
let format = "text";
|
|
24802
25205
|
let homes = HOMES;
|
|
@@ -24854,4 +25257,4 @@ function runHook(args, io) {
|
|
|
24854
25257
|
}
|
|
24855
25258
|
export { requiredScripts as $, LICENSE_TEXTS as $n, noBuildOutput as $t, scriptsOf as A, SHARED_ACTIONS as An, parseJsonc as Ar, packNoBuildinfo as At, TEMPLATE_CALLED as B, SUMMARY_GATES as Bn, parseRuleConfig as Br, privatePatterns as Bt, setVersions as C, npmNames as Cn, codePackages as Cr, pagesAfterRelease as Ct, trustPolicy as D, serviceRunMain as Dn, lineOf as Dr, pagesSite as Dt, TRAIN_SCOPES as E, runCalls as En, keyLine as Er, pagesCalls as Et, sourceMain as F, setupCue as Fn, runGitShow as Fr, PRIVATE_PATTERNS_VARIABLE as Ft, runnerPeak as G, SECURITY_SCAN_COMMIT as Gn, isAllowedHit as Gt, calledJobs as H, hasSummaryJob as Hn, PRIVATE_NAME_LIST as Ht, HOME_TIMEOUT_MS as I, SECURITY_FILE as In, showFiles as Ir, invalidPatternBreaks as It, evaluateExpression as J, securityCallers as Jn, lineNameHits as Jt, runsAtOnce as K, SECURITY_SCAN_INPUTS as Kn, isCommonUse as Kt, blockHash as L, isSecurityGate as Ln, specifiersOf as Lr, noLocalPaths as Lt, testsRequired as M, SHARED_WORKFLOWS as Mn, replaceLine as Mr, HOME_PATTERNS as Mt, isSourcePath as N, callsSharedCi as Nn, repositoryOfRemote as Nr, PRIVATE_NAMES_FILE_CONFIG as Nt, typedScripts as O, hasTests as On, matchesAny as Or, exportsRequire as Ot, pathsOf as P, sharedCi as Pn, runGit as Pr, PRIVATE_NAMES_FILE_VARIABLE as Pt, roadmapParses as Q, scheduleMinute as Qn, pathNameHit as Qt, githubFetch as R, securityGate as Rn, defaultOptions as Rr, privateNamesFile as Rt, namedVersions as S, npmDrift as Sn, cleanPath as Sr, siteCheckInCi as St, IGNORE_AFTER as T, SERVICE_PACKAGE as Tn, inFolder as Tr, PAGES_WORKFLOWS as Tt, eventClass as U, startsOnPullRequest as Un, PrivateNameListError as Ut, UNKNOWN_MATRIX_JOBS as V, addSummaryJob as Vn, privateTextBreaks as Vt, matrixPeak as W, summaryJobRule as Wn, firstNameMatch as Wt, mayRun as X, withOneJob as Xn, nameMatches as Xt, groupParts as Y, securityOneJob as Yn, mergePrivateNames as Yt, roadmapOfLine as Z, runnerBudget as Zn, parsePrivateNames as Zt, runPrePushArgs as _, MAP_RULE as _n, yamlFaults as _r, swallowsTests as _t, listRules as a, homeModule as an, ACTIONS_COMMIT as ar, reachOf as at, GITHUB_YAML as b, mapText as bn, DEPENDENCY_FIELDS as br, isPinned as bt, runCli as c, modulesOf as cn, prPathFilters as cr, UNSHIPPED_FILES as ct, HOOK_MARKER as d, messageOf as dn, summaryName as dr, unreleasedChangeRule as dt, REAL_COMPARE as en, authorOf as er, releaseFiles as et, NO_READ_LINE as f, repoOf as fn, gateAfterCancel as fr, playwrightInstall as ft, prePush as g, HOMES as gn, readWorkflow as gr, startsTests as gt, parsePrePushArgs as h, HOME_EXPORTS as hn, readAction as hr, parseAdvisory as ht, formatResult as i, apiReportScript as in, repositoryIsPublic as ir, publishedMinorRule as it, typedFiles as j, SHARED_CI as jn, readJsonc as jr, DEFAULT_ALLOWED as jt, configsOfScript as k, tsconfigTest as kn, parseCatFileBatch as kr, publishTextSafe as kt, runFix as l, declaredName as ln, skippableJobs as lr, npmLookup as lt, installHook as m, signaturesOf as mn, parseWorkflow as mr, jobFails as mt, annotations as n, mainCheck as nn, licenseFileOf as nr, minorOf as nt, readConfig as o, moduleMessage as on, convertGate as or, NPM_REGISTRY as ot, PRE_PUSH_HOOK as p, reposOf as pn, MATRIX_EXPAND_MAX as pr, hiddenFailures as pt, workflowPeaks as q, SECURITY_TIMEOUT_MINUTES as qn, lineNameHit as qt, createContext as r, coverageProvider as rn, mitText as rr, publishedMinor as rt, runChecks as s, moduleUses as sn, gateTrigger as sr, SHIPPED_FIELDS as st, USAGE as t, hasImportMetaMain as tn, licenseFile as tr, lockedVersions as tt, summaryMarkdown as u, homePackage as un, summaryJob as ur, unreleasedChange as ut, RULES as v, findHomes as vn, STRICT_OPTIONS as vr, pipeFails as vt, versionTitle as w, readOverlay as wn, hasFile as wr, pushMainOnly as wt, workflowParses as x, mergeHomes as xn, RULE_WARN_DAYS as xr, pinnedGitDeps as xt, workspaceProtocol as y, mapMarkdown as yn, cuePreset as yr, isGitSpecifier as yt, sharedDocsRule as z, securityWorkflow as zn, parseConfig as zr, privateNamesFiles as zt };
|
|
24856
25259
|
|
|
24857
|
-
//# sourceMappingURL=run-
|
|
25260
|
+
//# sourceMappingURL=run-DfHH0aZb.js.map
|