- MCP
- show on this site's /mcp
- CLI
- abso show 78 --json
- JSON
- /christopher/abso-core/versions/78?format=json
Biome is silent: about 90 hints cleared. String joins as templates, dotted keys, unused imports, variables and a private method removed, optional chains (one kept boolean with === true), the preset field instead of the deprecated recommended. Two rules off where they don't fit: noExplicitAny in the hook modules, whose engine types come from the host, and noTemplateCurlyInString in tests, which hold source text as data.
of shared·pinch··Not checked
Version 77 · Files at version 78
44 files, 84 lines added, 102 removed.
--- a/biome.json
+++ b/biome.json
@@ -28,7 +28,7 @@
31− "recommended": true,
@@ -56,6 +56,17 @@
--- a/client/hooks/register.ts
+++ b/client/hooks/register.ts
@@ -144,7 +144,7 @@
147− ...(text !== undefined && text.includes("\u0000")
148148 ? { nul: { at: text.indexOf("\u0000"), line: text.slice(0, text.indexOf("\u0000")).split("\n").length } }
--- a/client/src/box-commands.ts
+++ b/client/src/box-commands.ts
@@ -106,8 +106,7 @@
109− const data =
110− text !== undefined && text.includes("\r") ? Buffer.from(text.replace(/\r\n?/g, "\n")) : readFileSync(from);
109+ const data = text?.includes("\r") ? Buffer.from(text.replace(/\r\n?/g, "\n")) : readFileSync(from);
@@ -364,7 +363,7 @@
366365 // Text goes as abso records it, with LF line endings: a CRLF script fails in the box's sh (#37).
367− const lf = d.text !== undefined && d.text.includes("\r") ? Buffer.from(d.text.replace(/\r\n?/g, "\n")) : undefined;
370369 // The bit from the disk, or (on Windows) from the server; a script with "#!" runs either way.
--- a/client/src/commands.ts
+++ b/client/src/commands.ts
@@ -28,7 +28,6 @@
31− MAX_TEXT_BYTES,
--- a/client/src/drafts.ts
+++ b/client/src/drafts.ts
@@ -16,7 +16,6 @@
19− newsText,
--- a/client/src/folder.ts
+++ b/client/src/folder.ts
@@ -455,7 +455,7 @@
458− const attrs = git(["check-attr", "--stdin", "-z", "text", "eol"], rels.join("\0") + "\0");
--- a/client/src/key-admin.ts
+++ b/client/src/key-admin.ts
@@ -3,7 +3,6 @@
33
6−import { join } from "node:path";
--- a/client/src/queue.ts
+++ b/client/src/queue.ts
@@ -6,7 +6,7 @@
66
9−import { type Env, type Output, open, plural } from "./commands.ts";
1111
1212/** How long publish waits by default: under the 2 minutes a Claude Code shell command gets (#39). */
--- a/client/test/client.test.ts
+++ b/client/test/client.test.ts
@@ -1328,7 +1328,7 @@
13291329
1331− const { name, folders } = await project({ "ok.txt": "ok\n" }, "alice", "bob", "carol");
13331333 const files = Object.fromEntries([...HOSTILE.map((p) => [p, "pwned\n"] as const), ["fine/new.txt", "fine\n"]]);
@@ -1474,7 +1474,7 @@
14751475
14761476 it("refuses a link out of the folder, and a write through a folder that is a link", async () => {
1477− const { name, folders } = await project({ "ok.txt": "ok\n" }, "alice", "bob");
@@ -1783,7 +1783,7 @@
1786− (await main(["settle", "b.txt", "--theirs"], { cwd: alice, env: ENV, write: () => {} })).stdout + "",
1786+ `${(await main(["settle", "b.txt", "--theirs"], { cwd: alice, env: ENV, write: () => {} })).stdout}`,
17891789 const none = await main(["settle", "a.txt", "b.txt", "--theirs"], { cwd: alice, env: ENV, write: () => {} });
@@ -4249,8 +4249,8 @@
4252− assert.equal(shared(name)["link"], "");
4253− assert.deepEqual(fake.projects.get(name)!.project.modes()["link"], { link: "a.txt" });
42554255
--- a/client/test/ignore.test.ts
+++ b/client/test/ignore.test.ts
@@ -59,7 +59,7 @@
62− input: paths.join("\0") + "\0",
--- a/src/engine/build.ts
+++ b/src/engine/build.ts
@@ -487,7 +487,7 @@
490− replacement += visible[endLine]!.text + "\n";
--- a/src/engine/test/build.test.ts
+++ b/src/engine/test/build.test.ts
@@ -127,7 +127,7 @@
130− assert.equal(repo.text("f.txt"), FIVE + "six\n");
133133
--- a/src/engine/test/concurrent.test.ts
+++ b/src/engine/test/concurrent.test.ts
@@ -24,13 +24,13 @@
2626
27−const textOf = (lines: readonly string[]): string => (lines.length === 0 ? "" : lines.join("\n") + "\n");
27+const textOf = (lines: readonly string[]): string => (lines.length === 0 ? "" : `${lines.join("\n")}\n`);
2828
3131
32−const BASE_SEED = Number(process.env["PROP_SEED"] ?? 20260621);
33−const CASES = Number(process.env["PROP_CASES"] ?? 250);
3434
3535/** A hunk in terms of the old view's visible lines. start === end is a pure insertion at gap start. */
@@ -98,7 +98,7 @@
101− edits.push({ file: path, old: "", new: lines.join("\n") + "\n" });
@@ -429,7 +429,7 @@
432− const text = (ls: readonly string[]) => (ls.length ? ls.join("\n") + "\n" : "");
434434 const wider = { file, old: text(all.slice(a, b)), new: text([...all.slice(a, i), ...add, ...all.slice(j, b)]) };
435435 const unique = wider.old !== "" && whole.indexOf(wider.old) === whole.lastIndexOf(wider.old);
--- a/src/engine/test/gen.ts
+++ b/src/engine/test/gen.ts
@@ -21,13 +21,13 @@
24− if (lines.length > 0) out[path] = lines.join("\n") + "\n";
2828
30− return lines.length === 0 ? "" : lines.join("\n") + "\n";
3232
@@ -247,7 +247,7 @@
250− old = t.slice(c1) + "\n" + next.slice(0, this.rng.int(next.length + 1));
252252 const replacement = this.rng.pick(["", "Z", "q\nr", "\n", "w\n", "yy", "Z\nZ", this.fresh()]);
--- a/src/engine/test/helpers.ts
+++ b/src/engine/test/helpers.ts
@@ -133,5 +133,5 @@
133133
136− return items.map((s) => s + "\n").join("");
--- a/src/engine/test/moves.test.ts
+++ b/src/engine/test/moves.test.ts
@@ -8,8 +8,8 @@
1010
11−const BASE_SEED = Number(process.env["PROP_SEED"] ?? 20261004);
12−const CASES = Number(process.env["PROP_CASES"] ?? 200);
1313
@@ -133,7 +133,7 @@
136− (base) => repo.draft({ edits: [{ file: "shapes.js", old: FN.join("\n") + "\n", new: "" }] }, base),
136+ (base) => repo.draft({ edits: [{ file: "shapes.js", old: `${FN.join("\n")}\n`, new: "" }] }, base),
--- a/src/engine/test/properties.test.ts
+++ b/src/engine/test/properties.test.ts
@@ -21,8 +21,8 @@
2323
24−const BASE_SEED = Number(process.env["PROP_SEED"] ?? 20260621);
25−const CASES = Number(process.env["PROP_CASES"] ?? 250);
2626
--- a/src/engine/test/scenarios.test.ts
+++ b/src/engine/test/scenarios.test.ts
@@ -166,8 +166,8 @@
169− old: anchor + "\n",
170− new: anchor + "\n" + line + "\n",
@@ -240,7 +240,7 @@
243− edits: [{ file: "Sidebar.tsx", old: FOOTER + "\n" + RAIL + "\n", new: RAIL + "\n" + FOOTER + "\n" }],
--- a/src/engine/test/text.test.ts
+++ b/src/engine/test/text.test.ts
@@ -115,9 +115,9 @@
118− a.map((s) => s + "!"),
120− [{ start: 0, end: 2100, lines: a.map((s) => s + "!") }],
123123
@@ -192,8 +192,8 @@
195− const ours = base.map((l, k) => (k < cut - 1 && rnd(3) === 0 ? l + "o" : l));
196− const theirs = base.map((l, k) => (k > cut && rnd(3) === 0 ? l + "t" : l));
--- a/src/engine/test/view.test.ts
+++ b/src/engine/test/view.test.ts
@@ -78,7 +78,7 @@
81− graph.add(buildBase({ "big.txt": big.join("\n") + "\n" }, { author: "import", message: "big" }));
81+ graph.add(buildBase({ "big.txt": `${big.join("\n")}\n` }, { author: "import", message: "big" }));
--- a/src/engine/text.ts
+++ b/src/engine/text.ts
@@ -15,7 +15,7 @@
1515
18− return lines.length === 0 ? "" : lines.join("\n") + "\n";
2020
--- a/src/gitview/test/ingest.test.ts
+++ b/src/gitview/test/ingest.test.ts
@@ -241,7 +241,7 @@
244− person.write("app.txt", person.read("app.txt") + "app line 13\n");
246246
--- a/src/gitview/test/random.test.ts
+++ b/src/gitview/test/random.test.ts
@@ -16,8 +16,8 @@
1616
1818
19−const BASE_SEED = Number(process.env["PROP_SEED"] ?? 20261003);
20−const CASES = Number(process.env["PROP_CASES"] ?? 30);
2121
@@ -28,7 +28,7 @@
2828 return Array.from({ length: rng.range(min, max) }, (_, i) => (rng.chance(0.5) ? rng.pick(WORDS) : `${tag} ${i}`));
3030
31−const text = (lines: readonly string[]): string => lines.map((l) => l + "\n").join("");
3232
--- a/src/gitview/trailers.ts
+++ b/src/gitview/trailers.ts
@@ -34,7 +34,7 @@
3535export function withTrailers(message: string, trailers: readonly Trailer[], fallback: string): string {
37− if (trailers.length === 0) return body + "\n";
--- a/src/gitview/tree.ts
+++ b/src/gitview/tree.ts
@@ -61,7 +61,7 @@
64− await visit(entry.oid, path + "/");
--- a/worker/project/collisions.ts
+++ b/worker/project/collisions.ts
@@ -240,8 +240,8 @@
243− yours: { lines: [yours.start + 1, yours.end], text: yours.text + "\n" },
244− theirs: { lines: [theirs.start + 1, theirs.end], text: theirs.text + "\n", ...originOf(host, by, space.name) },
244+ theirs: { lines: [theirs.start + 1, theirs.end], text: `${theirs.text}\n`, ...originOf(host, by, space.name) },
--- a/worker/project/definition-rule.ts
+++ b/worker/project/definition-rule.ts
@@ -168,7 +168,7 @@
171− ? { file: def.file, lines: [def.start + 1, def.end] as [number, number], text: def.text + "\n" }
171+ ? { file: def.file, lines: [def.start + 1, def.end] as [number, number], text: `${def.text}\n` }
172172 : { file: before[0]!.file, lines: [before[0]!.start + 1, before[0]!.start] as [number, number], text: "" };
--- a/worker/project/draft-collisions.ts
+++ b/worker/project/draft-collisions.ts
@@ -114,8 +114,8 @@
117− first: { agent: a.name, file, lines: [dA.start + 1, dA.end], text: dA.text + "\n" },
118− second: { agent: b.name, file, lines: [dB.start + 1, dB.end], text: dB.text + "\n" },
--- a/worker/project/express-moves.ts
+++ b/worker/project/express-moves.ts
@@ -127,7 +127,7 @@
130− if (best && best.block.texts.slice(best.q, best.q + best.len).some((t) => !PLAIN_LINE.test(t))) {
--- a/worker/project/history.ts
+++ b/worker/project/history.ts
@@ -2,7 +2,7 @@
22// (pathLife), and where lines went (follow). They read through HistoryHost, the one seam the derived tables
44
5−import type { AtomId, Graph, LineId, View } from "../../src/engine/index.ts";
--- a/worker/project/news.ts
+++ b/worker/project/news.ts
@@ -86,7 +86,7 @@
8787 const verb = note.reply ? "replies on" : note.kind === "objection" ? "objects on" : "comments on";
89− note.kind === "objection" ? " Fix it, or answer: abso note --reply " + id : " Answer: abso note --reply " + id;
89+ note.kind === "objection" ? ` Fix it, or answer: abso note --reply ${id}` : ` Answer: abso note --reply ${id}`;
9191 ? `${note.person.person.name} (a person, signed in on the website, id ${note.person.person.id}) ${verb} ${file} ${span}${about}: ${JSON.stringify(clip(note.text))}.${ask}`
--- a/worker/project/project.ts
+++ b/worker/project/project.ts
@@ -12,18 +12,7 @@
1414
15−import {
16− type Atom,
17− type AtomId,
18− type ConflictKey,
19− conflictKeys,
20− type EditInput,
21− EngineError,
22− Graph,
23− type LineId,
24− type MoveInput,
25− type View,
26−} from "../../src/engine/index.ts";
15+import { type Atom, type AtomId, EngineError, Graph, type LineId, type View } from "../../src/engine/index.ts";
2918import { type AnnounceHost, announce as hostedAnnounce, announcePerson as hostedAnnouncePerson } from "./announce.ts";
@@ -98,7 +87,6 @@
101− noteView as hostedNoteView,
@@ -140,8 +128,6 @@
143− Meta,
144− Mode,
@@ -155,7 +141,6 @@
158− SwitchAnswer,
@@ -178,7 +163,7 @@
179164import { refusals as hostedRefusals, refuse as hostedRefuse, type RefuseHost } from "./refuse.ts";
181−import { addVersion, last, Membership, newSpace, type Published, SHARED, type Space, sharedBaseOf } from "./spaces.ts";
@@ -740,16 +725,6 @@
742727
743− /**
744− * The view a note's lines live in (#44):
745− * shared once any were published there; else the named draft they were
746− * published into; else their author's draft, where it works now or where it
747− * parked it. Undefined when no space holds them any more (a discarded draft).
748− */
749− #noteView(n: NoteRecord): View | undefined {
750− return hostedNoteView(this.#notesHost, n);
751− }
752−
--- a/worker/project/queue.ts
+++ b/worker/project/queue.ts
@@ -137,10 +137,10 @@
140− yours: { lines: [yours.start + 1, yours.end], text: yours.text + "\n" },
143− text: theirs.text + "\n",
--- a/worker/project/test/bench.ts
+++ b/worker/project/test/bench.ts
@@ -15,7 +15,7 @@
1515
18− files[`src/f${f}.ts`] = Array.from({ length: linesPer }, (_, i) => lineOf(f, i)).join("\n") + "\n";
18+ files[`src/f${f}.ts`] = `${Array.from({ length: linesPer }, (_, i) => lineOf(f, i)).join("\n")}\n`;
2020
--- a/worker/project/test/merge.test.ts
+++ b/worker/project/test/merge.test.ts
@@ -54,7 +54,7 @@
57− const mine = CALLS.replace("// classset\n", "// classset\n" + HELPER.replace("no RegExp", "hex only"));
57+ const mine = CALLS.replace("// classset\n", `// classset\n${HELPER.replace("no RegExp", "hex only")}`);
--- a/worker/project/test/moves.test.ts
+++ b/worker/project/test/moves.test.ts
@@ -192,10 +192,10 @@
192192test("past the move limit only the longest blocks move: a rewrite of many single lines still publishes, and a block moved whole keeps someone's edit (abso issue 137)", () => {
194194 const block = [" // block", ' "b1": "one",', ' "b2": "two",', ' "b3": "three",', " // end block"];
195− const before = ["{", ...block, ...keys, "}"].join("\n") + "\n";
196196 // The draft reverses the keys with a new line between each, so every one is its own one-line match.
198− const after = ["{", ...rewritten, ...block, "}"].join("\n") + "\n";
--- a/worker/project/test/order.test.ts
+++ b/worker/project/test/order.test.ts
@@ -45,18 +45,18 @@
4545
48− const expectedText = expected.length > 0 ? expected.join("\n") + "\n" : undefined;
4949
54− project.init({ "f.txt": base.join("\n") + "\n" }, 0);
59− project.record(p.agent, { "f.txt": lines.join("\n") + "\n" }, 1);
--- a/worker/project/test/project-file.test.ts
+++ b/worker/project/test/project-file.test.ts
@@ -6,7 +6,7 @@
88
9−const review = (reviewer: string) => JSON.stringify({ review: [{ paths: ["src/**"], reviewer }] }) + "\n";
9+const review = (reviewer: string) => `${JSON.stringify({ review: [{ paths: ["src/**"], reviewer }] })}\n`;
1010
--- a/worker/project/test/queue.test.ts
+++ b/worker/project/test/queue.test.ts
@@ -20,7 +20,7 @@
23− "avcs.json": JSON.stringify({ queue }) + "\n",
--- a/worker/project/test/queued-moves.test.ts
+++ b/worker/project/test/queued-moves.test.ts
@@ -20,7 +20,7 @@
23− "avcs.json": JSON.stringify({ queue: true }) + "\n",
@@ -66,7 +66,7 @@
69− { "avcs.json": JSON.stringify({ queue: true }) + "\n", "a.ts": "export const a = 1;\nexport const b = 1;\n" },
69+ { "avcs.json": `${JSON.stringify({ queue: true })}\n`, "a.ts": "export const a = 1;\nexport const b = 1;\n" },
--- a/worker/project/test/reviewers.test.ts
+++ b/worker/project/test/reviewers.test.ts
@@ -23,7 +23,7 @@
26− "avcs.json": JSON.stringify(RULES) + "\n",
--- a/worker/project/test/tells.test.ts
+++ b/worker/project/test/tells.test.ts
@@ -58,7 +58,7 @@
5858 for (let i = 0; i < TELLS_KEPT + 3; i++) project.announce("lead", `Tell ${i}.`, ["b2"], 3 + i);
61− assert.match(kept[0]!.text, new RegExp(`Tell ${TELLS_KEPT + 2}\.$`));
6363
--- a/worker/project/test/whole.test.ts
+++ b/worker/project/test/whole.test.ts
@@ -21,13 +21,13 @@
24− project.init({ "avcs.json": JSON.stringify(config) + "\n", "src/a.ts": "export const a = 1;\n" }, 0);
24+ project.init({ "avcs.json": `${JSON.stringify(config)}\n`, "src/a.ts": "export const a = 1;\n" }, 0);
2828
30− JSON.stringify({ frames: Array.from({ length: 50 }, (_, i) => i * n) }, null, 2) + "\n";
3131
3232test("a path the project marks whole is stored as a blob, and publishes and syncs like one", () => {
@@ -44,7 +44,7 @@
4444
47− const big = "x".repeat(80) + "\n";
@@ -54,7 +54,7 @@
5454
5555test("once whole, a file stays whole even when it shrinks; an Edit of it is out of step so the client sends the file", () => {
57− project.record("ann", { "gen/big.txt": ("y".repeat(80) + "\n").repeat(13_000) }, 1);
--- a/worker/project/whole-files.ts
+++ b/worker/project/whole-files.ts
@@ -52,7 +52,7 @@
55− (view !== undefined && view.hasFile(path) && view.attrs(path).blob !== null)
5858