@mark1russell7/conventions 0.41.1 → 0.41.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/build/cli.js +1 -1
- package/build/index.d.ts +1 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +2 -2
- package/build/{run-aNVZ1j7b.js → run-DWgvhE99.js} +192 -2
- package/build/run-DWgvhE99.js.map +1 -0
- package/package.json +6 -4
- package/build/run-aNVZ1j7b.js.map +0 -1
package/README.md
CHANGED
|
@@ -75,6 +75,7 @@ The rules come from the invariants audit of 2026-10-26 (strategy item s38). The
|
|
|
75
75
|
| `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). |
|
|
76
76
|
| `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`. |
|
|
77
77
|
| `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). |
|
|
78
|
+
| `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. |
|
|
78
79
|
| `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). |
|
|
79
80
|
| `pages-site` | A public repository has a workflow that calls the Pages workflow of the template (`mark1russell7/template/.github/workflows/reusable-pages.yml`, any ref), and the call deploys. A call with `deploy: false` makes a test site only. In a GitHub Actions run, the event file tells if the repository is public. Outside a run, the rule shows `skip`. On 2026-11-02 eight public repositories had no site with a Releases page and a Status page. | vex, crawler, client, coeval `pages.yml`. |
|
|
80
81
|
| `pages-after-release` | A repository with a public package and a release workflow starts its Pages workflow after a release and on each day. `conventions fix` writes the triggers. A workflow with its own deploy steps needs a person. |
|
package/build/cli.js
CHANGED
package/build/index.d.ts
CHANGED
|
@@ -501,6 +501,7 @@ export declare function invalidPatternBreaks(patterns: readonly PrivatePattern[]
|
|
|
501
501
|
export declare function privateTextBreaks(name: string, text: string, privates: PrivateSources, options?: TextBreakOptions): Break[];
|
|
502
502
|
export declare const noLocalPaths: Rule;
|
|
503
503
|
export declare const packNoBuildinfo: Rule;
|
|
504
|
+
export declare const exportsRequire: Rule;
|
|
504
505
|
export declare const apiReportScript: Rule;
|
|
505
506
|
export declare const pagesAfterRelease: Rule;
|
|
506
507
|
/** The Pages workflow of the template, as a call from another repository and as a call from the template itself. */
|
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-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/api-report-script.ts","../src/rules/pages-after-release.ts","../src/rules/pages-site.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":";;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;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QAAQ;;WAER,oBAAoB;;;UAId;;WAEN;;WAEA;;;;;WAKA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;;wBAsGK,gBAAgB,KAAK,SAAS,sCAAsC;;;;;wBAQpE,iBAAiB,KAAK,SAAS,qCAAqC,MAAM;;wBAS1E,qBAAqB,mBAAmB,mBAAmB;;;;;;;wBAiB3D,kBAAkB,cAAc,cAAc,UAAU,gBAAgB,UAAS,mBAAwB;qBAwC5G,cAAc;qBCnGd,iBAAiB;
|
|
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-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/exports-require.ts","../src/rules/api-report-script.ts","../src/rules/pages-after-release.ts","../src/rules/pages-site.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":";;UASiB;WACN;WACA;WACA;;;UAIM;;WAEN;;WAEA;WACA;;WAEA;;WAEA,iBAAiB;;;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AgB,IAAI,KAAK;;qBA2E7C;;;;;;;;qBAgCA;;UAgBI;;WAEN;WACA,KAAK,SAAS;;WAEd,MAAM;;;;;;;wBAWD,YAAY,SAAS,aAAa,IAAI,KAAK;;qBCzX9C,cAAc,SAAS;WAA0B;WAA0B;;UC6EvE;WACN;WACA;WACA;;WAEA;WACA;;;UAIM;;WAEN;;WAEA;;WAEA;;;UAIM;WACN;WACA;WACA;WACA,gBAAgB;;;UAIV;;WAEN;;WAEA;;WAEA;;WAEA;WACA,iBAAiB;WACjB,eAAe;;;wBAgGV,aAAa,cAAc,eAAe;;;;;;;wBAmD1C,WAAW,cAAc,eAAe;;;;;;;;qBChQ3C;;wBAGG,QAAQ,cAAc,iBAAiB;;;;;;;;wBAavC,iBAAiB,kBAAkB,iBAAiB;;wBA+BpD,OAAO,cAAc;;;;;wBAQrB,aAAa,cAAc,iBAAiB"}
|
package/build/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as unreleasedChangeRule, $t as
|
|
1
|
+
import { $ as unreleasedChangeRule, $t as MAP_RULE, A as typedFiles, An as readWorkflow, At as lineNameHits, B as roadmapParses, Bn as lineOf, Bt as LICENSE_TEXTS, C as versionTitle, Cn as ACTIONS_COMMIT, Ct as privateTextBreaks, D as typedScripts, Dn as summaryName, Dt as isAllowedHit, E as trustPolicy, En as prPathFilters, Et as firstNameMatch, F as HOME_TIMEOUT_MS, Fn as cleanPath, Ft as REAL_COMPARE, G as publishedMinor, Gn as runGit, Gt as repositoryIsPublic, H as releaseFiles, Hn as parseJsonc, Ht as licenseFile, I as blockHash, In as codePackages, It as hasImportMetaMain, J as NPM_REGISTRY, Jn as parseConfig, Jt as messageOf, K as publishedMinorRule, Kn as specifiersOf, Kt as declaredName, L as githubFetch, Ln as hasFile, Lt as mainCheck, M as isSourcePath, Mn as cuePreset, Mt as parsePrivateNames, N as pathsOf, Nn as DEPENDENCY_FIELDS, Nt as pathNameHit, O as configsOfScript, On as gateAfterCancel, Ot as isCommonUse, P as sourceMain, Pn as RULE_WARN_DAYS, Pt as noBuildOutput, Q as unreleasedChange, Qt as HOMES, R as sharedDocsRule, Rn as inFolder, Rt as coverageProvider, S as setVersions, Sn as withOneJob, St as privatePatterns, T as TRAIN_SCOPES, Tn as gateTrigger, Tt as PrivateNameListError, U as lockedVersions, Un as readJsonc, Ut as licenseFileOf, V as requiredScripts, Vn as matchesAny, Vt as authorOf, W as minorOf, Wn as replaceLine, Wt as mitText, X as UNSHIPPED_FILES, Xt as reposOf, Y as SHIPPED_FIELDS, Yt as repoOf, Z as npmLookup, Zt as signaturesOf, _ as workspaceProtocol, _n as SECURITY_SCAN_COMMIT, _t as PRIVATE_NAMES_FILE_VARIABLE, a as listRules, an as HOME_EXPORTS, at as repositoryOfRemote, b as yamlFaults, bn as securityCallers, bt as noLocalPaths, c as runCli, cn as serviceRunMain, ct as pushMainOnly, d as HOOK_MARKER, dn as SHARED_ACTIONS, dt as pagesSite, en as findHomes, et as pipeFails, f as NO_READ_LINE, fn as SHARED_CI, ft as exportsRequire, g as RULES, gn as setupCue, gt as PRIVATE_NAMES_FILE_CONFIG, h as prePush, hn as sharedCi, ht as HOME_PATTERNS, i as formatResult, in as readOverlay, it as pagesAfterRelease, j as testsRequired, jn as STRICT_OPTIONS, jt as nameMatches, k as scriptsOf, kn as readAction, kt as lineNameHit, l as runFix, ln as hasTests, lt as PAGES_WORKFLOWS, m as installHook, mn as callsSharedCi, mt as DEFAULT_ALLOWED, n as annotations, nn as mapText, nt as isPinned, o as readConfig, on as SERVICE_PACKAGE, ot as runnerBudget, p as PRE_PUSH_HOOK, pn as SHARED_WORKFLOWS, pt as packNoBuildinfo, q as reachOf, qn as defaultOptions, qt as homePackage, r as createContext, rn as mergeHomes, rt as pinnedGitDeps, s as runChecks, sn as runCalls, st as scheduleMinute, t as USAGE, tn as mapMarkdown, tt as isGitSpecifier, u as summaryMarkdown, un as tsconfigTest, ut as pagesCalls, v as GITHUB_YAML, vn as SECURITY_SCAN_INPUTS, vt as PRIVATE_PATTERNS_VARIABLE, w as IGNORE_AFTER, wn as convertGate, wt as PRIVATE_NAME_LIST, x as namedVersions, xn as securityOneJob, xt as privateNamesFile, y as workflowParses, yn as SECURITY_TIMEOUT_MINUTES, yt as invalidPatternBreaks, z as roadmapOfLine, zn as keyLine, zt as apiReportScript } from "./run-DWgvhE99.js";
|
|
2
2
|
import { i as packageFolders, n as globFolders, r as globToRegExp, s as workspaceGlobs } from "./workspace-Cx7p7bWn.js";
|
|
3
3
|
// src/release-text.ts
|
|
4
4
|
/**
|
|
@@ -65,6 +65,6 @@ function releaseNotes(name, version, changelog) {
|
|
|
65
65
|
if (section.length <= 1e5) return section;
|
|
66
66
|
return `${section.slice(0, MAX_NOTES)}\n\n(The CHANGELOG.md of \`${name}\` has the full text.)`;
|
|
67
67
|
}
|
|
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, findHomes, firstNameMatch, formatResult, gateAfterCancel, gateTrigger, githubFetch, globFolders, globToRegExp, hasFile, hasImportMetaMain, hasTests, 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, nameMatches, namedVersions, noBuildOutput, noLocalPaths, npmLookup, npmUrl, packNoBuildinfo, packageFolders, pagesAfterRelease, pagesCalls, pagesSite, parseConfig, parseJsonc, parsePrivateNames, pathNameHit, pathsOf, pinnedGitDeps, pipeFails, prPathFilters, prePush, privateNamesFile, privatePatterns, privateTextBreaks, 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, sourceMain, specifiersOf, summaryMarkdown, summaryName, tagName, testsRequired, trustPolicy, tsconfigTest, typedFiles, typedScripts, unreleasedChange, unreleasedChangeRule, versionTitle, withOneJob, workflowParses, workspaceGlobs, workspaceProtocol, yamlFaults };
|
|
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, 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, nameMatches, namedVersions, noBuildOutput, noLocalPaths, npmLookup, npmUrl, packNoBuildinfo, packageFolders, pagesAfterRelease, pagesCalls, pagesSite, parseConfig, parseJsonc, parsePrivateNames, pathNameHit, pathsOf, pinnedGitDeps, pipeFails, prPathFilters, prePush, privateNamesFile, privatePatterns, privateTextBreaks, 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, sourceMain, specifiersOf, summaryMarkdown, summaryName, tagName, testsRequired, trustPolicy, tsconfigTest, typedFiles, typedScripts, unreleasedChange, unreleasedChangeRule, versionTitle, withOneJob, workflowParses, workspaceGlobs, workspaceProtocol, yamlFaults };
|
|
69
69
|
|
|
70
70
|
//# sourceMappingURL=index.js.map
|
|
@@ -10786,6 +10786,195 @@ const packNoBuildinfo = {
|
|
|
10786
10786
|
return breaks;
|
|
10787
10787
|
}
|
|
10788
10788
|
};
|
|
10789
|
+
// src/rules/exports-require.ts
|
|
10790
|
+
/**
|
|
10791
|
+
* The rule `exports-require`: each entry of the published `exports` that resolves for `import` also resolves for
|
|
10792
|
+
* `require`. A conditional entry with `import` has a `default` (or a `require`).
|
|
10793
|
+
*/
|
|
10794
|
+
/** The conditions of an ES module import in Node. Node also adds `default`. */
|
|
10795
|
+
const IMPORT_CONDITIONS = /* @__PURE__ */ new Set([
|
|
10796
|
+
"import",
|
|
10797
|
+
"node",
|
|
10798
|
+
"default"
|
|
10799
|
+
]);
|
|
10800
|
+
/** The conditions of a CommonJS `require()` in Node. Node also adds `default`. */
|
|
10801
|
+
const REQUIRE_CONDITIONS = /* @__PURE__ */ new Set([
|
|
10802
|
+
"require",
|
|
10803
|
+
"node",
|
|
10804
|
+
"default"
|
|
10805
|
+
]);
|
|
10806
|
+
/**
|
|
10807
|
+
* This function resolves a value of `exports` for a set of conditions, as PACKAGE_TARGET_RESOLVE of Node does. A
|
|
10808
|
+
* string is a target. A null is a target null. An array gives its first item that resolves, else null when an item is
|
|
10809
|
+
* null. An object examines its keys in their order. A key `default` or a key in `conditions` gives the resolution of
|
|
10810
|
+
* its value. When no condition of that value matches, the object examines its next key.
|
|
10811
|
+
*/
|
|
10812
|
+
function resolveExport(value, conditions, path = []) {
|
|
10813
|
+
if (typeof value === "string") return {
|
|
10814
|
+
target: value,
|
|
10815
|
+
path
|
|
10816
|
+
};
|
|
10817
|
+
if (value === null) return null;
|
|
10818
|
+
if (Array.isArray(value)) {
|
|
10819
|
+
if (value.length === 0) return null;
|
|
10820
|
+
let excluded = false;
|
|
10821
|
+
for (const [index, item] of value.entries()) {
|
|
10822
|
+
const resolved = resolveExport(item, conditions, [...path, index]);
|
|
10823
|
+
if (resolved === null) excluded = true;
|
|
10824
|
+
else if (resolved !== void 0) return resolved;
|
|
10825
|
+
}
|
|
10826
|
+
return excluded ? null : void 0;
|
|
10827
|
+
}
|
|
10828
|
+
if (typeof value === "object") for (const [key, item] of Object.entries(value)) {
|
|
10829
|
+
if (key !== "default" && !conditions.has(key)) continue;
|
|
10830
|
+
const resolved = resolveExport(item, conditions, [...path, key]);
|
|
10831
|
+
if (resolved !== void 0) return resolved;
|
|
10832
|
+
}
|
|
10833
|
+
}
|
|
10834
|
+
/**
|
|
10835
|
+
* This function gives the entries of a value of `exports`, by subpath. A string, an array or an object of conditions
|
|
10836
|
+
* is the entry of the subpath `.`. It gives an empty list when the object mixes subpaths and conditions: Node refuses
|
|
10837
|
+
* that value.
|
|
10838
|
+
*/
|
|
10839
|
+
function exportEntries(exports) {
|
|
10840
|
+
if (typeof exports !== "object" || exports === null || Array.isArray(exports)) return exports === void 0 ? [] : [[".", exports]];
|
|
10841
|
+
const keys = Object.keys(exports);
|
|
10842
|
+
const subpaths = keys.filter((key) => key.startsWith("."));
|
|
10843
|
+
if (subpaths.length === keys.length) return Object.entries(exports);
|
|
10844
|
+
return subpaths.length === 0 ? [[".", exports]] : [];
|
|
10845
|
+
}
|
|
10846
|
+
/** This function gives the value at a path in a value of JSON, or undefined. */
|
|
10847
|
+
function valueAt(value, path) {
|
|
10848
|
+
let at = value;
|
|
10849
|
+
for (const key of path) {
|
|
10850
|
+
if (typeof at !== "object" || at === null) return void 0;
|
|
10851
|
+
at = at[key];
|
|
10852
|
+
}
|
|
10853
|
+
return at;
|
|
10854
|
+
}
|
|
10855
|
+
/** This function gives the index after the end of the object that contains the index `from` (after its `}`), or -1. */
|
|
10856
|
+
function objectEnd(text, from) {
|
|
10857
|
+
let depth = 0;
|
|
10858
|
+
for (let at = from; at < text.length; at++) {
|
|
10859
|
+
const char = text.charAt(at);
|
|
10860
|
+
if (char === "\"") {
|
|
10861
|
+
at++;
|
|
10862
|
+
while (at < text.length && text.charAt(at) !== "\"") at += text.charAt(at) === "\\" ? 2 : 1;
|
|
10863
|
+
} else if (char === "{" || char === "[") depth++;
|
|
10864
|
+
else if (char === "}" || char === "]") {
|
|
10865
|
+
if (depth === 0) return char === "}" ? at + 1 : -1;
|
|
10866
|
+
depth--;
|
|
10867
|
+
}
|
|
10868
|
+
}
|
|
10869
|
+
return -1;
|
|
10870
|
+
}
|
|
10871
|
+
/**
|
|
10872
|
+
* This function gives the text of `package.json` with the member `"default": target` at the end of the object at
|
|
10873
|
+
* `objectPath`, in the format of the file. The object holds the member `"import": target`. The function gives undefined
|
|
10874
|
+
* when it cannot find the object, or when the changed text does not parse as the manifest with the new member.
|
|
10875
|
+
*/
|
|
10876
|
+
function withDefault(pkg, objectPath, target) {
|
|
10877
|
+
const expected = structuredClone(pkg.manifest);
|
|
10878
|
+
const object = valueAt(expected, objectPath);
|
|
10879
|
+
if (typeof object !== "object" || object === null || Array.isArray(object) || "default" in object) return void 0;
|
|
10880
|
+
object["default"] = target;
|
|
10881
|
+
const wanted = JSON.stringify(expected);
|
|
10882
|
+
const eol = pkg.text.includes("\r\n") ? "\r\n" : "\n";
|
|
10883
|
+
const member = new RegExp(`"import"\\s*:\\s*${JSON.stringify(target).replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}`, "g");
|
|
10884
|
+
for (const match of pkg.text.matchAll(member)) {
|
|
10885
|
+
const start = match.index ?? 0;
|
|
10886
|
+
const end = objectEnd(pkg.text, start + match[0].length);
|
|
10887
|
+
if (end < 0) continue;
|
|
10888
|
+
const close = end - 1;
|
|
10889
|
+
let last = close - 1;
|
|
10890
|
+
while (last > start && /\s/.test(pkg.text.charAt(last))) last--;
|
|
10891
|
+
const multiline = pkg.text.slice(last + 1, close).includes("\n");
|
|
10892
|
+
const indent = /^[ \t]*/.exec(pkg.text.slice(pkg.text.lastIndexOf("\n", start) + 1))?.[0] ?? "";
|
|
10893
|
+
const separator = multiline ? `,${eol}${indent}` : ", ";
|
|
10894
|
+
const after = `${pkg.text.slice(0, last + 1)}${separator}"default": ${JSON.stringify(target)}${pkg.text.slice(last + 1)}`;
|
|
10895
|
+
try {
|
|
10896
|
+
if (JSON.stringify(JSON.parse(after)) === wanted) return after;
|
|
10897
|
+
} catch {}
|
|
10898
|
+
}
|
|
10899
|
+
}
|
|
10900
|
+
/** This function gives the published `exports` of a manifest: `publishConfig.exports` when it exists, else `exports`. */
|
|
10901
|
+
function publishedExports(manifest) {
|
|
10902
|
+
const published = manifest["publishConfig"];
|
|
10903
|
+
if (typeof published === "object" && published !== null && published["exports"] !== void 0) return {
|
|
10904
|
+
field: "publishConfig.exports",
|
|
10905
|
+
value: published["exports"]
|
|
10906
|
+
};
|
|
10907
|
+
return {
|
|
10908
|
+
field: "exports",
|
|
10909
|
+
value: manifest["exports"]
|
|
10910
|
+
};
|
|
10911
|
+
}
|
|
10912
|
+
const exportsRequire = {
|
|
10913
|
+
id: "exports-require",
|
|
10914
|
+
title: "Each entry of the published `exports` that resolves for `import` also resolves for `require`: a conditional entry with `import` has a `default`.",
|
|
10915
|
+
reason: "Node resolves `exports` by conditions. A CommonJS loader asks for `require`, `node` and `default`. An entry with only `types` and `import` has no target for these conditions, so `require()` of the package stops with ERR_PACKAGE_PATH_NOT_EXPORTED. This occurs also on Node 22 and 24, which can load an ES module with `require()`. On 2026-11-12 the config loader of Playwright, which is CommonJS, could not load six rigor packages for this reason (rigor#196).",
|
|
10916
|
+
fix: "Add `\"default\"` with the target of `\"import\"` as the last member of the entry, for example `{ \"types\": \"./build/index.d.ts\", \"import\": \"./build/index.js\", \"default\": \"./build/index.js\" }`. `conventions fix` writes it. A target null for `require` keeps a package from CommonJS on purpose, and the rule accepts it. A module with a top-level `await` cannot load with `require()`: give it a `require` target with a CommonJS build.",
|
|
10917
|
+
sources: [
|
|
10918
|
+
{
|
|
10919
|
+
repo: "rigor",
|
|
10920
|
+
rule: "exports-require",
|
|
10921
|
+
doc: "packages/*/package.json (publishConfig.exports, rigor#196)"
|
|
10922
|
+
},
|
|
10923
|
+
{
|
|
10924
|
+
repo: "packing",
|
|
10925
|
+
rule: "exports-default",
|
|
10926
|
+
doc: "packages/packing/package.json (publishConfig.exports)"
|
|
10927
|
+
},
|
|
10928
|
+
{
|
|
10929
|
+
repo: "highways",
|
|
10930
|
+
rule: "exports-default",
|
|
10931
|
+
doc: "packages/core/package.json (publishConfig.exports)"
|
|
10932
|
+
},
|
|
10933
|
+
{
|
|
10934
|
+
repo: "layout-contract",
|
|
10935
|
+
rule: "exports-default",
|
|
10936
|
+
doc: "packages/layout-contract/package.json (publishConfig.exports)"
|
|
10937
|
+
},
|
|
10938
|
+
{
|
|
10939
|
+
repo: "vex",
|
|
10940
|
+
rule: "exports-default",
|
|
10941
|
+
doc: "packages/core/package.json (publishConfig.exports)"
|
|
10942
|
+
}
|
|
10943
|
+
],
|
|
10944
|
+
options: {},
|
|
10945
|
+
failsFrom: "2026-11-27",
|
|
10946
|
+
check(context) {
|
|
10947
|
+
const breaks = [];
|
|
10948
|
+
for (const pkg of rootAndCodePackages(context)) {
|
|
10949
|
+
if (pkg.manifest["private"] === true) continue;
|
|
10950
|
+
const name = String(pkg.manifest["name"] ?? pkg.folder);
|
|
10951
|
+
const { field, value } = publishedExports(pkg.manifest);
|
|
10952
|
+
const base = field === "exports" ? ["exports"] : ["publishConfig", "exports"];
|
|
10953
|
+
const fieldLine = field === "exports" ? lineOf(pkg.text, "\"exports\"") : keyLine(pkg.text, "publishConfig", "exports");
|
|
10954
|
+
const subpaths = typeof value === "object" && value !== null && !Array.isArray(value) && Object.keys(value).every((key) => key.startsWith("."));
|
|
10955
|
+
for (const [subpath, entry] of exportEntries(value)) {
|
|
10956
|
+
const imported = resolveExport(entry, IMPORT_CONDITIONS);
|
|
10957
|
+
if (imported === void 0 || imported === null) continue;
|
|
10958
|
+
if (resolveExport(entry, REQUIRE_CONDITIONS) !== void 0) continue;
|
|
10959
|
+
const found = [...subpaths ? [...base, subpath] : base, ...imported.path];
|
|
10960
|
+
const parent = found.slice(0, -1);
|
|
10961
|
+
const after = found[found.length - 1] === "import" ? withDefault(pkg, parent, imported.target) : void 0;
|
|
10962
|
+
const line = (subpaths ? keyLine(pkg.text, field === "exports" ? "exports" : "publishConfig", subpath) : void 0) ?? fieldLine;
|
|
10963
|
+
breaks.push({
|
|
10964
|
+
file: pkg.file,
|
|
10965
|
+
...line === void 0 ? {} : { line },
|
|
10966
|
+
message: `The entry "${subpath}" of ${field} of ${name} resolves for import (${imported.target}) and not for require: require() of it stops with ERR_PACKAGE_PATH_NOT_EXPORTED.`,
|
|
10967
|
+
...after === void 0 ? { fix: `Give the entry "${subpath}" of ${field} a target for require: "default": ${JSON.stringify(imported.target)} as the last member of the object that holds "import", or "require": ${JSON.stringify(imported.target)} before its "default".` } : { edits: [{
|
|
10968
|
+
file: pkg.file,
|
|
10969
|
+
before: pkg.text,
|
|
10970
|
+
after
|
|
10971
|
+
}] }
|
|
10972
|
+
});
|
|
10973
|
+
}
|
|
10974
|
+
}
|
|
10975
|
+
return breaks;
|
|
10976
|
+
}
|
|
10977
|
+
};
|
|
10789
10978
|
// src/rules/pages-site.ts
|
|
10790
10979
|
/**
|
|
10791
10980
|
* The rule `pages-site`: a public repository has a site. A workflow uses the Pages workflow of the template, and the
|
|
@@ -14190,6 +14379,7 @@ const RULES = [
|
|
|
14190
14379
|
licenseFile,
|
|
14191
14380
|
coverageProvider,
|
|
14192
14381
|
packNoBuildinfo,
|
|
14382
|
+
exportsRequire,
|
|
14193
14383
|
pagesSite,
|
|
14194
14384
|
pagesAfterRelease,
|
|
14195
14385
|
sharedDocs
|
|
@@ -15076,6 +15266,6 @@ function runHook(args, io) {
|
|
|
15076
15266
|
git: (gitArgs) => runGit(io.cwd, gitArgs)
|
|
15077
15267
|
}, io);
|
|
15078
15268
|
}
|
|
15079
|
-
export { unreleasedChangeRule as $,
|
|
15269
|
+
export { unreleasedChangeRule as $, MAP_RULE as $t, typedFiles as A, readWorkflow as An, lineNameHits as At, roadmapParses as B, lineOf as Bn, LICENSE_TEXTS as Bt, versionTitle as C, ACTIONS_COMMIT as Cn, privateTextBreaks as Ct, typedScripts as D, summaryName as Dn, isAllowedHit as Dt, trustPolicy as E, prPathFilters as En, firstNameMatch as Et, HOME_TIMEOUT_MS as F, cleanPath as Fn, REAL_COMPARE as Ft, publishedMinor as G, runGit as Gn, repositoryIsPublic as Gt, releaseFiles as H, parseJsonc as Hn, licenseFile as Ht, blockHash as I, codePackages as In, hasImportMetaMain as It, NPM_REGISTRY as J, parseConfig as Jn, messageOf as Jt, publishedMinorRule as K, specifiersOf as Kn, declaredName as Kt, githubFetch as L, hasFile as Ln, mainCheck as Lt, isSourcePath as M, cuePreset as Mn, parsePrivateNames as Mt, pathsOf as N, DEPENDENCY_FIELDS as Nn, pathNameHit as Nt, configsOfScript as O, gateAfterCancel as On, isCommonUse as Ot, sourceMain as P, RULE_WARN_DAYS as Pn, noBuildOutput as Pt, unreleasedChange as Q, HOMES as Qt, sharedDocsRule as R, inFolder as Rn, coverageProvider as Rt, setVersions as S, withOneJob as Sn, privatePatterns as St, TRAIN_SCOPES as T, gateTrigger as Tn, PrivateNameListError as Tt, lockedVersions as U, readJsonc as Un, licenseFileOf as Ut, requiredScripts as V, matchesAny as Vn, authorOf as Vt, minorOf as W, replaceLine as Wn, mitText as Wt, UNSHIPPED_FILES as X, reposOf as Xt, SHIPPED_FIELDS as Y, repoOf as Yt, npmLookup as Z, signaturesOf as Zt, workspaceProtocol as _, SECURITY_SCAN_COMMIT as _n, PRIVATE_NAMES_FILE_VARIABLE as _t, listRules as a, HOME_EXPORTS as an, repositoryOfRemote as at, yamlFaults as b, securityCallers as bn, noLocalPaths as bt, runCli as c, serviceRunMain as cn, pushMainOnly as ct, HOOK_MARKER as d, SHARED_ACTIONS as dn, pagesSite as dt, findHomes as en, pipeFails as et, NO_READ_LINE as f, SHARED_CI as fn, exportsRequire as ft, RULES as g, setupCue as gn, PRIVATE_NAMES_FILE_CONFIG as gt, prePush as h, sharedCi as hn, HOME_PATTERNS as ht, formatResult as i, readOverlay as in, pagesAfterRelease as it, testsRequired as j, STRICT_OPTIONS as jn, nameMatches as jt, scriptsOf as k, readAction as kn, lineNameHit as kt, runFix as l, hasTests as ln, PAGES_WORKFLOWS as lt, installHook as m, callsSharedCi as mn, DEFAULT_ALLOWED as mt, annotations as n, mapText as nn, isPinned as nt, readConfig as o, SERVICE_PACKAGE as on, runnerBudget as ot, PRE_PUSH_HOOK as p, SHARED_WORKFLOWS as pn, packNoBuildinfo as pt, reachOf as q, defaultOptions as qn, homePackage as qt, createContext as r, mergeHomes as rn, pinnedGitDeps as rt, runChecks as s, runCalls as sn, scheduleMinute as st, USAGE as t, mapMarkdown as tn, isGitSpecifier as tt, summaryMarkdown as u, tsconfigTest as un, pagesCalls as ut, GITHUB_YAML as v, SECURITY_SCAN_INPUTS as vn, PRIVATE_PATTERNS_VARIABLE as vt, IGNORE_AFTER as w, convertGate as wn, PRIVATE_NAME_LIST as wt, namedVersions as x, securityOneJob as xn, privateNamesFile as xt, workflowParses as y, SECURITY_TIMEOUT_MINUTES as yn, invalidPatternBreaks as yt, roadmapOfLine as z, keyLine as zn, apiReportScript as zt };
|
|
15080
15270
|
|
|
15081
|
-
//# sourceMappingURL=run-
|
|
15271
|
+
//# sourceMappingURL=run-DWgvhE99.js.map
|