@mark1russell7/conventions 0.57.4 → 0.57.5

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/build/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { readFileSync } from "node:fs";
3
- import { c as runCli } from "./run-D7iE_f86.js";
3
+ import { c as runCli } from "./run-Bg612Pv9.js";
4
4
  // src/cli.ts
5
5
  try {
6
6
  const args = process.argv.slice(2);
package/build/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as requiredScripts, $n as securityWorkflow, $r as parseConfig, $t as CONSOLE_LAST_DAY, A as scriptsOf, An as HOMES, Ar as readWorkflow, At as packNoBuildinfo, B as TEMPLATE_CALLED, Bn as runCalls, Br as keyLine, Bt as privatePatterns, C as setVersions, Cn as declaredName, Cr as skippableJobs, Ct as pagesAfterRelease, D as trustPolicy, Dn as reposOf, Dr as MATRIX_EXPAND_MAX, Dt as pagesSite, E as TRAIN_SCOPES, En as repoOf, Er as gateAfterCancel, Et as pagesCalls, F as sourceMain, Fn as mergeHomes, Fr as RULE_WARN_DAYS, Ft as PRIVATE_PATTERNS_VARIABLE, G as runnerPeak, Gn as SHARED_CI, Gr as readJsonc, Gt as isAllowedHit, H as calledJobs, Hn as hasTests, Hr as matchesAny, Ht as PRIVATE_NAME_LIST, I as HOME_TIMEOUT_MS, In as npmDrift, Ir as cleanPath, It as invalidPatternBreaks, J as evaluateExpression, Jn as sharedCi, Jr as runGit, Jt as lineNameHits, K as runsAtOnce, Kn as SHARED_WORKFLOWS, Kr as replaceLine, Kt as isCommonUse, L as blockHash, Ln as npmNames, Lr as codePackages, Lt as noLocalPaths, M as testsRequired, Mn as findHomes, Mr as STRICT_OPTIONS, Mt as HOME_PATTERNS, N as isSourcePath, Nn as mapMarkdown, Nr as cuePreset, Nt as PRIVATE_NAMES_FILE_CONFIG, O as typedScripts, On as signaturesOf, Or as parseWorkflow, Ot as exportsRequire, P as pathsOf, Pn as mapText, Pr as DEPENDENCY_FIELDS, Pt as PRIVATE_NAMES_FILE_VARIABLE, Q as roadmapParses, Qn as securityGate, Qr as defaultOptions, Qt as pathNameHit, R as githubFetch, Rn as readOverlay, Rr as hasFile, Rt as privateNamesFile, S as namedVersions, Sn as modulesOf, Sr as prPathFilters, St as siteCheckInCi, T as IGNORE_AFTER, Tn as messageOf, Tr as summaryName, Tt as PAGES_WORKFLOWS, U as eventClass, Un as tsconfigTest, Ur as parseCatFileBatch, Ut as PrivateNameListError, V as UNKNOWN_MATRIX_JOBS, Vn as serviceRunMain, Vr as lineOf, Vt as privateTextBreaks, W as matrixPeak, Wn as SHARED_ACTIONS, Wr as parseJsonc, Wt as firstNameMatch, X as mayRun, Xn as SECURITY_FILE, Xr as showFiles, Xt as nameMatches, Y as groupParts, Yn as setupCue, Yr as runGitShow, Yt as mergePrivateNames, Z as roadmapOfLine, Zn as isSecurityGate, Zr as specifiersOf, Zt as parsePrivateNames, _ as runPrePushArgs, _n as spansOf, _r as mitText, _t as swallowsTests, a as listRules, an as noConsole, ar as SECURITY_SCAN_COMMIT, at as reachOf, b as GITHUB_YAML, bn as moduleMessage, br as convertGate, bt as isPinned, c as runCli, cn as hasImportMetaMain, cr as securityCallers, ct as UNSHIPPED_FILES, d as HOOK_MARKER, dn as apiReportScript, dr as runnerBudget, dt as unreleasedChangeRule, ei as parseRuleConfig, en as NOT_SOURCE, er as SUMMARY_GATES, et as releaseFiles, f as NO_READ_LINE, fn as containedHome, fr as scheduleMinute, ft as playwrightInstall, g as prePush, gn as shapesOfSource, gr as licenseFileOf, gt as startsTests, h as parsePrePushArgs, hn as shapeMessage, hr as licenseFile, ht as parseAdvisory, i as formatResult, in as isCliFile, ir as summaryJobRule, it as publishedMinorRule, j as typedFiles, jn as MAP_RULE, jr as yamlFaults, jt as DEFAULT_ALLOWED, k as configsOfScript, kn as HOME_EXPORTS, kr as readAction, kt as publishTextSafe, l as runFix, ln as mainCheck, lr as securityOneJob, lt as npmLookup, m as installHook, mn as homeShapesOf, mr as authorOf, mt as jobFails, n as annotations, nn as consoleGate, nr as hasSummaryJob, nt as minorOf, o as readConfig, on as noBuildOutput, or as SECURITY_SCAN_INPUTS, ot as NPM_REGISTRY, p as PRE_PUSH_HOOK, pn as homeShape, pr as LICENSE_TEXTS, pt as hiddenFailures, q as workflowPeaks, qn as callsSharedCi, qr as repositoryOfRemote, qt as lineNameHit, r as createContext, rn as consoleKind, rr as startsOnPullRequest, rt as publishedMinor, s as runChecks, sn as REAL_COMPARE, sr as SECURITY_TIMEOUT_MINUTES, st as SHIPPED_FIELDS, t as USAGE, tn as consoleBreaks, tr as addSummaryJob, tt as lockedVersions, u as summaryMarkdown, un as coverageProvider, ur as withOneJob, ut as unreleasedChange, v as RULES, vn as HOME_SHAPES, vr as repositoryIsPublic, vt as pipeFails, w as versionTitle, wn as homePackage, wr as summaryJob, wt as pushMainOnly, x as workflowParses, xn as moduleUses, xr as gateTrigger, xt as pinnedGitDeps, y as workspaceProtocol, yn as homeModule, yr as ACTIONS_COMMIT, yt as isGitSpecifier, z as sharedDocsRule, zn as SERVICE_PACKAGE, zr as inFolder, zt as privateNamesFiles } from "./run-D7iE_f86.js";
1
+ import { $ as requiredScripts, $n as securityWorkflow, $r as parseConfig, $t as CONSOLE_LAST_DAY, A as scriptsOf, An as HOMES, Ar as readWorkflow, At as packNoBuildinfo, B as TEMPLATE_CALLED, Bn as runCalls, Br as keyLine, Bt as privatePatterns, C as setVersions, Cn as declaredName, Cr as skippableJobs, Ct as pagesAfterRelease, D as trustPolicy, Dn as reposOf, Dr as MATRIX_EXPAND_MAX, Dt as pagesSite, E as TRAIN_SCOPES, En as repoOf, Er as gateAfterCancel, Et as pagesCalls, F as sourceMain, Fn as mergeHomes, Fr as RULE_WARN_DAYS, Ft as PRIVATE_PATTERNS_VARIABLE, G as runnerPeak, Gn as SHARED_CI, Gr as readJsonc, Gt as isAllowedHit, H as calledJobs, Hn as hasTests, Hr as matchesAny, Ht as PRIVATE_NAME_LIST, I as HOME_TIMEOUT_MS, In as npmDrift, Ir as cleanPath, It as invalidPatternBreaks, J as evaluateExpression, Jn as sharedCi, Jr as runGit, Jt as lineNameHits, K as runsAtOnce, Kn as SHARED_WORKFLOWS, Kr as replaceLine, Kt as isCommonUse, L as blockHash, Ln as npmNames, Lr as codePackages, Lt as noLocalPaths, M as testsRequired, Mn as findHomes, Mr as STRICT_OPTIONS, Mt as HOME_PATTERNS, N as isSourcePath, Nn as mapMarkdown, Nr as cuePreset, Nt as PRIVATE_NAMES_FILE_CONFIG, O as typedScripts, On as signaturesOf, Or as parseWorkflow, Ot as exportsRequire, P as pathsOf, Pn as mapText, Pr as DEPENDENCY_FIELDS, Pt as PRIVATE_NAMES_FILE_VARIABLE, Q as roadmapParses, Qn as securityGate, Qr as defaultOptions, Qt as pathNameHit, R as githubFetch, Rn as readOverlay, Rr as hasFile, Rt as privateNamesFile, S as namedVersions, Sn as modulesOf, Sr as prPathFilters, St as siteCheckInCi, T as IGNORE_AFTER, Tn as messageOf, Tr as summaryName, Tt as PAGES_WORKFLOWS, U as eventClass, Un as tsconfigTest, Ur as parseCatFileBatch, Ut as PrivateNameListError, V as UNKNOWN_MATRIX_JOBS, Vn as serviceRunMain, Vr as lineOf, Vt as privateTextBreaks, W as matrixPeak, Wn as SHARED_ACTIONS, Wr as parseJsonc, Wt as firstNameMatch, X as mayRun, Xn as SECURITY_FILE, Xr as showFiles, Xt as nameMatches, Y as groupParts, Yn as setupCue, Yr as runGitShow, Yt as mergePrivateNames, Z as roadmapOfLine, Zn as isSecurityGate, Zr as specifiersOf, Zt as parsePrivateNames, _ as runPrePushArgs, _n as spansOf, _r as mitText, _t as swallowsTests, a as listRules, an as noConsole, ar as SECURITY_SCAN_COMMIT, at as reachOf, b as GITHUB_YAML, bn as moduleMessage, br as convertGate, bt as isPinned, c as runCli, cn as hasImportMetaMain, cr as securityCallers, ct as UNSHIPPED_FILES, d as HOOK_MARKER, dn as apiReportScript, dr as runnerBudget, dt as unreleasedChangeRule, ei as parseRuleConfig, en as NOT_SOURCE, er as SUMMARY_GATES, et as releaseFiles, f as NO_READ_LINE, fn as containedHome, fr as scheduleMinute, ft as playwrightInstall, g as prePush, gn as shapesOfSource, gr as licenseFileOf, gt as startsTests, h as parsePrePushArgs, hn as shapeMessage, hr as licenseFile, ht as parseAdvisory, i as formatResult, in as isCliFile, ir as summaryJobRule, it as publishedMinorRule, j as typedFiles, jn as MAP_RULE, jr as yamlFaults, jt as DEFAULT_ALLOWED, k as configsOfScript, kn as HOME_EXPORTS, kr as readAction, kt as publishTextSafe, l as runFix, ln as mainCheck, lr as securityOneJob, lt as npmLookup, m as installHook, mn as homeShapesOf, mr as authorOf, mt as jobFails, n as annotations, nn as consoleGate, nr as hasSummaryJob, nt as minorOf, o as readConfig, on as noBuildOutput, or as SECURITY_SCAN_INPUTS, ot as NPM_REGISTRY, p as PRE_PUSH_HOOK, pn as homeShape, pr as LICENSE_TEXTS, pt as hiddenFailures, q as workflowPeaks, qn as callsSharedCi, qr as repositoryOfRemote, qt as lineNameHit, r as createContext, rn as consoleKind, rr as startsOnPullRequest, rt as publishedMinor, s as runChecks, sn as REAL_COMPARE, sr as SECURITY_TIMEOUT_MINUTES, st as SHIPPED_FIELDS, t as USAGE, tn as consoleBreaks, tr as addSummaryJob, tt as lockedVersions, u as summaryMarkdown, un as coverageProvider, ur as withOneJob, ut as unreleasedChange, v as RULES, vn as HOME_SHAPES, vr as repositoryIsPublic, vt as pipeFails, w as versionTitle, wn as homePackage, wr as summaryJob, wt as pushMainOnly, x as workflowParses, xn as moduleUses, xr as gateTrigger, xt as pinnedGitDeps, y as workspaceProtocol, yn as homeModule, yr as ACTIONS_COMMIT, yt as isGitSpecifier, z as sharedDocsRule, zn as SERVICE_PACKAGE, zr as inFolder, zt as privateNamesFiles } from "./run-Bg612Pv9.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-B6xQXXcL.js";
4
4
  // src/release-text.ts
