@rightkit/release 0.6.57 → 0.6.62
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 +4 -0
- package/acceptance-admission.mjs +104 -0
- package/acceptance-launch.mjs +234 -0
- package/acceptance-lines.mjs +1254 -0
- package/acceptance-result.mjs +77 -0
- package/acceptance-rows.mjs +47 -0
- package/admission-files.mjs +2 -0
- package/affected-units.mjs +17 -0
- package/app-check.mjs +6 -2
- package/app-closure.mjs +3 -1
- package/bin/rightkit-gate.mjs +552 -124
- package/broker-admission.mjs +45 -2
- package/broker-pins.mjs +11 -1
- package/broker-toolchain.mjs +113 -0
- package/cargo-profile-contract.mjs +7 -2
- package/class-a-cache-history.mjs +170 -0
- package/cli/right-release.mjs +0 -0
- package/code-closure.mjs +24 -0
- package/config-inspect.mjs +6 -0
- package/consumer-contracts.mjs +3 -1
- package/contract-nn.json +166 -0
- package/deterministic-scans.mjs +835 -112
- package/feature-coverage.mjs +109 -82
- package/feature-partition.mjs +76 -0
- package/forbidden-literals.mjs +78 -0
- package/gate/calls.mjs +121 -0
- package/gate/compile.mjs +190 -0
- package/gate/crate-results.mjs +127 -0
- package/gate/run-calls.mjs +241 -0
- package/gate/tests.mjs +234 -0
- package/gate-coverage.mjs +12 -3
- package/gate-release-admission.mjs +200 -0
- package/gate-seam.mjs +100 -4
- package/gate-serve.mjs +179 -34
- package/gate-stages.mjs +59 -0
- package/legacy-contract-receipt.mjs +809 -0
- package/local-publish.mjs +2 -4
- package/local-runtime.mjs +2 -2
- package/nsis-payload.mjs +4 -3
- package/ownership-applicability.mjs +5 -0
- package/ownership-class-rules.mjs +19 -8
- package/ownership-mandatory-set.json +15 -21
- package/ownership-mandatory-set.mjs +19 -4
- package/package.json +14 -8
- package/probe-memo.mjs +252 -0
- package/publication-artifacts.mjs +56 -2
- package/publish-local-npm.mjs +3 -0
- package/publish-update.mjs +2 -2
- package/receipt-signature.mjs +40 -0
- package/release.mjs +47 -29
- package/resident-answers.mjs +66 -0
- package/rightkit-ownership.json +20 -11
- package/rightkit-versions.json +349 -183
- package/runtime-bundle-stage.mjs +146 -0
- package/scan-digest.mjs +28 -4
- package/seam-broker.mjs +8 -1
- package/shell-contract.mjs +23 -2
- package/snapshot-changes.mjs +106 -0
- package/snapshot-check.mjs +17 -13
- package/snapshot-dependency-reuse.mjs +186 -14
- package/snapshot-git.mjs +17 -1
- package/snapshot-metadata.mjs +155 -3
- package/snapshot.mjs +89 -12
- package/spawn-ledger.mjs +21 -2
- package/stage-sidecar.mjs +231 -19
- package/suite-trust-roots.mjs +2 -2
- package/test-env.mjs +26 -0
- package/tool-version-memo.mjs +46 -0
- package/win-package-recipe.mjs +11 -0
- package/bin/darwin/rightkit-swap +0 -0
- package/gate-acceptance.mjs +0 -3362
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
// The twelve-line result record (rightkit.acceptance-result/1) an admission reads (docs/GATE-CONTRACT.md GC-A27, rightkit#1514 step 9). Built from three things this module
|
|
2
|
+
// does not decide: the launcher's record of the run (launch.json), the judge's verdict (acceptance-lines.mjs --json) and the broker's own receipts that appeared during the run
|
|
3
|
+
// (each holds the small signed `publication` claim). It writes no verdict of its own and it changes neither the judge nor the launcher.
|
|
4
|
+
//
|
|
5
|
+
// node acceptance-result.mjs --run <run dir> --repo <dir> --receipts <broker receipts dir> --out <result dir> [any other acceptance-lines.mjs option]
|
|
6
|
+
//
|
|
7
|
+
// <result dir> then holds acceptance-result.json, job-claims/<id>.json (one { id, publication } per broker job of the run) and, when the run's gate is a sealed install,
|
|
8
|
+
// gate-seal/manifest.txt and gate-seal/trusted-gate-source.json: the folder layout `gate-release-admission.mjs` reads.
|
|
9
|
+
import fs from "node:fs";
|
|
10
|
+
import path from "node:path";
|
|
11
|
+
import { createHash } from "node:crypto";
|
|
12
|
+
import { execFileSync } from "node:child_process";
|
|
13
|
+
import { fileURLToPath } from "node:url";
|
|
14
|
+
import { ACCEPTANCE_RESULT_SCHEMA, judgeFileHashes } from "./acceptance-admission.mjs";
|
|
15
|
+
import { CONTRACT_FILE } from "./acceptance-lines.mjs";
|
|
16
|
+
|
|
17
|
+
const here = path.dirname(fileURLToPath(import.meta.url));
|
|
18
|
+
const sha256 = (bytes) => createHash("sha256").update(bytes).digest("hex");
|
|
19
|
+
const HOST_OF_PLATFORM = Object.freeze({ win32: "dell", darwin: "mac" });
|
|
20
|
+
const SEALED_FOLDER = /[\\/]trusted-gates[\\/](?:candidates[\\/])?([0-9a-f]{64})[\\/]/i;
|
|
21
|
+
|
|
22
|
+
/** The sealed gate a gate path is inside: the 64-hex folder an installed candidate or trusted gate is named after (its manifest's sha256), else null. */
|
|
23
|
+
export const sealedOfGatePath = (gatePath) => SEALED_FOLDER.exec(String(gatePath ?? ""))?.[1]?.toLowerCase() ?? null;
|
|
24
|
+
|
|
25
|
+
/** The claim a broker receipt hands over: { id, publication } with its bytes and sha256; null when the receipt has no publication claim or no job id. */
|
|
26
|
+
export function claimOf(receiptDoc) {
|
|
27
|
+
const id = receiptDoc?.provenance?.payload?.jobId; const publication = receiptDoc?.publication;
|
|
28
|
+
if (typeof id !== "string" || !/^[A-Za-z0-9._-]{1,128}$/.test(id) || !publication || typeof publication !== "object") return null;
|
|
29
|
+
const bytes = Buffer.from(JSON.stringify({ id, publication }));
|
|
30
|
+
return { id, bytes, sha256: sha256(bytes) };
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* `launch`: launch.json. `verdict`: the judge's JSON ({ lines: [{ id, text, verdict }], pass }). `contractText`, `judgeFiles`: of this checkout. `tree`: the selected commit's tree.
|
|
35
|
+
* `claims`: claimOf of each broker receipt of the run. Returns the record.
|
|
36
|
+
*/
|
|
37
|
+
export function buildAcceptanceResult({ launch, verdict, contractText, judgeFiles, tree, claims }) {
|
|
38
|
+
return {
|
|
39
|
+
schema: ACCEPTANCE_RESULT_SCHEMA, runId: launch?.runId ?? null, commit: launch?.commit ?? null, tree: tree ?? null, host: HOST_OF_PLATFORM[launch?.fingerprint?.platform] ?? null, kind: launch?.kind ?? null,
|
|
40
|
+
startedAt: launch?.startedAt ?? null, endedAt: launch?.endedAt ?? null, gate: { path: launch?.gate?.path ?? null, sealedSha256: sealedOfGatePath(launch?.gate?.path) },
|
|
41
|
+
contractSha256: sha256(contractText), judgeFiles: { ...judgeFiles }, lines: (verdict?.lines ?? []).map((l) => ({ id: l.id, text: l.text, verdict: l.verdict })), pass: verdict?.pass === true,
|
|
42
|
+
jobs: claims.filter(Boolean).map((c) => ({ requestId: c.id, claimSha256: c.sha256 })), jobClaims: "job-claims", gateSeal: "gate-seal",
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/** `node acceptance-result.mjs ...` (see the head of this file). Exit 0 when the result is written, whether or not the run passed: the verdict is in the record. */
|
|
47
|
+
export function main(argv = process.argv.slice(2), { out = console.log } = {}) {
|
|
48
|
+
const opt = (name) => { const i = argv.indexOf(name); return i < 0 ? null : argv[i + 1]; };
|
|
49
|
+
const runDir = opt("--run"); const repo = opt("--repo"); const receiptsDir = opt("--receipts"); const outDir = opt("--out");
|
|
50
|
+
if (!runDir || !repo || !receiptsDir || !outDir) { out("usage: acceptance-result.mjs --run <run dir> --repo <dir> --receipts <broker receipts dir> --out <result dir> [acceptance-lines.mjs options]"); return 2; }
|
|
51
|
+
const launch = JSON.parse(fs.readFileSync(path.join(runDir, "launch.json"), "utf8"));
|
|
52
|
+
// The judge, as a child process with the caller's options: its exit status is 1 for a run that did not pass, which is not a failure here.
|
|
53
|
+
const passThrough = argv.filter((a, i) => !["--out"].includes(a) && !["--out"].includes(argv[i - 1]));
|
|
54
|
+
let judged; try { judged = execFileSync(process.execPath, [path.join(here, "acceptance-lines.mjs"), ...passThrough, "--json"], { encoding: "utf8", maxBuffer: 1 << 28, windowsHide: true }); } catch (e) { judged = e.stdout; }
|
|
55
|
+
let verdict; try { verdict = JSON.parse(judged); } catch { out(`acceptance-result REFUSED: the judge gave no verdict (${String(judged).slice(0, 200)})`); return 1; }
|
|
56
|
+
let before = new Set(); try { before = new Set(fs.readFileSync(path.join(runDir, "before", "receipts.txt"), "utf8").split(/\r?\n/).filter(Boolean)); } catch { /* none */ }
|
|
57
|
+
const claims = [];
|
|
58
|
+
for (const name of fs.readdirSync(receiptsDir)) {
|
|
59
|
+
if (!name.endsWith(".json") || before.has(name)) continue;
|
|
60
|
+
try { const c = claimOf(JSON.parse(fs.readFileSync(path.join(receiptsDir, name), "utf8"))); if (c) claims.push(c); } catch { /* not a receipt */ }
|
|
61
|
+
}
|
|
62
|
+
const tree = String(execFileSync("git", ["-C", repo, "rev-parse", `${launch.commit}^{tree}`], { encoding: "utf8", windowsHide: true })).trim();
|
|
63
|
+
const result = buildAcceptanceResult({ launch, verdict, contractText: String(fs.readFileSync(CONTRACT_FILE)), judgeFiles: judgeFileHashes(), tree, claims });
|
|
64
|
+
fs.mkdirSync(path.join(outDir, "job-claims"), { recursive: true });
|
|
65
|
+
for (const c of claims) fs.writeFileSync(path.join(outDir, "job-claims", `${c.id}.json`), c.bytes);
|
|
66
|
+
const gatePath = launch.gate?.path; const sealed = result.gate.sealedSha256;
|
|
67
|
+
if (gatePath && sealed) {
|
|
68
|
+
const m = SEALED_FOLDER.exec(String(gatePath)); const folder = String(gatePath).slice(0, m.index + m[0].length - 1); const beside = `${folder}.manifest.txt`;
|
|
69
|
+
fs.mkdirSync(path.join(outDir, "gate-seal"), { recursive: true });
|
|
70
|
+
for (const [from, to] of [[beside, "manifest.txt"], [path.join(folder, "trusted-gate-source.json"), "trusted-gate-source.json"]]) { try { fs.copyFileSync(from, path.join(outDir, "gate-seal", to)); } catch { /* admission refuses without them */ } }
|
|
71
|
+
}
|
|
72
|
+
fs.writeFileSync(path.join(outDir, "acceptance-result.json"), `${JSON.stringify(result, null, 2)}\n`);
|
|
73
|
+
out(`acceptance-result written: ${path.join(outDir, "acceptance-result.json")} (${result.lines.filter((l) => l.verdict === "pass").length} of ${result.lines.length} lines pass, ${claims.length} broker claim(s), sealed gate ${sealed ?? "none"})`);
|
|
74
|
+
return 0;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if (process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.meta.url)) process.exit(main());
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// The acceptance test's own row enumerator (rightkit#1514 step 3; chat gate, 2026-11-21): which rows exist for a git tree, and the files each reads, worked
|
|
2
|
+
// out from the tree alone (file list with blob ids, and the manifests in it), never from the gate's planner or anything the gate writes. It covers only the
|
|
3
|
+
// row kinds whose rules a tree states: the Rust formatting row per edition and the per-crate compile rows of every Cargo workspace in the tree. Every
|
|
4
|
+
// other kind the gate plans (docs/audits/... the list in D:\scratch\loop-review\twelve-line-step3\row-rules-only-in-gate-code.md) is decided by a rule that
|
|
5
|
+
// exists only inside gate code, so it is returned in `uncovered` and the lines say the rows it decides are not measured.
|
|
6
|
+
//
|
|
7
|
+
// enumerateRows({ files: Map<path, blob>, read: (path) => text }) -> { rows: Map<id, { stage, files }>, uncovered: [kind] }
|
|
8
|
+
|
|
9
|
+
const UNCOVERED = Object.freeze([
|
|
10
|
+
"rustfmt buckets (rustfmt:<edition>:<n>) and the vendor, generated and fixture exemptions", "node-check", "json-parse / toml-parse / yaml-parse", "ownership-catalog", "actionlint", "shellcheck",
|
|
11
|
+
"cargo-metadata", "cargo-deny / cargo-audit", "ghsa-audit / advisory-exceptions", "cargo-package-list", "changelog-version / license / secret-scan", "pnpm-lockfile / pnpm-audit",
|
|
12
|
+
"tsc / eslint / biome / oxlint", "generated-docs / suite-api / swift-typecheck / path-policy", "feature-coverage", "swift-lock / gradle-lock / python-lock",
|
|
13
|
+
"feature-set variants (:<i>), cross targets (@<triple>) and their platform scoping", "doc, check-features, check-dependent", "test:rust, test:rust-serial, test:npm, swift-build",
|
|
14
|
+
"path dependencies, include!/#[path]/build.rs reach and vendored crates in a crate's compile key",
|
|
15
|
+
]);
|
|
16
|
+
|
|
17
|
+
const strip = (t) => String(t ?? "").replace(/#.*$/gm, "");
|
|
18
|
+
const table = (toml, name) => { const m = new RegExp(`^\\[${name.replace(/\./g, "\\.")}\\]\\s*$([\\s\\S]*?)(?=^\\[|(?![\\s\\S]))`, "m").exec(strip(toml)); return m ? m[1] : null; };
|
|
19
|
+
const str = (body, key) => new RegExp(`^${key}\\s*=\\s*"([^"]+)"`, "m").exec(body ?? "")?.[1] ?? null;
|
|
20
|
+
const members = (toml) => { const ws = table(toml, "workspace"); if (ws === null) return null; const m = /members\s*=\s*\[([\s\S]*?)\]/.exec(ws); return m ? [...m[1].matchAll(/"([^"]+)"/g)].map((x) => x[1].replace(/\/+$/, "")) : []; };
|
|
21
|
+
|
|
22
|
+
export function enumerateRows({ files, read }) {
|
|
23
|
+
const rows = new Map(); const dirOf = (p) => (p.includes("/") ? p.slice(0, p.lastIndexOf("/")) : "");
|
|
24
|
+
const under = (dir) => [...files.keys()].filter((p) => (dir === "" ? true : p.startsWith(`${dir}/`)));
|
|
25
|
+
const rootTomls = [...files.keys()].filter((p) => /(^|\/)Cargo\.toml$/.test(p) && !/(^|\/)(target|node_modules|vendor)\//.test(p));
|
|
26
|
+
const editions = new Map();
|
|
27
|
+
for (const manifest of rootTomls) {
|
|
28
|
+
let toml; try { toml = read(manifest); } catch { continue; }
|
|
29
|
+
const ws = members(toml); if (ws === null) continue;
|
|
30
|
+
const wsDir = dirOf(manifest); const wsEdition = str(table(toml, "workspace.package"), "edition");
|
|
31
|
+
const lock = files.has(wsDir ? `${wsDir}/Cargo.lock` : "Cargo.lock") ? [wsDir ? `${wsDir}/Cargo.lock` : "Cargo.lock"] : [];
|
|
32
|
+
for (const m of ws) {
|
|
33
|
+
const dirs = m.endsWith("/*") ? [...new Set(under(wsDir ? `${wsDir}/${m.slice(0, -2)}` : m.slice(0, -2)).map((p) => p.split("/").slice(0, (wsDir ? wsDir.split("/").length : 0) + m.split("/").length).join("/")))].filter((d) => files.has(`${d}/Cargo.toml`)) : [wsDir ? `${wsDir}/${m}` : m];
|
|
34
|
+
for (const d of dirs) {
|
|
35
|
+
let crate; try { crate = read(`${d}/Cargo.toml`); } catch { continue; }
|
|
36
|
+
const pkg = table(crate, "package"); const name = str(pkg, "name"); if (name === null) continue;
|
|
37
|
+
const edition = /^edition\.workspace\s*=\s*true/m.test(pkg) ? wsEdition : str(pkg, "edition");
|
|
38
|
+
const crateFiles = under(d).filter((p) => !/(^|\/)target\//.test(p));
|
|
39
|
+
if (edition) { const e = editions.get(edition) ?? new Set(); crateFiles.filter((p) => p.endsWith(".rs")).forEach((p) => e.add(p)); editions.set(edition, e); }
|
|
40
|
+
rows.set(`clippy:${wsDir || "."}:${name}`, { stage: "B", files: [...new Set([...crateFiles, manifest, ...lock])].sort() });
|
|
41
|
+
rows.set(`check:${wsDir || "."}:${name}`, { stage: "B", files: [...new Set([...crateFiles, manifest, ...lock])].sort() });
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
for (const [ed, set] of editions) rows.set(`rustfmt:${ed}`, { stage: "A", files: [...set].sort() });
|
|
46
|
+
return { rows, uncovered: UNCOVERED };
|
|
47
|
+
}
|
package/admission-files.mjs
CHANGED
|
@@ -9,6 +9,7 @@ import { dirtyBuildInputs } from "./release-invocation.mjs";
|
|
|
9
9
|
import { packageCommandOptional } from "./project-type.mjs";
|
|
10
10
|
import { planMediaSidecar, validateMediaSidecarConfig } from "./media-sidecar.mjs";
|
|
11
11
|
import { loadSidecarCatalog } from "./media-sidecar-catalog.mjs";
|
|
12
|
+
import { winPackageUpdaterDisabled } from "./win-package-recipe.mjs";
|
|
12
13
|
|
|
13
14
|
export const WINDOWS_NSIS_SIGNING_CONTRACT = "windows-raw-exe-authenticode-before-nsis-v1";
|
|
14
15
|
export const DISTRIBUTION_PROVIDERS = Object.freeze(["r2-rightapps", "github-releases"]);
|
|
@@ -111,6 +112,7 @@ export const FILES_ROWS = Object.freeze([
|
|
|
111
112
|
tier: "files",
|
|
112
113
|
run(ctx) {
|
|
113
114
|
if (!isNsis(ctx)) return { na: "not a Windows NSIS target" };
|
|
115
|
+
if (winPackageUpdaterDisabled(ctx.rawTarget, ctx.target)) return undefined;
|
|
114
116
|
return asList(ctx.target.updater?.artifacts).length > 0 ? undefined : [`${app(ctx)} win must declare updater.artifacts for post-code-signing minisign`];
|
|
115
117
|
},
|
|
116
118
|
},
|
package/affected-units.mjs
CHANGED
|
@@ -173,6 +173,23 @@ export function classifyUnitResults({ selected, inventory, outcomes }) {
|
|
|
173
173
|
});
|
|
174
174
|
}
|
|
175
175
|
|
|
176
|
+
/**
|
|
177
|
+
* One unit's word on the per-crate rows path, from its own rows and the run they were part of.
|
|
178
|
+
* `rows`: its requirement and coverage rows ({ status }); `expected`: how many it must have; `exit`: the run's exit code; `verified`: the run's evidence was verified.
|
|
179
|
+
* failed: a row failed, or rows are missing. blocked: a row was blocked or not run. passed: every row passed AND the run exited 0 and was verified.
|
|
180
|
+
* A unit whose rows all passed on a run that did not is still "failed" (nothing passes on such a run), and says so: `ownRows: "all-passed"` with
|
|
181
|
+
* the reason in `why`, so it is not read as a unit with a failure of its own.
|
|
182
|
+
*/
|
|
183
|
+
export function classifyUnitRows({ rows, expected, exit, verified }) {
|
|
184
|
+
const green = (r) => r.status === "passed" || r.status === "pass";
|
|
185
|
+
const failed = !expected || rows.length !== expected || rows.some((r) => r.status === "failed" || r.status === "fail");
|
|
186
|
+
const blocked = !failed && rows.some((r) => r.status === "blocked" || r.status === "not-run");
|
|
187
|
+
const ownGreen = !failed && !blocked && rows.every(green);
|
|
188
|
+
const status = failed ? "failed" : blocked ? "blocked" : exit === 0 && verified && ownGreen ? "passed" : "failed";
|
|
189
|
+
const onlyRun = status === "failed" && ownGreen;
|
|
190
|
+
return { status, ...(status === "failed" ? { code: exit || 1 } : {}), ...(onlyRun ? { ownRows: "all-passed", why: `every one of this unit's ${rows.length} row(s) passed; it is not passed because the run as a whole did not (exit ${exit}${verified ? "" : ", evidence not verified"})` } : {}) };
|
|
191
|
+
}
|
|
192
|
+
|
|
176
193
|
/** The aggregate report object (UNIT_LIST_REPORT_SCHEMA): selection reasons and classified results in run order. */
|
|
177
194
|
export function unitListReport({ commit, stage, base = null, selected, results, unmatched = [] }) {
|
|
178
195
|
const bySelector = new Map(results.map((r) => [r.selector, r]));
|
package/app-check.mjs
CHANGED
|
@@ -140,14 +140,18 @@ export function repoRoot(dir) {
|
|
|
140
140
|
function eolPolicy({ root, commit, repo = process.cwd() }) {
|
|
141
141
|
// CR-bearing text blobs of the commit, then the commit's own attributes (the exported tree holds its .gitattributes).
|
|
142
142
|
const grep = spawnSync("git", ["grep", "-z", "-l", "-I", "-e", "\r", commit, "--"], { cwd: repo, env: gitEnv(), encoding: "utf8", maxBuffer: 64 * 1024 * 1024 });
|
|
143
|
+
if (grep.error) throw new Error(`git grep failed: ${grep.error.message}`);
|
|
144
|
+
if (grep.stderr.trim()) throw new Error(`git grep failed: ${grep.stderr.trim()}`);
|
|
143
145
|
if (grep.status === 1) return []; // git grep: 1 = no match
|
|
144
|
-
if (grep.
|
|
146
|
+
if (grep.status !== 0) throw new Error(`git grep failed with status ${grep.status}`);
|
|
145
147
|
const files = grep.stdout.split("\0").filter(Boolean).map((f) => f.slice(commit.length + 1));
|
|
146
148
|
// `-text` (or binary) turns conversion off whatever `eol` says: those bytes are kept as committed (pinned evidence, licence texts).
|
|
147
149
|
const attrs = git(["--work-tree", root, "check-attr", "-z", "--stdin", "text", "eol"], { cwd: repo, input: files.join("\0") }).split("\0");
|
|
148
150
|
const seen = new Map();
|
|
149
151
|
for (let i = 0; i + 2 < attrs.length; i += 3) seen.set(attrs[i], { ...seen.get(attrs[i]), [attrs[i + 1]]: attrs[i + 2] });
|
|
150
|
-
const
|
|
152
|
+
const eligible = [...seen].filter(([, a]) => a.eol === "lf" && a.text !== "unset").map(([file]) => file);
|
|
153
|
+
// A CR alone is not CRLF. Read committed bytes, not checkout bytes, after attribute filtering.
|
|
154
|
+
const bad = eligible.filter((file) => git(["cat-file", "blob", `${commit}:${file}`], { cwd: repo, encoding: null }).includes(Buffer.from("\r\n")));
|
|
151
155
|
return bad.length ? [{
|
|
152
156
|
problem: `${bad.length} file(s) committed with CRLF although .gitattributes says eol=lf (a fresh checkout shows them modified; hashed and byte-compared copies differ on Windows): ${bad.join(", ")}`,
|
|
153
157
|
fix: `git add --renormalize -- ${bad.join(" ")} && git commit`,
|
package/app-closure.mjs
CHANGED
|
@@ -79,7 +79,9 @@ export function cargoMetadataFromManifests({ manifests, readFile }) {
|
|
|
79
79
|
const cargoDir = owner(dir);
|
|
80
80
|
const members = [...docs].filter(([d, m]) => m.package && owner(d) === cargoDir).map(([d, m]) => {
|
|
81
81
|
if (typeof m.package.name !== "string" || !m.package.name) throw problem(`${d}/Cargo.toml has no package name`);
|
|
82
|
-
|
|
82
|
+
const setting = m.package.publish;
|
|
83
|
+
const publish = setting?.workspace === true ? docs.get(cargoDir)?.workspace?.package?.publish : setting;
|
|
84
|
+
return { name: m.package.name, dir: d, manifest: manifestAt(d, "Cargo.toml"), publish: publish !== false && !(Array.isArray(publish) && publish.length === 0) };
|
|
83
85
|
});
|
|
84
86
|
return { cargoDir, members };
|
|
85
87
|
};
|