@mark1russell7/conventions 0.43.0 → 0.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -2
- package/build/cli.js +1 -1
- package/build/index.d.ts +37 -3
- package/build/index.d.ts.map +1 -1
- package/build/index.js +3 -2
- package/build/index.js.map +1 -1
- package/build/owners.d.ts +37 -0
- package/build/owners.d.ts.map +1 -0
- package/build/owners.js +42 -0
- package/build/owners.js.map +1 -0
- package/build/{run-BWdt9YOd.js → run-BezUWj3N.js} +626 -72
- package/build/run-BezUWj3N.js.map +1 -0
- package/package.json +8 -2
- package/build/run-BWdt9YOd.js.map +0 -1
package/README.md
CHANGED
|
@@ -64,20 +64,22 @@ The rules come from the invariants audit of 2026-10-26 (strategy item s38). The
|
|
|
64
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` (STRATEGY.md, 2026-10-30). |
|
|
65
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` (STRATEGY.md, 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` |
|
|
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` (STRATEGY.md, 2026-10-30). |
|
|
68
68
|
| `main-runs-finish` | A workflow that starts on `push` or on `workflow_call` does not cancel a run in progress. A called workflow gets the event of its caller. A newer push cancels only the run of a pull request: `cancel-in-progress: ${{ github.event_name == 'pull_request' }}`. Each commit of `main` has its own concurrency group: `${{ github.event_name == 'pull_request' && github.ref || github.sha }}`. In one group, GitHub cancels a run that waits when a newer run comes, whatever `cancel-in-progress` says. On 2026-11-03 four waiting CI runs of `main` in client were cancelled, so its version commit had no result and no release. On 2026-11-03 the next merge cancelled the CI run of a commit on `main`, so the main check of that commit had no result. A bench run on `main` was cancelled too, and its claim had no measurement. | private `main-runs-finish` (STRATEGY.md, 2026-11-03). |
|
|
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
|
+
| `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`. |
|
|
71
72
|
| `gate-after-cancel` | A summary job of a gate has the condition `if: ${{ !cancelled() }}`, not `always()`. After a cancel, a job with `always()` asks for a runner, and the new run waits behind it. A job with `!cancelled()` concludes `cancelled` with no runner, and the pull request stays blocked. |
|
|
72
73
|
| `security-one-job` | The security scans run in one job, the check `Security OK`, with the action `security-scan` of the template. The shared workflow `reusable-security.yml` gives three scan jobs, and its caller adds a summary job. Each job asks for its own runner, so in a full queue a run waits for four runners. On 2026-11-06 each scan job of one repository waited 23 to 40 minutes. |
|
|
73
74
|
| `service-run-main` | In a server package, only the entry `src/main.ts` starts the service with `run()`. A server package has a dependency on `@mark1russell7/service` and a file `src/main.ts`, as the preset `service` writes it. A source file that imports the service package and starts `run()` is a break. A file that imports only the tool entries (`/channel`, `/clock`, `/heartbeat`, `/backoff`, `/limiter`, `/rules`) is not read: their values have their own `run`, as the pool of `/channel`. `run()` owns the process, so a module that starts it cannot be imported by a test. |
|
|
74
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. |
|
|
75
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
|
+
| `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). |
|
|
76
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` (STRATEGY.md, 2026-11-02). |
|
|
77
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). |
|
|
78
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`. |
|
|
79
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). |
|
|
80
|
-
| `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,
|
|
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). |
|
|
81
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. |
|
|
82
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). |
|
|
83
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 (STRATEGY.md, 2026-11-02). |
|
|
@@ -274,6 +276,16 @@ A planned home with no pending name is a no read. In the template repository, `n
|
|
|
274
276
|
|
|
275
277
|
An overlay file has the shape `{ "homes": [...] }`. A home of the overlay takes the place of the home with the same area. The private repositories use an overlay, because the public map names only public packages.
|
|
276
278
|
|
|
279
|
+
## The owners
|
|
280
|
+
|
|
281
|
+
The repositories have more than one owner: the personal account and an organization. Each owner is a GitHub account with its own pool of concurrent jobs. `OWNERS` gives the login, the kind, the plan and the pool of each owner. A reader of all repositories reads each owner, and a gate of the runners keeps one lane for each owner. Thus no reader names an owner in its code.
|
|
282
|
+
|
|
283
|
+
```ts
|
|
284
|
+
import { OWNERS, ownersOf, sharedNames } from "@mark1russell7/conventions/owners";
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
The subpath `@mark1russell7/conventions/owners` has no import, so a workflow with a sparse checkout and no install can import its source. `ownersOf(value)` reads a list of logins with commas, and gives each owner for an empty list. `sharedNames(repos)` gives each repository name that two owners have. A reader that keys its records by the name stops on such a name.
|
|
288
|
+
|
|
277
289
|
## Add a rule
|
|
278
290
|
|
|
279
291
|
A rule is a module in `src/rules/` that exports a `Rule`. A `Rule` has an `id`, a `title`, a `reason`, a `fix` and its audit `sources`. It also has its `options` with defaults, and a function `check(context, options)`. The function gives a list of breaks, or `{ skipped: "<reason>" }`.
|
|
@@ -290,6 +302,7 @@ The package also exports the functions of the tool:
|
|
|
290
302
|
- `replaceLine(text, line, lines)` gives the text with one line replaced, for the edits of a rule.
|
|
291
303
|
- `formatResult(result)`, `summaryMarkdown(result)`, `annotations(result)` and `listRules(config)` give the output.
|
|
292
304
|
- `parseConfig(value, rules)` and `readConfig(root)` read the field `conventions`.
|
|
305
|
+
- `OWNERS` is the list of the owners, with `ownerOf(login)`, `ownersOf(value)` and `sharedNames(repos)`. The subpath `@mark1russell7/conventions/owners` gives them and no other code.
|
|
293
306
|
- `HOMES` is the map of homes. `findHomes(query)` finds the homes of words, and `mapMarkdown(homes)` and `mapText(homes)` write them. `readOverlay(file)` and `mergeHomes(base, extra)` add more homes.
|
|
294
307
|
- `tagName(name, version, packageCount)` gives the git tag of a version. `releaseNotes(name, version, changelog)` gives the text of its GitHub release, with `changelogSection`, `npmUrl` and `MAX_NOTES`. The script `scripts/release/tags.ts` keeps the same rule, and a test compares the two.
|
|
295
308
|
- `RULES` and each rule, with the helpers `isGitSpecifier`, `isPinned`, `isSourcePath` and `parseJsonc`.
|
package/build/cli.js
CHANGED
package/build/index.d.ts
CHANGED
|
@@ -12,7 +12,9 @@
|
|
|
12
12
|
* conventions hook install
|
|
13
13
|
* ```
|
|
14
14
|
*/
|
|
15
|
+
import { OWNERS, Owner, ownerOf, ownersOf, sharedNames } from "./owners.js";
|
|
15
16
|
import { a as workspaceGlobs, n as globToRegExp, r as packageFolders, t as globFolders } from "./workspace-BMtl0EQf.js";
|
|
17
|
+
import "@mark1russell7/text/redact";
|
|
16
18
|
/** A row of the invariants audit that a rule comes from: the repository, the id of the rule in that audit, and the document line. */
|
|
17
19
|
interface AuditSource {
|
|
18
20
|
readonly repo: string;
|
|
@@ -81,6 +83,8 @@ interface RuleContext {
|
|
|
81
83
|
readonly env: Readonly<Record<string, string | undefined>>;
|
|
82
84
|
/** The base commit that `--base` gives, if any. */
|
|
83
85
|
readonly base?: string;
|
|
86
|
+
/** The day of the check (`YYYY-MM-DD`, UTC), for a rule with exceptions that end. A rule takes the day of the clock when it is missing. */
|
|
87
|
+
readonly today?: string;
|
|
84
88
|
/** This function gives the files that git tracks, relative to the root, or undefined when the root is not in a git repository. */
|
|
85
89
|
gitFiles(): readonly string[] | undefined;
|
|
86
90
|
/** This function starts git in the root, and gives its output, or undefined when git fails. */
|
|
@@ -259,7 +263,7 @@ export declare const serviceRunMain: Rule;
|
|
|
259
263
|
type HomeState = "published" | "unpublished" | "planned" | "none";
|
|
260
264
|
/** One area of code and its home. */
|
|
261
265
|
interface Home {
|
|
262
|
-
/** The id of the area, in kebab case
|
|
266
|
+
/** The id of the area, in kebab case of lower-case letters and digits, for example `3d-stages`. */
|
|
263
267
|
readonly area: string;
|
|
264
268
|
/** The area in a few plain words. */
|
|
265
269
|
readonly title: string;
|
|
@@ -602,6 +606,36 @@ export declare function isGitSpecifier(spec: string): boolean;
|
|
|
602
606
|
export declare function isPinned(spec: string, fullSha: boolean): boolean;
|
|
603
607
|
export declare const pinnedGitDeps: Rule;
|
|
604
608
|
export declare const pipeFails: Rule;
|
|
609
|
+
/** This function tells if a line of a script starts tests or checks. A word in a quote or a comment starts no test. */
|
|
610
|
+
export declare function startsTests(line: string): boolean;
|
|
611
|
+
/** This function tells if a line of a script starts tests and then hides their failure with `||`. */
|
|
612
|
+
export declare function swallowsTests(line: string): boolean;
|
|
613
|
+
/** A place in a workflow where a failure does not fail its job or its run. */
|
|
614
|
+
interface HiddenFailure {
|
|
615
|
+
/** The id of the job. */
|
|
616
|
+
readonly job: string;
|
|
617
|
+
/** The line, from 1. */
|
|
618
|
+
readonly line: number;
|
|
619
|
+
/** The key `continue-on-error` of the job (`job`) or of a test step (`step`), or a test command with `||` (`or`). */
|
|
620
|
+
readonly kind: "job" | "step" | "or";
|
|
621
|
+
/** The value of `continue-on-error`, or the text of the command. */
|
|
622
|
+
readonly value: string;
|
|
623
|
+
}
|
|
624
|
+
/** This function gives each place of a workflow where a failure does not fail its job or its run. It does not read comments. */
|
|
625
|
+
export declare function hiddenFailures(text: string): HiddenFailure[];
|
|
626
|
+
/** An entry of the option `advisory`: a job that keeps a hidden failure until a day, with its reason. */
|
|
627
|
+
interface Advisory {
|
|
628
|
+
/** The name of the workflow file, for example `ci.yml`. */
|
|
629
|
+
readonly file: string;
|
|
630
|
+
readonly job: string;
|
|
631
|
+
/** The last day of the exception (`YYYY-MM-DD`). */
|
|
632
|
+
readonly until: string;
|
|
633
|
+
readonly reason: string;
|
|
634
|
+
}
|
|
635
|
+
/** This function reads an entry of the option `advisory`, or gives undefined when the entry has another form. */
|
|
636
|
+
export declare function parseAdvisory(entry: string): Advisory | undefined;
|
|
637
|
+
export declare const jobFails: Rule;
|
|
638
|
+
export declare const playwrightInstall: Rule;
|
|
605
639
|
export declare const pushMainOnly: Rule;
|
|
606
640
|
/**
|
|
607
641
|
* The answer of the registry for one package, or an error. The answer has each version that npm has or had (none for a
|
|
@@ -759,7 +793,7 @@ interface CheckOptions {
|
|
|
759
793
|
/** This function reads the configuration of the root `package.json` at `root`. */
|
|
760
794
|
export declare function readConfig(root: string, rules?: readonly Rule[]): ConventionsConfig;
|
|
761
795
|
/** This function gives the facts of the repository at `root` that the rules read. */
|
|
762
|
-
export declare function createContext(root: string, config: ConventionsConfig, options?: Pick<CheckOptions, "base" | "env">): RuleContext;
|
|
796
|
+
export declare function createContext(root: string, config: ConventionsConfig, options?: Pick<CheckOptions, "base" | "env" | "today">): RuleContext;
|
|
763
797
|
/** This function starts each rule on the repository at `options.root`, and gives the result of each rule. */
|
|
764
798
|
export declare function runChecks(options: CheckOptions): CheckResult;
|
|
765
799
|
/** The result of `runFix`. */
|
|
@@ -928,5 +962,5 @@ export declare function npmUrl(name: string, version: string): string;
|
|
|
928
962
|
* link to npm. The Releases page of `site-pages` reads each list item as a change.
|
|
929
963
|
*/
|
|
930
964
|
export declare function releaseNotes(name: string, version: string, changelog: string | undefined): string;
|
|
931
|
-
export { type AllowedHit, type AuditSource, type Break, type CheckOptions, type CheckResult, type CliIo, type ConventionsConfig, type Edit, type FixResult, type Home, type HomeAnswer, type HomeFetch, type HomeModule, type HomeState, type HookOptions, type LinePlace, type Manifest, type Minor, type ModuleUse, type NameHit, type NameRule, type NpmDrift, type NpmDriftKind, type NpmPresence, type OptionSpec, type OptionValue, type Options, type PackageInfo, type PagesCall, type PathFilter, type PrePushOptions, type PrivateNameList, type PrivatePattern, type PrivateSources, type RegistryAnswer, type RegistryLookup, type Rule, type RuleConfig, type RuleContext, type RuleOutcome, type RuleResult, type SecurityCaller, type TextBreakOptions, type Workflow, type WorkflowInput, type WorkflowJob, type WorkflowStep, type YamlFault, globFolders, globToRegExp, packageFolders, workspaceGlobs };
|
|
965
|
+
export { type Advisory, type AllowedHit, type AuditSource, type Break, type CheckOptions, type CheckResult, type CliIo, type ConventionsConfig, type Edit, type FixResult, type HiddenFailure, type Home, type HomeAnswer, type HomeFetch, type HomeModule, type HomeState, type HookOptions, type LinePlace, type Manifest, type Minor, type ModuleUse, type NameHit, type NameRule, type NpmDrift, type NpmDriftKind, type NpmPresence, OWNERS, type OptionSpec, type OptionValue, type Options, type Owner, type PackageInfo, type PagesCall, type PathFilter, type PrePushOptions, type PrivateNameList, type PrivatePattern, type PrivateSources, type RegistryAnswer, type RegistryLookup, type Rule, type RuleConfig, type RuleContext, type RuleOutcome, type RuleResult, type SecurityCaller, type TextBreakOptions, type Workflow, type WorkflowInput, type WorkflowJob, type WorkflowStep, type YamlFault, globFolders, globToRegExp, ownerOf, ownersOf, packageFolders, sharedNames, workspaceGlobs };
|
|
932
966
|
//# sourceMappingURL=index.d.ts.map
|
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/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":"
|
|
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,OAAO,cAAc;;qBAOxB,UAAW,aAAa;;;;;wBAMrB,aAAa,SAAS,KAAK,oDAAoD;;UCtN9E;;WAEN;;WAEA;;;;;WAKA;;WAEA;;WAEA,SAAS;;;U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A;;;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,5 @@
|
|
|
1
|
-
import { $ as unreleasedChangeRule, $n as
|
|
1
|
+
import { $ as unreleasedChangeRule, $n as keyLine, $t as repositoryIsPublic, A as typedFiles, An as setupCue, At as privatePatterns, B as roadmapParses, Bn as prPathFilters, Bt as parsePrivateNames, C as versionTitle, Cn as hasTests, Ct as HOME_PATTERNS, D as typedScripts, Dn as SHARED_WORKFLOWS, Dt as invalidPatternBreaks, E as trustPolicy, En as SHARED_CI, Et as PRIVATE_PATTERNS_VARIABLE, F as HOME_TIMEOUT_MS, Fn as securityOneJob, Ft as isAllowedHit, G as publishedMinor, Gn as STRICT_OPTIONS, Gt as mainCheck, H as releaseFiles, Hn as gateAfterCancel, Ht as noBuildOutput, I as blockHash, In as withOneJob, It as isCommonUse, J as NPM_REGISTRY, Jn as RULE_WARN_DAYS, Jt as LICENSE_TEXTS, K as publishedMinorRule, Kn as cuePreset, Kt as coverageProvider, L as githubFetch, Ln as ACTIONS_COMMIT, Lt as lineNameHit, M as isSourcePath, Mn as SECURITY_SCAN_INPUTS, Mt as PRIVATE_NAME_LIST, N as pathsOf, Nn as SECURITY_TIMEOUT_MINUTES, Nt as PrivateNameListError, O as configsOfScript, On as callsSharedCi, Ot as noLocalPaths, P as sourceMain, Pn as securityCallers, Pt as firstNameMatch, Q as unreleasedChange, Qn as inFolder, Qt as mitText, R as sharedDocsRule, Rn as convertGate, Rt as lineNameHits, S as setVersions, Sn as serviceRunMain, St as DEFAULT_ALLOWED, T as TRAIN_SCOPES, Tn as SHARED_ACTIONS, Tt as PRIVATE_NAMES_FILE_VARIABLE, U as lockedVersions, Un as readAction, Ut as REAL_COMPARE, V as requiredScripts, Vn as summaryName, Vt as pathNameHit, W as minorOf, Wn as readWorkflow, Wt as hasImportMetaMain, X as UNSHIPPED_FILES, Xn as codePackages, Xt as licenseFile, Y as SHIPPED_FIELDS, Yn as cleanPath, Yt as authorOf, Z as npmLookup, Zn as hasFile, Zt as licenseFileOf, _ as workspaceProtocol, _n as npmDrift, _t as pagesCalls, a as listRules, an as homePackage, ar as runGit, at as swallowsTests, b as yamlFaults, bn as SERVICE_PACKAGE, bt as publishTextSafe, c as runCli, cn as reposOf, cr as parseConfig, ct as isPinned, d as HOOK_MARKER, dn as HOMES, dt as pagesAfterRelease, en as homeModule, er as lineOf, et as playwrightInstall, f as NO_READ_LINE, fn as MAP_RULE, ft as repositoryOfRemote, g as RULES, gn as mergeHomes, gt as PAGES_WORKFLOWS, h as prePush, hn as mapText, ht as pushMainOnly, i as formatResult, in as declaredName, ir as replaceLine, it as startsTests, j as testsRequired, jn as SECURITY_SCAN_COMMIT, jt as privateTextBreaks, k as scriptsOf, kn as sharedCi, kt as privateNamesFile, l as runFix, ln as signaturesOf, lt as pinnedGitDeps, m as installHook, mn as mapMarkdown, mt as scheduleMinute, n as annotations, nn as moduleUses, nr as parseJsonc, nt as jobFails, o as readConfig, on as messageOf, or as specifiersOf, ot as pipeFails, p as PRE_PUSH_HOOK, pn as findHomes, pt as runnerBudget, q as reachOf, qn as DEPENDENCY_FIELDS, qt as apiReportScript, r as createContext, rn as modulesOf, rr as readJsonc, rt as parseAdvisory, s as runChecks, sn as repoOf, sr as defaultOptions, st as isGitSpecifier, t as USAGE, tn as moduleMessage, tr as matchesAny, tt as hiddenFailures, u as summaryMarkdown, un as HOME_EXPORTS, ut as siteCheckInCi, v as GITHUB_YAML, vn as npmNames, vt as pagesSite, w as IGNORE_AFTER, wn as tsconfigTest, wt as PRIVATE_NAMES_FILE_CONFIG, x as namedVersions, xn as runCalls, xt as packNoBuildinfo, y as workflowParses, yn as readOverlay, yt as exportsRequire, z as roadmapOfLine, zn as gateTrigger, zt as nameMatches } from "./run-BezUWj3N.js";
|
|
2
|
+
import { OWNERS, ownerOf, ownersOf, sharedNames } from "./owners.js";
|
|
2
3
|
import { i as packageFolders, n as globFolders, r as globToRegExp, s as workspaceGlobs } from "./workspace-Cx7p7bWn.js";
|
|
3
4
|
// src/release-text.ts
|
|
4
5
|
/**
|
|
@@ -65,6 +66,6 @@ function releaseNotes(name, version, changelog) {
|
|
|
65
66
|
if (section.length <= 1e5) return section;
|
|
66
67
|
return `${section.slice(0, MAX_NOTES)}\n\n(The CHANGELOG.md of \`${name}\` has the full text.)`;
|
|
67
68
|
}
|
|
68
|
-
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, 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, homeModule, homePackage, inFolder, installHook, invalidPatternBreaks, isAllowedHit, isCommonUse, isGitSpecifier, isPinned, isSourcePath, 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, packNoBuildinfo, packageFolders, pagesAfterRelease, pagesCalls, pagesSite, parseConfig, parseJsonc, parsePrivateNames, pathNameHit, pathsOf, pinnedGitDeps, pipeFails, 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, signaturesOf, siteCheckInCi, sourceMain, specifiersOf, summaryMarkdown, summaryName, 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, 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
70
|
|
|
70
71
|
//# sourceMappingURL=index.js.map
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/release-text.ts"],"sourcesContent":["/**\n * The rule for the git tag and the text of a GitHub release of a package version.\n *\n * The release workflow keeps the same rule in `scripts/release/tags.ts`. A pinned workflow starts that script, so it\n * does not import this package. A test of this package compares the two.\n */\n\n/** GitHub refuses a release text of more than 125000 characters. */\nexport const MAX_NOTES: number = 100_000;\n\n/** This function gives the tag of a version: `v<version>` when the repository has one published package. */\nexport function tagName(name: string, version: string, packageCount: number): string {\n return packageCount === 1 ? `v${version}` : `${name}@${version}`;\n}\n\nconst escape = (text: string): string => text.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n\n/**\n * This function gives the text of the section of a version in a changelog, or undefined.\n *\n * The heading of the section has the version, with an optional `v` or `<name>@` before it and optional brackets:\n * `## 1.2.0`, `## v1.2.0`, `## [1.2.0] - 2026-10-18`, `# pkg@1.2.0 (2026-10-18)`. The section stops at the next heading\n * of the same level or a higher level. A heading in fenced code does not count. An empty section gives undefined.\n */\nexport function changelogSection(markdown: string, version: string, name: string): string | undefined {\n const heading = new RegExp(`^(#{1,6})\\\\s+\\\\[?(?:v|${escape(name)}@)?${escape(version)}\\\\]?(?=$|[\\\\s(])`);\n const lines = markdown.split(/\\r?\\n/);\n let level = 0;\n let fence: string | null = null;\n const body: string[] = [];\n for (const line of lines) {\n const fenceMark = /^\\s*(`{3,}|~{3,})/.exec(line)?.[1];\n if (fenceMark !== undefined) {\n const mark = fenceMark[0] ?? \"\";\n if (fence === null) fence = mark;\n else if (mark === fence) fence = null;\n if (level > 0) body.push(line);\n continue;\n }\n if (fence === null) {\n const levelOf = /^(#{1,6})\\s/.exec(line)?.[1]?.length;\n if (level > 0 && levelOf !== undefined && levelOf <= level) break;\n if (level === 0) {\n const match = heading.exec(line);\n if (match) level = match[1]?.length ?? 0;\n continue;\n }\n }\n if (level > 0) body.push(line);\n }\n const text = body.join(\"\\n\").trim();\n return text === \"\" ? undefined : text;\n}\n\n/** This function gives the address of a version on npm. */\nexport function npmUrl(name: string, version: string): string {\n return `https://www.npmjs.com/package/${name}/v/${version}`;\n}\n\n/**\n * This function gives the text of the GitHub release of a version: its changelog section, or else one list item with a\n * link to npm. The Releases page of `site-pages` reads each list item as a change.\n */\nexport function releaseNotes(name: string, version: string, changelog: string | undefined): string {\n const fallback = `- Version ${version} of [\\`${name}\\`](${npmUrl(name, version)}) on npm.`;\n const section = changelog === undefined ? undefined : changelogSection(changelog, version, name);\n if (section === undefined) return fallback;\n if (section.length <= MAX_NOTES) return section;\n return `${section.slice(0, MAX_NOTES)}\\n\\n(The CHANGELOG.md of \\`${name}\\` has the full text.)`;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/release-text.ts"],"sourcesContent":["/**\n * The rule for the git tag and the text of a GitHub release of a package version.\n *\n * The release workflow keeps the same rule in `scripts/release/tags.ts`. A pinned workflow starts that script, so it\n * does not import this package. A test of this package compares the two.\n */\n\n/** GitHub refuses a release text of more than 125000 characters. */\nexport const MAX_NOTES: number = 100_000;\n\n/** This function gives the tag of a version: `v<version>` when the repository has one published package. */\nexport function tagName(name: string, version: string, packageCount: number): string {\n return packageCount === 1 ? `v${version}` : `${name}@${version}`;\n}\n\nconst escape = (text: string): string => text.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n\n/**\n * This function gives the text of the section of a version in a changelog, or undefined.\n *\n * The heading of the section has the version, with an optional `v` or `<name>@` before it and optional brackets:\n * `## 1.2.0`, `## v1.2.0`, `## [1.2.0] - 2026-10-18`, `# pkg@1.2.0 (2026-10-18)`. The section stops at the next heading\n * of the same level or a higher level. A heading in fenced code does not count. An empty section gives undefined.\n */\nexport function changelogSection(markdown: string, version: string, name: string): string | undefined {\n const heading = new RegExp(`^(#{1,6})\\\\s+\\\\[?(?:v|${escape(name)}@)?${escape(version)}\\\\]?(?=$|[\\\\s(])`);\n const lines = markdown.split(/\\r?\\n/);\n let level = 0;\n let fence: string | null = null;\n const body: string[] = [];\n for (const line of lines) {\n const fenceMark = /^\\s*(`{3,}|~{3,})/.exec(line)?.[1];\n if (fenceMark !== undefined) {\n const mark = fenceMark[0] ?? \"\";\n if (fence === null) fence = mark;\n else if (mark === fence) fence = null;\n if (level > 0) body.push(line);\n continue;\n }\n if (fence === null) {\n const levelOf = /^(#{1,6})\\s/.exec(line)?.[1]?.length;\n if (level > 0 && levelOf !== undefined && levelOf <= level) break;\n if (level === 0) {\n const match = heading.exec(line);\n if (match) level = match[1]?.length ?? 0;\n continue;\n }\n }\n if (level > 0) body.push(line);\n }\n const text = body.join(\"\\n\").trim();\n return text === \"\" ? undefined : text;\n}\n\n/** This function gives the address of a version on npm. */\nexport function npmUrl(name: string, version: string): string {\n return `https://www.npmjs.com/package/${name}/v/${version}`;\n}\n\n/**\n * This function gives the text of the GitHub release of a version: its changelog section, or else one list item with a\n * link to npm. The Releases page of `site-pages` reads each list item as a change.\n */\nexport function releaseNotes(name: string, version: string, changelog: string | undefined): string {\n const fallback = `- Version ${version} of [\\`${name}\\`](${npmUrl(name, version)}) on npm.`;\n const section = changelog === undefined ? undefined : changelogSection(changelog, version, name);\n if (section === undefined) return fallback;\n if (section.length <= MAX_NOTES) return section;\n return `${section.slice(0, MAX_NOTES)}\\n\\n(The CHANGELOG.md of \\`${name}\\` has the full text.)`;\n}\n"],"mappings":";;;;;;;;;;;AAQA,MAAa,YAAoB;;AAGjC,SAAgB,QAAQ,MAAc,SAAiB,cAA8B;CACnF,OAAO,iBAAiB,IAAI,IAAI,YAAY,GAAG,KAA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,WAAW,SAAS,IAAI;CAC/F,IAAI,YAAY,KAAA,GAAW,OAAO;CAClC,IAAI,QAAQ,UAAA,KAAqB,OAAO;CACxC,OAAO,GAAG,QAAQ,MAAM,GAAG,SAAS,EAAE,6BAA6B,KAAK;AAC1E"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The owners of the repositories: the GitHub accounts that hold them. Each account has its own pool of concurrent jobs, so
|
|
3
|
+
* a repository can move from one owner to the other. A reader of all repositories reads each owner, and a gate of the
|
|
4
|
+
* runners keeps one lane for each owner. Thus no reader names an owner in its code. This file has no import, so a workflow
|
|
5
|
+
* with a sparse checkout and no install can import it from the source.
|
|
6
|
+
*/
|
|
7
|
+
/** A GitHub account that holds repositories. */
|
|
8
|
+
export interface Owner {
|
|
9
|
+
/** The login of the account. */
|
|
10
|
+
readonly login: string;
|
|
11
|
+
/** The kind of the account. The path `users/<login>/repos` of the API lists the repositories of both kinds. */
|
|
12
|
+
readonly kind: "user" | "organization";
|
|
13
|
+
/** The plan of the account. */
|
|
14
|
+
readonly plan: "pro" | "team";
|
|
15
|
+
/** The concurrent jobs of the plan: 40 for GitHub Pro, 60 for an organization on GitHub Team. */
|
|
16
|
+
readonly jobs: number;
|
|
17
|
+
/** The concurrent macOS jobs of the plan. */
|
|
18
|
+
readonly macos: number;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The owners, the personal account first. The organization got the plan Team on 2026-11-16, with its own pool of 60 jobs.
|
|
22
|
+
* An owner with no public repository adds no read.
|
|
23
|
+
*/
|
|
24
|
+
export declare const OWNERS: readonly Owner[];
|
|
25
|
+
/** This function gives the owner with this login, with no regard to case, or undefined. */
|
|
26
|
+
export declare function ownerOf(login: string): Owner | undefined;
|
|
27
|
+
/** This function reads a list of logins with commas. An empty value gives the login of each owner of `OWNERS`. */
|
|
28
|
+
export declare function ownersOf(value: string | undefined): string[];
|
|
29
|
+
/**
|
|
30
|
+
* This function gives each repository name that more than one owner has, in lower case and in order. A reader that keys
|
|
31
|
+
* its records by the name of the repository must stop on such a name, because the two repositories become one record.
|
|
32
|
+
*/
|
|
33
|
+
export declare function sharedNames(repos: readonly {
|
|
34
|
+
readonly owner: string;
|
|
35
|
+
readonly name: string;
|
|
36
|
+
}[]): string[];
|
|
37
|
+
//# sourceMappingURL=owners.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"owners.d.ts","names":[],"sources":["../src/owners.ts"],"mappings":";;;;;;;iBAQiB;;WAEN;;WAEA;;WAEA;;WAEA;;WAEA;;;;;;qBAOE,iBAAiB;;wBAMd,QAAQ,gBAAgB;;wBAKxB,SAAS;;;;;wBAYT,YAAY;WAA2B;WAAwB"}
|
package/build/owners.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// src/owners.ts
|
|
2
|
+
/**
|
|
3
|
+
* The owners, the personal account first. The organization got the plan Team on 2026-11-16, with its own pool of 60 jobs.
|
|
4
|
+
* An owner with no public repository adds no read.
|
|
5
|
+
*/
|
|
6
|
+
const OWNERS = [{
|
|
7
|
+
login: "mark1russell7",
|
|
8
|
+
kind: "user",
|
|
9
|
+
plan: "pro",
|
|
10
|
+
jobs: 40,
|
|
11
|
+
macos: 5
|
|
12
|
+
}, {
|
|
13
|
+
login: "metrograph-labs",
|
|
14
|
+
kind: "organization",
|
|
15
|
+
plan: "team",
|
|
16
|
+
jobs: 60,
|
|
17
|
+
macos: 5
|
|
18
|
+
}];
|
|
19
|
+
/** This function gives the owner with this login, with no regard to case, or undefined. */
|
|
20
|
+
function ownerOf(login) {
|
|
21
|
+
return OWNERS.find((owner) => owner.login.toLowerCase() === login.toLowerCase());
|
|
22
|
+
}
|
|
23
|
+
/** This function reads a list of logins with commas. An empty value gives the login of each owner of `OWNERS`. */
|
|
24
|
+
function ownersOf(value) {
|
|
25
|
+
const named = (value ?? "").split(",").map((login) => login.trim()).filter(Boolean);
|
|
26
|
+
return named.length > 0 ? [...new Set(named)] : OWNERS.map((owner) => owner.login);
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* This function gives each repository name that more than one owner has, in lower case and in order. A reader that keys
|
|
30
|
+
* its records by the name of the repository must stop on such a name, because the two repositories become one record.
|
|
31
|
+
*/
|
|
32
|
+
function sharedNames(repos) {
|
|
33
|
+
const owners = /* @__PURE__ */ new Map();
|
|
34
|
+
for (const repo of repos) {
|
|
35
|
+
const name = repo.name.toLowerCase();
|
|
36
|
+
owners.set(name, (owners.get(name) ?? /* @__PURE__ */ new Set()).add(repo.owner.toLowerCase()));
|
|
37
|
+
}
|
|
38
|
+
return [...owners].filter(([, logins]) => logins.size > 1).map(([name]) => name).sort();
|
|
39
|
+
}
|
|
40
|
+
export { OWNERS, ownerOf, ownersOf, sharedNames };
|
|
41
|
+
|
|
42
|
+
//# sourceMappingURL=owners.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"owners.js","names":[],"sources":["../src/owners.ts"],"sourcesContent":["/**\n * The owners of the repositories: the GitHub accounts that hold them. Each account has its own pool of concurrent jobs, so\n * a repository can move from one owner to the other. A reader of all repositories reads each owner, and a gate of the\n * runners keeps one lane for each owner. Thus no reader names an owner in its code. This file has no import, so a workflow\n * with a sparse checkout and no install can import it from the source.\n */\n\n/** A GitHub account that holds repositories. */\nexport interface Owner {\n /** The login of the account. */\n readonly login: string;\n /** The kind of the account. The path `users/<login>/repos` of the API lists the repositories of both kinds. */\n readonly kind: \"user\" | \"organization\";\n /** The plan of the account. */\n readonly plan: \"pro\" | \"team\";\n /** The concurrent jobs of the plan: 40 for GitHub Pro, 60 for an organization on GitHub Team. */\n readonly jobs: number;\n /** The concurrent macOS jobs of the plan. */\n readonly macos: number;\n}\n\n/**\n * The owners, the personal account first. The organization got the plan Team on 2026-11-16, with its own pool of 60 jobs.\n * An owner with no public repository adds no read.\n */\nexport const OWNERS: readonly Owner[] = [\n { login: \"mark1russell7\", kind: \"user\", plan: \"pro\", jobs: 40, macos: 5 },\n { login: \"metrograph-labs\", kind: \"organization\", plan: \"team\", jobs: 60, macos: 5 },\n];\n\n/** This function gives the owner with this login, with no regard to case, or undefined. */\nexport function ownerOf(login: string): Owner | undefined {\n return OWNERS.find((owner) => owner.login.toLowerCase() === login.toLowerCase());\n}\n\n/** This function reads a list of logins with commas. An empty value gives the login of each owner of `OWNERS`. */\nexport function ownersOf(value: string | undefined): string[] {\n const named = (value ?? \"\")\n .split(\",\")\n .map((login) => login.trim())\n .filter(Boolean);\n return named.length > 0 ? [...new Set(named)] : OWNERS.map((owner) => owner.login);\n}\n\n/**\n * This function gives each repository name that more than one owner has, in lower case and in order. A reader that keys\n * its records by the name of the repository must stop on such a name, because the two repositories become one record.\n */\nexport function sharedNames(repos: readonly { readonly owner: string; readonly name: string }[]): string[] {\n const owners = new Map<string, Set<string>>();\n for (const repo of repos) {\n const name = repo.name.toLowerCase();\n owners.set(name, (owners.get(name) ?? new Set<string>()).add(repo.owner.toLowerCase()));\n }\n return [...owners]\n .filter(([, logins]) => logins.size > 1)\n .map(([name]) => name)\n .sort();\n}\n"],"mappings":";;;;;AAyBA,MAAa,SAA2B,CACtC;CAAE,OAAO;CAAiB,MAAM;CAAQ,MAAM;CAAO,MAAM;CAAI,OAAO;AAAE,GACxE;CAAE,OAAO;CAAmB,MAAM;CAAgB,MAAM;CAAQ,MAAM;CAAI,OAAO;AAAE,CACrF;;AAGA,SAAgB,QAAQ,OAAkC;CACxD,OAAO,OAAO,MAAM,UAAU,MAAM,MAAM,YAAY,MAAM,MAAM,YAAY,CAAC;AACjF;;AAGA,SAAgB,SAAS,OAAqC;CAC5D,MAAM,SAAS,SAAS,GAAA,CACrB,MAAM,GAAG,CAAC,CACV,KAAK,UAAU,MAAM,KAAK,CAAC,CAAC,CAC5B,OAAO,OAAO;CACjB,OAAO,MAAM,SAAS,IAAI,CAAC,GAAG,IAAI,IAAI,KAAK,CAAC,IAAI,OAAO,KAAK,UAAU,MAAM,KAAK;AACnF;;;;;AAMA,SAAgB,YAAY,OAA+E;CACzG,MAAM,yBAAS,IAAI,IAAyB;CAC5C,KAAK,MAAM,QAAQ,OAAO;EACxB,MAAM,OAAO,KAAK,KAAK,YAAY;EACnC,OAAO,IAAI,OAAO,OAAO,IAAI,IAAI,qBAAK,IAAI,IAAY,EAAA,CAAG,IAAI,KAAK,MAAM,YAAY,CAAC,CAAC;CACxF;CACA,OAAO,CAAC,GAAG,MAAM,CAAC,CACf,QAAQ,GAAG,YAAY,OAAO,OAAO,CAAC,CAAC,CACvC,KAAK,CAAC,UAAU,IAAI,CAAC,CACrB,KAAK;AACV"}
|