@mark1russell7/conventions 0.50.3 → 0.50.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
CHANGED
|
@@ -27,7 +27,7 @@ Each break shows the file, the line, the rule and the fix. In GitHub Actions, th
|
|
|
27
27
|
- `push-main-only`: a workflow that starts on `push` and on `pull_request`, with no limit of `push` to the default branch or with no `workflow_dispatch`. The fix adds `branches` and `workflow_dispatch`, and keeps the comments and each other trigger. It keeps a tag run when the workflow reads the tag. It does not edit `release.yml`, and a person chooses the change for `branches-ignore` or for another named branch.
|
|
28
28
|
- `pipe-fails`: a step with a pipe and no `pipefail`. The fix adds `defaults: { run: { shell: bash } }` to the workflow. It does not write over another shell.
|
|
29
29
|
- `gate-after-cancel`: a summary job of a gate with `always()` in its condition. The fix writes `if: ${{ !cancelled() }}`. A condition with other parts needs a person.
|
|
30
|
-
- `security-gate`: a repository with the gate `ci.yml` (a pull request trigger) and no security gate: no job `Security OK`, no step with the action `security-scan`. The fix writes `.github/workflows/security.yml` as the stamp writes it, with the action pinned to a commit and the minute of the repository and the file. It needs a person when `security.yml` is there and is not a gate, or when no remote origin gives the minute. It skips a private repository, which has no paid Actions minutes.
|
|
30
|
+
- `security-gate`: a repository with the gate `ci.yml` (a pull request trigger) and no security gate: no job `Security OK`, no step with the action `security-scan`. The fix writes `.github/workflows/security.yml` as the stamp writes it, with the action pinned to a commit and the minute of the repository and the file. It needs a person when `security.yml` is there and is not a gate, or when no remote origin gives the minute. It skips a private repository, which has no paid Actions minutes. It also skips a repository with no event file of GitHub Actions, because only that file gives the visibility: a local fix writes no `security.yml`.
|
|
31
31
|
- `security-one-job`: a job that uses the shared workflow `reusable-security.yml`, with or without its summary job `Security OK`. The fix writes one job `Security OK` that runs the action `security-scan`, with the same inputs and time limit. With no summary job, the new job gets the id `security-ok`. The pin is the first commit of the template with the action, and Renovate moves it. Another summary job, a second job that needs the scans, another job `security-ok` or an input of more than one line needs a person.
|
|
32
32
|
- `tests-required`: the option `passWithNoTests` in a config or a script, in a package with test files. A package with no tests needs a person, who removes its test script.
|
|
33
33
|
- `typed-files`: a config file at the root of a package (`vitest.config.ts`). The fix adds `*.config.ts` and `rootDir: "."` to the `tsconfig.test.json` of the package, when that file has no comments.
|
package/build/cli.js
CHANGED
package/build/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as unreleasedChange, $n as summaryJob, $t as homePackage, A as scriptsOf, An as addSummaryJob, At as privateTextBreaks, B as roadmapOfLine, Bn as runnerBudget, Bt as parsePrivateNames, C as setVersions, Cn as sharedCi, Cr as runGitShow, Ct as PRIVATE_NAMES_FILE_VARIABLE, D as trustPolicy, Dn as securityGate, Dr as parseConfig, Dt as privateNamesFile, E as TRAIN_SCOPES, En as isSecurityGate, Er as defaultOptions, Et as noLocalPaths, F as sourceMain, Fn as SECURITY_SCAN_INPUTS, Ft as isCommonUse, G as minorOf, Gn as licenseFileOf, Gt as mainCheck, H as requiredScripts, Hn as LICENSE_TEXTS, Ht as noBuildOutput, I as HOME_TIMEOUT_MS, In as SECURITY_TIMEOUT_MINUTES, It as lineNameHit, J as reachOf, Jn as ACTIONS_COMMIT, Jt as homeModule, K as publishedMinor, Kn as mitText, Kt as coverageProvider, L as blockHash, Ln as securityCallers, Lt as lineNameHits, M as testsRequired, Mn as startsOnPullRequest, Mt as PrivateNameListError, N as isSourcePath, Nn as summaryJobRule, Nt as firstNameMatch, O as typedScripts, On as securityWorkflow, Or as parseRuleConfig, Ot as privateNamesFiles, P as pathsOf, Pn as SECURITY_SCAN_COMMIT, Pt as isAllowedHit, Q as npmLookup, Qn as skippableJobs, Qt as declaredName, R as githubFetch, Rn as securityOneJob, Rt as mergePrivateNames, S as namedVersions, Sn as callsSharedCi, Sr as runGit, St as PRIVATE_NAMES_FILE_CONFIG, T as IGNORE_AFTER, Tn as SECURITY_FILE, Tr as specifiersOf, Tt as invalidPatternBreaks, U as releaseFiles, Un as authorOf, Ut as REAL_COMPARE, V as roadmapParses, Vn as scheduleMinute, Vt as pathNameHit, W as lockedVersions, Wn as licenseFile, Wt as hasImportMetaMain, X as SHIPPED_FIELDS, Xn as gateTrigger, Xt as moduleUses, Y as NPM_REGISTRY, Yn as convertGate, Yt as moduleMessage, Z as UNSHIPPED_FILES, Zn as prPathFilters, Zt as modulesOf, _ as runPrePushArgs, _n as hasTests, _r as parseCatFileBatch, _t as exportsRequire, a as listRules, an as HOMES, ar as yamlFaults, at as startsTests, b as GITHUB_YAML, bn as SHARED_CI, br as replaceLine, bt as DEFAULT_ALLOWED, c as runCli, cn as mapMarkdown, cr as DEPENDENCY_FIELDS, ct as isGitSpecifier, d as HOOK_MARKER, dn as npmDrift, dr as codePackages, dt as siteCheckInCi, en as messageOf, er as summaryName, et as unreleasedChangeRule, f as NO_READ_LINE, fn as npmNames, fr as hasFile, ft as pagesAfterRelease, g as prePush, gn as serviceRunMain, gr as matchesAny, gt as pagesSite, h as parsePrePushArgs, hn as runCalls, hr as lineOf, ht as pagesCalls, i as formatResult, in as HOME_EXPORTS, ir as readWorkflow, it as parseAdvisory, j as typedFiles, jn as hasSummaryJob, jt as PRIVATE_NAME_LIST, k as configsOfScript, kn as SUMMARY_GATES, kt as privatePatterns, l as runFix, ln as mapText, lr as RULE_WARN_DAYS, lt as isPinned, m as installHook, mn as SERVICE_PACKAGE, mr as keyLine, mt as PAGES_WORKFLOWS, n as annotations, nn as reposOf, nr as parseWorkflow, nt as hiddenFailures, o as readConfig, on as MAP_RULE, or as STRICT_OPTIONS, ot as swallowsTests, p as PRE_PUSH_HOOK, pn as readOverlay, pr as inFolder, pt as pushMainOnly, q as publishedMinorRule, qn as repositoryIsPublic, qt as apiReportScript, r as createContext, rn as signaturesOf, rr as readAction, rt as jobFails, s as runChecks, sn as findHomes, sr as cuePreset, st as pipeFails, t as USAGE, tn as repoOf, tr as gateAfterCancel, tt as playwrightInstall, u as summaryMarkdown, un as mergeHomes, ur as cleanPath, ut as pinnedGitDeps, v as RULES, vn as tsconfigTest, vr as parseJsonc, vt as publishTextSafe, w as versionTitle, wn as setupCue, wr as showFiles, wt as PRIVATE_PATTERNS_VARIABLE, x as workflowParses, xn as SHARED_WORKFLOWS, xr as repositoryOfRemote, xt as HOME_PATTERNS, y as workspaceProtocol, yn as SHARED_ACTIONS, yr as readJsonc, yt as packNoBuildinfo, z as sharedDocsRule, zn as withOneJob, zt as nameMatches } from "./run-
|
|
1
|
+
import { $ as unreleasedChange, $n as summaryJob, $t as homePackage, A as scriptsOf, An as addSummaryJob, At as privateTextBreaks, B as roadmapOfLine, Bn as runnerBudget, Bt as parsePrivateNames, C as setVersions, Cn as sharedCi, Cr as runGitShow, Ct as PRIVATE_NAMES_FILE_VARIABLE, D as trustPolicy, Dn as securityGate, Dr as parseConfig, Dt as privateNamesFile, E as TRAIN_SCOPES, En as isSecurityGate, Er as defaultOptions, Et as noLocalPaths, F as sourceMain, Fn as SECURITY_SCAN_INPUTS, Ft as isCommonUse, G as minorOf, Gn as licenseFileOf, Gt as mainCheck, H as requiredScripts, Hn as LICENSE_TEXTS, Ht as noBuildOutput, I as HOME_TIMEOUT_MS, In as SECURITY_TIMEOUT_MINUTES, It as lineNameHit, J as reachOf, Jn as ACTIONS_COMMIT, Jt as homeModule, K as publishedMinor, Kn as mitText, Kt as coverageProvider, L as blockHash, Ln as securityCallers, Lt as lineNameHits, M as testsRequired, Mn as startsOnPullRequest, Mt as PrivateNameListError, N as isSourcePath, Nn as summaryJobRule, Nt as firstNameMatch, O as typedScripts, On as securityWorkflow, Or as parseRuleConfig, Ot as privateNamesFiles, P as pathsOf, Pn as SECURITY_SCAN_COMMIT, Pt as isAllowedHit, Q as npmLookup, Qn as skippableJobs, Qt as declaredName, R as githubFetch, Rn as securityOneJob, Rt as mergePrivateNames, S as namedVersions, Sn as callsSharedCi, Sr as runGit, St as PRIVATE_NAMES_FILE_CONFIG, T as IGNORE_AFTER, Tn as SECURITY_FILE, Tr as specifiersOf, Tt as invalidPatternBreaks, U as releaseFiles, Un as authorOf, Ut as REAL_COMPARE, V as roadmapParses, Vn as scheduleMinute, Vt as pathNameHit, W as lockedVersions, Wn as licenseFile, Wt as hasImportMetaMain, X as SHIPPED_FIELDS, Xn as gateTrigger, Xt as moduleUses, Y as NPM_REGISTRY, Yn as convertGate, Yt as moduleMessage, Z as UNSHIPPED_FILES, Zn as prPathFilters, Zt as modulesOf, _ as runPrePushArgs, _n as hasTests, _r as parseCatFileBatch, _t as exportsRequire, a as listRules, an as HOMES, ar as yamlFaults, at as startsTests, b as GITHUB_YAML, bn as SHARED_CI, br as replaceLine, bt as DEFAULT_ALLOWED, c as runCli, cn as mapMarkdown, cr as DEPENDENCY_FIELDS, ct as isGitSpecifier, d as HOOK_MARKER, dn as npmDrift, dr as codePackages, dt as siteCheckInCi, en as messageOf, er as summaryName, et as unreleasedChangeRule, f as NO_READ_LINE, fn as npmNames, fr as hasFile, ft as pagesAfterRelease, g as prePush, gn as serviceRunMain, gr as matchesAny, gt as pagesSite, h as parsePrePushArgs, hn as runCalls, hr as lineOf, ht as pagesCalls, i as formatResult, in as HOME_EXPORTS, ir as readWorkflow, it as parseAdvisory, j as typedFiles, jn as hasSummaryJob, jt as PRIVATE_NAME_LIST, k as configsOfScript, kn as SUMMARY_GATES, kt as privatePatterns, l as runFix, ln as mapText, lr as RULE_WARN_DAYS, lt as isPinned, m as installHook, mn as SERVICE_PACKAGE, mr as keyLine, mt as PAGES_WORKFLOWS, n as annotations, nn as reposOf, nr as parseWorkflow, nt as hiddenFailures, o as readConfig, on as MAP_RULE, or as STRICT_OPTIONS, ot as swallowsTests, p as PRE_PUSH_HOOK, pn as readOverlay, pr as inFolder, pt as pushMainOnly, q as publishedMinorRule, qn as repositoryIsPublic, qt as apiReportScript, r as createContext, rn as signaturesOf, rr as readAction, rt as jobFails, s as runChecks, sn as findHomes, sr as cuePreset, st as pipeFails, t as USAGE, tn as repoOf, tr as gateAfterCancel, tt as playwrightInstall, u as summaryMarkdown, un as mergeHomes, ur as cleanPath, ut as pinnedGitDeps, v as RULES, vn as tsconfigTest, vr as parseJsonc, vt as publishTextSafe, w as versionTitle, wn as setupCue, wr as showFiles, wt as PRIVATE_PATTERNS_VARIABLE, x as workflowParses, xn as SHARED_WORKFLOWS, xr as repositoryOfRemote, xt as HOME_PATTERNS, y as workspaceProtocol, yn as SHARED_ACTIONS, yr as readJsonc, yt as packNoBuildinfo, z as sharedDocsRule, zn as withOneJob, zt as nameMatches } from "./run-B7F49C-J.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
|
|
@@ -3155,7 +3155,9 @@ const securityGate = {
|
|
|
3155
3155
|
if (ciText === void 0 || !startsOnPullRequest(ciText)) return { skipped: "the repository has no gate ci.yml that starts on a pull request" };
|
|
3156
3156
|
const onDisk = existsSync(join(context.root, SECURITY_FILE));
|
|
3157
3157
|
if ((onDisk && !workflows.includes(".github/workflows/security.yml") ? [...workflows, ".github/workflows/security.yml"] : workflows).some((file) => isSecurityGate(read(file) ?? ""))) return [];
|
|
3158
|
-
|
|
3158
|
+
const visibility = repositoryIsPublic(context);
|
|
3159
|
+
if (visibility === false) return { skipped: "the repository is private" };
|
|
3160
|
+
if (visibility === void 0) return { skipped: "no event file of GitHub Actions gives the visibility of the repository" };
|
|
3159
3161
|
const message = "The repository has the gate ci.yml and no security gate (a job \"Security OK\" with the action security-scan).";
|
|
3160
3162
|
if (onDisk) return [{
|
|
3161
3163
|
file: SECURITY_FILE,
|
|
@@ -22326,4 +22328,4 @@ function runHook(args, io) {
|
|
|
22326
22328
|
}
|
|
22327
22329
|
export { unreleasedChange as $, summaryJob as $n, homePackage as $t, scriptsOf as A, addSummaryJob as An, privateTextBreaks as At, roadmapOfLine as B, runnerBudget as Bn, parsePrivateNames as Bt, setVersions as C, sharedCi as Cn, runGitShow as Cr, PRIVATE_NAMES_FILE_VARIABLE as Ct, trustPolicy as D, securityGate as Dn, parseConfig as Dr, privateNamesFile as Dt, TRAIN_SCOPES as E, isSecurityGate as En, defaultOptions as Er, noLocalPaths as Et, sourceMain as F, SECURITY_SCAN_INPUTS as Fn, isCommonUse as Ft, minorOf as G, licenseFileOf as Gn, mainCheck as Gt, requiredScripts as H, LICENSE_TEXTS as Hn, noBuildOutput as Ht, HOME_TIMEOUT_MS as I, SECURITY_TIMEOUT_MINUTES as In, lineNameHit as It, reachOf as J, ACTIONS_COMMIT as Jn, homeModule as Jt, publishedMinor as K, mitText as Kn, coverageProvider as Kt, blockHash as L, securityCallers as Ln, lineNameHits as Lt, testsRequired as M, startsOnPullRequest as Mn, PrivateNameListError as Mt, isSourcePath as N, summaryJobRule as Nn, firstNameMatch as Nt, typedScripts as O, securityWorkflow as On, parseRuleConfig as Or, privateNamesFiles as Ot, pathsOf as P, SECURITY_SCAN_COMMIT as Pn, isAllowedHit as Pt, npmLookup as Q, skippableJobs as Qn, declaredName as Qt, githubFetch as R, securityOneJob as Rn, mergePrivateNames as Rt, namedVersions as S, callsSharedCi as Sn, runGit as Sr, PRIVATE_NAMES_FILE_CONFIG as St, IGNORE_AFTER as T, SECURITY_FILE as Tn, specifiersOf as Tr, invalidPatternBreaks as Tt, releaseFiles as U, authorOf as Un, REAL_COMPARE as Ut, roadmapParses as V, scheduleMinute as Vn, pathNameHit as Vt, lockedVersions as W, licenseFile as Wn, hasImportMetaMain as Wt, SHIPPED_FIELDS as X, gateTrigger as Xn, moduleUses as Xt, NPM_REGISTRY as Y, convertGate as Yn, moduleMessage as Yt, UNSHIPPED_FILES as Z, prPathFilters as Zn, modulesOf as Zt, runPrePushArgs as _, hasTests as _n, parseCatFileBatch as _r, exportsRequire as _t, listRules as a, HOMES as an, yamlFaults as ar, startsTests as at, GITHUB_YAML as b, SHARED_CI as bn, replaceLine as br, DEFAULT_ALLOWED as bt, runCli as c, mapMarkdown as cn, DEPENDENCY_FIELDS as cr, isGitSpecifier as ct, HOOK_MARKER as d, npmDrift as dn, codePackages as dr, siteCheckInCi as dt, messageOf as en, summaryName as er, unreleasedChangeRule as et, NO_READ_LINE as f, npmNames as fn, hasFile as fr, pagesAfterRelease as ft, prePush as g, serviceRunMain as gn, matchesAny as gr, pagesSite as gt, parsePrePushArgs as h, runCalls as hn, lineOf as hr, pagesCalls as ht, formatResult as i, HOME_EXPORTS as in, readWorkflow as ir, parseAdvisory as it, typedFiles as j, hasSummaryJob as jn, PRIVATE_NAME_LIST as jt, configsOfScript as k, SUMMARY_GATES as kn, privatePatterns as kt, runFix as l, mapText as ln, RULE_WARN_DAYS as lr, isPinned as lt, installHook as m, SERVICE_PACKAGE as mn, keyLine as mr, PAGES_WORKFLOWS as mt, annotations as n, reposOf as nn, parseWorkflow as nr, hiddenFailures as nt, readConfig as o, MAP_RULE as on, STRICT_OPTIONS as or, swallowsTests as ot, PRE_PUSH_HOOK as p, readOverlay as pn, inFolder as pr, pushMainOnly as pt, publishedMinorRule as q, repositoryIsPublic as qn, apiReportScript as qt, createContext as r, signaturesOf as rn, readAction as rr, jobFails as rt, runChecks as s, findHomes as sn, cuePreset as sr, pipeFails as st, USAGE as t, repoOf as tn, gateAfterCancel as tr, playwrightInstall as tt, summaryMarkdown as u, mergeHomes as un, cleanPath as ur, pinnedGitDeps as ut, RULES as v, tsconfigTest as vn, parseJsonc as vr, publishTextSafe as vt, versionTitle as w, setupCue as wn, showFiles as wr, PRIVATE_PATTERNS_VARIABLE as wt, workflowParses as x, SHARED_WORKFLOWS as xn, repositoryOfRemote as xr, HOME_PATTERNS as xt, workspaceProtocol as y, SHARED_ACTIONS as yn, readJsonc as yr, packNoBuildinfo as yt, sharedDocsRule as z, withOneJob as zn, nameMatches as zt };
|
|
22328
22330
|
|
|
22329
|
-
//# sourceMappingURL=run-
|
|
22331
|
+
//# sourceMappingURL=run-B7F49C-J.js.map
|