@@ -1,4 +1,4 @@
1
- import { a as packageFolders, r as globToRegExp, s as relativePath, t as byCode } from "./workspace-B6xQXXcL.js";
1
+ import { a as packageFolders, i as isWorkspaceFolder, o as parseWorkspaceGlobs, r as globToRegExp, s as relativePath, t as byCode } from "./workspace-B6xQXXcL.js";
2
2
  import { OWNERS } from "./owners.js";
3
3
  import { createRequire } from "node:module";
4
4
  import { spawnSync } from "node:child_process";
@@ -76590,6 +76590,59 @@ const securityOverrides = {
76590
76590
  * each version at the merge. A pull request does not set a version number, so a release of main during its CI cannot
76591
76591
  * take the number.
76592
76592
  */
76593
+ /** The workspace file of pnpm. Changesets finds its packages with the globs of this file (@manypkg/get-packages). */
76594
+ const WORKSPACE_FILE = "pnpm-workspace.yaml";
76595
+ /**
76596
+ * This function gives the text of `pnpm-workspace.yaml` with the glob `"."` as the first item of the block list
76597
+ * `packages`. The new item has the indent of the other items. The function gives undefined when the file has no block
76598
+ * list `packages`, so a flow list `[...]` gets no edit.
76599
+ */
76600
+ function withRootGlob(text) {
76601
+ const eol = text.includes("\r\n") ? "\r\n" : "\n";
76602
+ const lines = text.split(/\r?\n/);
76603
+ const start = lines.findIndex((line) => /^packages\s*:\s*(#.*)?$/.test(line));
76604
+ if (start < 0) return void 0;
76605
+ let indent = " ";
76606
+ for (const line of lines.slice(start + 1)) {
76607
+ const item = /^(\s*)-\s/.exec(line);
76608
+ if (item) {
76609
+ indent = item[1] ?? indent;
76610
+ break;
76611
+ }
76612
+ if (/^\S/.test(line)) break;
76613
+ }
76614
+ lines.splice(start + 1, 0, `${indent}- "."`);
76615
+ return lines.join(eol);
76616
+ }
76617
+ /**
76618
+ * This function gives the break of a workspace whose globs do not name the root, when the root goes to npm.
76619
+ * Changesets takes as packages only the folders of the globs, so it then sees no root package. Then
76620
+ * `changeset version` does not raise the version of the root. And `changeset add` stops with "No versionable packages
76621
+ * found".
76622
+ */
76623
+ function rootGlobBreak(context) {
76624
+ if (!published(context.rootPackage) || !hasFile(context.root, "pnpm-workspace.yaml")) return void 0;
76625
+ const text = readFileSync(join(context.root, WORKSPACE_FILE), "utf8");
76626
+ let globs;
76627
+ try {
76628
+ globs = parseWorkspaceGlobs(text);
76629
+ } catch {
76630
+ return;
76631
+ }
76632
+ if (globs === void 0 || isWorkspaceFolder(".", globs)) return void 0;
76633
+ const after = withRootGlob(text);
76634
+ const line = lineOf(text, "packages:");
76635
+ return {
76636
+ file: WORKSPACE_FILE,
76637
+ ...line === void 0 ? {} : { line },
76638
+ message: `The root package goes to npm, and the globs of ${WORKSPACE_FILE} do not name the root. Changesets takes only the folders of the globs as packages, so it does not see the root: the version of the root does not change, and \`changeset add\` stops with "No versionable packages found".`,
76639
+ ...after === void 0 ? { fix: `Add the glob "." to the list packages of ${WORKSPACE_FILE}.` } : { edits: [{
76640
+ file: WORKSPACE_FILE,
76641
+ before: text,
76642
+ after
76643
+ }] }
76644
+ };
76645
+ }
76593
76646
  /** The file of the release workflow that the template gives each repository. */
76594
76647
  const RELEASE_WORKFLOW = ".github/workflows/release.yml";
76595
76648
  /** The configuration file of Changesets. The release mode (scripts/release/mode.ts) looks for this file. */
@@ -76632,7 +76685,7 @@ const changesetsConfig = {
76632
76685
  id: "changesets-config",
76633
76686
  title: "A repository with a release workflow and a published package has `.changeset/config.json` and the CLI of Changesets.",
76634
76687
  reason: "With a version number in each pull request, each release of main during the CI of a pull request takes that number, and the pull request must bump again. On 11-27 alerts PR 634 took 5 CI runs: main took 0.5.7, 0.6.0, 0.6.1 and 0.6.2. With Changesets, a pull request states only the kind of its change, and the release computes the version at the merge. Open pull requests then also change no version, so the pin moves of the template (bump-pins) can go at any time.",
76635
- fix: "Run `conventions fix --only changesets-config` to write `.changeset/config.json`, then add `@changesets/cli` to the root devDependencies (`pnpm add -Dw @changesets/cli`). From then on, each pull request that changes a published package adds a changeset (`pnpm exec changeset`), and it does not change the version field.",
76688
+ fix: "Run `conventions fix --rule changesets-config` to write `.changeset/config.json`, then add `@changesets/cli` to the root devDependencies (`pnpm add -Dw @changesets/cli`). From then on, each pull request that changes a published package adds a changeset (`pnpm exec changeset`), and it does not change the version field.",
76636
76689
  sources: [
76637
76690
  {
76638
76691
  repo: "vex",
@@ -76674,6 +76727,8 @@ const changesetsConfig = {
76674
76727
  fix: `Run \`pnpm add -Dw ${CHANGESET_CLI}\`, so that the lockfile has it too.`
76675
76728
  });
76676
76729
  }
76730
+ const rootGlob = rootGlobBreak(context);
76731
+ if (rootGlob !== void 0) breaks.push(rootGlob);
76677
76732
  return breaks;
76678
76733
  }
76679
76734
  };
@@ -78254,4 +78309,4 @@ function runHook(args, io) {
78254
78309
  }
78255
78310
  export { requiredScripts as $, securityWorkflow as $n, parseConfig as $r, CONSOLE_LAST_DAY as $t, scriptsOf as A, HOMES as An, readWorkflow as Ar, packNoBuildinfo as At, TEMPLATE_CALLED as B, runCalls as Bn, keyLine as Br, privatePatterns as Bt, setVersions as C, declaredName as Cn, skippableJobs as Cr, pagesAfterRelease as Ct, trustPolicy as D, reposOf as Dn, MATRIX_EXPAND_MAX as Dr, pagesSite as Dt, TRAIN_SCOPES as E, repoOf as En, gateAfterCancel as Er, pagesCalls as Et, sourceMain as F, mergeHomes as Fn, RULE_WARN_DAYS as Fr, PRIVATE_PATTERNS_VARIABLE as Ft, runnerPeak as G, SHARED_CI as Gn, readJsonc as Gr, isAllowedHit as Gt, calledJobs as H, hasTests as Hn, matchesAny as Hr, PRIVATE_NAME_LIST as Ht, HOME_TIMEOUT_MS as I, npmDrift as In, cleanPath as Ir, invalidPatternBreaks as It, evaluateExpression as J, sharedCi as Jn, runGit as Jr, lineNameHits as Jt, runsAtOnce as K, SHARED_WORKFLOWS as Kn, replaceLine as Kr, isCommonUse as Kt, blockHash as L, npmNames as Ln, codePackages as Lr, noLocalPaths as Lt, testsRequired as M, findHomes as Mn, STRICT_OPTIONS as Mr, HOME_PATTERNS as Mt, isSourcePath as N, mapMarkdown as Nn, cuePreset as Nr, PRIVATE_NAMES_FILE_CONFIG as Nt, typedScripts as O, signaturesOf as On, parseWorkflow as Or, exportsRequire as Ot, pathsOf as P, mapText as Pn, DEPENDENCY_FIELDS as Pr, PRIVATE_NAMES_FILE_VARIABLE as Pt, roadmapParses as Q, securityGate as Qn, defaultOptions as Qr, pathNameHit as Qt, githubFetch as R, readOverlay as Rn, hasFile as Rr, privateNamesFile as Rt, namedVersions as S, modulesOf as Sn, prPathFilters as Sr, siteCheckInCi as St, IGNORE_AFTER as T, messageOf$1 as Tn, summaryName as Tr, PAGES_WORKFLOWS as Tt, eventClass as U, tsconfigTest as Un, parseCatFileBatch as Ur, PrivateNameListError as Ut, UNKNOWN_MATRIX_JOBS as V, serviceRunMain as Vn, lineOf as Vr, privateTextBreaks as Vt, matrixPeak as W, SHARED_ACTIONS as Wn, parseJsonc as Wr, firstNameMatch as Wt, mayRun as X, SECURITY_FILE as Xn, showFiles as Xr, nameMatches as Xt, groupParts as Y, setupCue as Yn, runGitShow as Yr, mergePrivateNames as Yt, roadmapOfLine as Z, isSecurityGate as Zn, specifiersOf as Zr, parsePrivateNames as Zt, runPrePushArgs as _, spansOf as _n, mitText as _r, swallowsTests as _t, listRules as a, noConsole as an, SECURITY_SCAN_COMMIT as ar, reachOf as at, GITHUB_YAML as b, moduleMessage as bn, convertGate as br, isPinned as bt, runCli as c, hasImportMetaMain as cn, securityCallers as cr, UNSHIPPED_FILES as ct, HOOK_MARKER as d, apiReportScript as dn, runnerBudget as dr, unreleasedChangeRule as dt, parseRuleConfig as ei, NOT_SOURCE as en, SUMMARY_GATES as er, releaseFiles as et, NO_READ_LINE as f, containedHome as fn, scheduleMinute as fr, playwrightInstall as ft, prePush as g, shapesOfSource as gn, licenseFileOf as gr, startsTests as gt, parsePrePushArgs as h, shapeMessage as hn, licenseFile as hr, parseAdvisory as ht, formatResult as i, isCliFile as in, summaryJobRule as ir, publishedMinorRule as it, typedFiles as j, MAP_RULE as jn, yamlFaults as jr, DEFAULT_ALLOWED as jt, configsOfScript as k, HOME_EXPORTS as kn, readAction as kr, publishTextSafe as kt, runFix as l, mainCheck as ln, securityOneJob as lr, npmLookup as lt, installHook as m, homeShapesOf as mn, authorOf as mr, jobFails as mt, annotations as n, consoleGate as nn, hasSummaryJob as nr, minorOf as nt, readConfig as o, noBuildOutput as on, SECURITY_SCAN_INPUTS as or, NPM_REGISTRY as ot, PRE_PUSH_HOOK as p, homeShape as pn, LICENSE_TEXTS as pr, hiddenFailures as pt, workflowPeaks as q, callsSharedCi as qn, repositoryOfRemote as qr, lineNameHit as qt, createContext as r, consoleKind as rn, startsOnPullRequest as rr, publishedMinor as rt, runChecks as s, REAL_COMPARE as sn, SECURITY_TIMEOUT_MINUTES as sr, SHIPPED_FIELDS as st, USAGE as t, consoleBreaks as tn, addSummaryJob as tr, lockedVersions as tt, summaryMarkdown as u, coverageProvider as un, withOneJob as ur, unreleasedChange as ut, RULES as v, HOME_SHAPES as vn, repositoryIsPublic as vr, pipeFails as vt, versionTitle as w, homePackage as wn, summaryJob as wr, pushMainOnly as wt, workflowParses as x, moduleUses as xn, gateTrigger as xr, pinnedGitDeps as xt, workspaceProtocol as y, homeModule as yn, ACTIONS_COMMIT as yr, isGitSpecifier as yt, sharedDocsRule as z, SERVICE_PACKAGE as zn, inFolder as zr, privateNamesFiles as zt };
78256
78311
 
78257
- //# sourceMappingURL=run-D7iE_f86.js.map
78312
+ //# sourceMappingURL=run-Bg612Pv9.js.map