{"file":"scripts/check-changed.mjs","version":318,"total":259,"from":1,"to":259,"lines":[{"n":1,"text":"// The check for what a change reaches, for running by hand before a publish. The full check (abso.json's)","atom":"a815","author":"speed","version":97},{"n":2,"text":"// still runs on every publish, in the merge queue; this one is only the quick local run, so agents don't run","atom":"a815","author":"speed","version":97},{"n":3,"text":"// the whole suite by hand.","atom":"a815","author":"speed","version":97},{"n":4,"text":"//","atom":"a815","author":"speed","version":97},{"n":5,"text":"//   npm run check:changed [-- file ...]   (paths from the repo root; none: this folder's draft, from abso diff","atom":"a815","author":"speed","version":97},{"n":6,"text":"//                                          and abso status)   --list says what it would run and runs nothing.","atom":"a815","author":"speed","version":97},{"n":7,"text":"//","atom":"a815","author":"speed","version":97},{"n":8,"text":"// What it runs, for the changed files:","atom":"a815","author":"speed","version":97},{"n":9,"text":"// - tests: every test file that imports a changed file, through any number of imports, plus changed test","atom":"a815","author":"speed","version":97},{"n":10,"text":"//   files themselves. A changed file that isn't code (a fixture, a saved log) brings in the test files that","atom":"a815","author":"speed","version":97},{"n":11,"text":"//   name it.","atom":"a815","author":"speed","version":97},{"n":12,"text":"// - typecheck: tsconfig.json, when it includes a changed file or anything that imports one, incrementally","atom":"a815","author":"speed","version":97},{"n":13,"text":"//   (its build info under node_modules/.cache), so a second run reads only what changed.","atom":"a815","author":"speed","version":97},{"n":14,"text":"// - biome: the changed files only.","atom":"a815","author":"speed","version":97},{"n":15,"text":"// A change to setup (package.json, the lockfile, tsconfig.json, abso.json, biome.json) runs the full check.","atom":"a815","author":"speed","version":97},{"n":16,"text":"import { spawn, spawnSync } from \"node:child_process\";","atom":"a815","author":"speed","version":97},{"n":17,"text":"import { mkdirSync, readdirSync, readFileSync, statSync, writeFileSync } from \"node:fs\";","atom":"a818","author":"speed","version":97},{"n":18,"text":"import { createRequire } from \"node:module\";","atom":"a820","author":"speed","version":98},{"n":19,"text":"import { availableParallelism } from \"node:os\";","atom":"a815","author":"speed","version":97},{"n":20,"text":"import { dirname, extname, join, matchesGlob, relative, resolve, sep } from \"node:path\";","atom":"a815","author":"speed","version":97},{"n":21,"text":"import { fileURLToPath } from \"node:url\";","atom":"a815","author":"speed","version":97},{"n":22,"text":"","atom":"a815","author":"speed","version":97},{"n":23,"text":"const root = resolve(dirname(fileURLToPath(import.meta.url)), \"..\");","atom":"a815","author":"speed","version":97},{"n":24,"text":"","atom":"a815","author":"speed","version":97},{"n":25,"text":"/** Test runs: a folder, the test globs its npm test uses (from that folder), and node's extra arguments. */","atom":"a815","author":"speed","version":97},{"n":26,"text":"const TESTS = [","atom":"a815","author":"speed","version":97},{"n":27,"text":"\t{","atom":"a815","author":"speed","version":97},{"n":28,"text":"\t\tcwd: \".\",","atom":"a815","author":"speed","version":97},{"n":29,"text":"\t\tglobs: [","atom":"a1581","author":"codex-capacity-chair","version":157},{"n":30,"text":"\t\t\t\"src/**/*.test.ts\",","atom":"a1581","author":"codex-capacity-chair","version":157},{"n":31,"text":"\t\t\t\"worker/project/**/*.test.ts\",","atom":"a1581","author":"codex-capacity-chair","version":157},{"n":32,"text":"\t\t\t\"client/test/**/*.test.ts\",","atom":"a1581","author":"codex-capacity-chair","version":157},{"n":33,"text":"\t\t\t\"scripts/**/*.test.ts\",","atom":"a1581","author":"codex-capacity-chair","version":157},{"n":34,"text":"\t\t\t\"server/test/**/*.test.ts\",","atom":"a1581","author":"codex-capacity-chair","version":157},{"n":35,"text":"\t\t],","atom":"a1581","author":"codex-capacity-chair","version":157},{"n":36,"text":"\t\targs: [\"--import\", \"./client/test/setup.ts\"],","atom":"a815","author":"speed","version":97},{"n":37,"text":"\t},","atom":"a815","author":"speed","version":97},{"n":38,"text":"];","atom":"a815","author":"speed","version":97},{"n":39,"text":"/** Typechecks: a tsconfig, from the repo root. */","atom":"a815","author":"speed","version":97},{"n":40,"text":"const TYPECHECKS = [{ tsconfig: \"tsconfig.json\" }, { tsconfig: \"server/tsconfig.json\" }];","atom":"a1581","author":"codex-capacity-chair","version":157},{"n":41,"text":"/** Files whose change can reach anything: the full check runs instead. */","atom":"a815","author":"speed","version":97},{"n":42,"text":"const SETUP = [","atom":"a815","author":"speed","version":97},{"n":43,"text":"\t\"**/package.json\",","atom":"a815","author":"speed","version":97},{"n":44,"text":"\t\"**/package-lock.json\",","atom":"a815","author":"speed","version":97},{"n":45,"text":"\t\"**/tsconfig*.json\",","atom":"a815","author":"speed","version":97},{"n":46,"text":"\t\"abso.json\",","atom":"a815","author":"speed","version":97},{"n":47,"text":"\t\"biome.json\",","atom":"a815","author":"speed","version":97},{"n":48,"text":"\t\"biome.jsonc\",","atom":"a815","author":"speed","version":97},{"n":49,"text":"\t\"client/test/setup.ts\",","atom":"a815","author":"speed","version":97},{"n":50,"text":"];","atom":"a815","author":"speed","version":97},{"n":51,"text":"const SKIP_DIRS = new Set([\"node_modules\", \".abso\", \".wrangler\", \"dist\", \".git\"]);","atom":"a815","author":"speed","version":97},{"n":52,"text":"const CODE = new Set([\".ts\", \".tsx\", \".mts\", \".mjs\", \".js\", \".cjs\"]);","atom":"a815","author":"speed","version":97},{"n":53,"text":"","atom":"a815","author":"speed","version":97},{"n":54,"text":"const posix = (p) => p.split(sep).join(\"/\");","atom":"a815","author":"speed","version":97},{"n":55,"text":"const matches = (path, globs) => globs.some((g) => matchesGlob(path, g));","atom":"a815","author":"speed","version":97},{"n":56,"text":"","atom":"a815","author":"speed","version":97},{"n":57,"text":"/** Every file under the repo, posix paths from the root, skipping dependency and build folders. */","atom":"a815","author":"speed","version":97},{"n":58,"text":"function allFiles(dir = root, out = []) {","atom":"a815","author":"speed","version":97},{"n":59,"text":"\tfor (const name of readdirSync(dir)) {","atom":"a815","author":"speed","version":97},{"n":60,"text":"\t\tif (SKIP_DIRS.has(name)) continue;","atom":"a815","author":"speed","version":97},{"n":61,"text":"\t\tconst p = join(dir, name);","atom":"a815","author":"speed","version":97},{"n":62,"text":"\t\tconst s = statSync(p);","atom":"a815","author":"speed","version":97},{"n":63,"text":"\t\tif (s.isDirectory()) allFiles(p, out);","atom":"a815","author":"speed","version":97},{"n":64,"text":"\t\telse out.push(posix(relative(root, p)));","atom":"a815","author":"speed","version":97},{"n":65,"text":"\t}","atom":"a815","author":"speed","version":97},{"n":66,"text":"\treturn out;","atom":"a815","author":"speed","version":97},{"n":67,"text":"}","atom":"a815","author":"speed","version":97},{"n":68,"text":"","atom":"a815","author":"speed","version":97},{"n":69,"text":"/**","atom":"a815","author":"speed","version":97},{"n":70,"text":" * Each code file's imports, kept between runs in node_modules/.cache by the file's time and size, so a run","atom":"a815","author":"speed","version":97},{"n":71,"text":" * reads only the files that changed since the last one.","atom":"a815","author":"speed","version":97},{"n":72,"text":" */","atom":"a815","author":"speed","version":97},{"n":73,"text":"const CACHE = join(root, \"node_modules/.cache/check-changed.json\");","atom":"a815","author":"speed","version":97},{"n":74,"text":"function importGraph(code, known) {","atom":"a815","author":"speed","version":97},{"n":75,"text":"\tlet cache = {};","atom":"a815","author":"speed","version":97},{"n":76,"text":"\ttry {","atom":"a815","author":"speed","version":97},{"n":77,"text":"\t\tcache = JSON.parse(readFileSync(CACHE, \"utf8\"));","atom":"a815","author":"speed","version":97},{"n":78,"text":"\t} catch {}","atom":"a815","author":"speed","version":97},{"n":79,"text":"\tconst next = {};","atom":"a815","author":"speed","version":97},{"n":80,"text":"\tconst importers = new Map();","atom":"a815","author":"speed","version":97},{"n":81,"text":"\tfor (const f of code) {","atom":"a815","author":"speed","version":97},{"n":82,"text":"\t\tconst s = statSync(join(root, f));","atom":"a815","author":"speed","version":97},{"n":83,"text":"\t\tconst hit = cache[f];","atom":"a815","author":"speed","version":97},{"n":84,"text":"\t\tconst imports = hit && hit.t === s.mtimeMs && hit.n === s.size ? hit.i : importsOf(f, known);","atom":"a815","author":"speed","version":97},{"n":85,"text":"\t\tnext[f] = { t: s.mtimeMs, n: s.size, i: imports };","atom":"a815","author":"speed","version":97},{"n":86,"text":"\t\tfor (const i of imports) (importers.get(i) ?? importers.set(i, new Set()).get(i)).add(f);","atom":"a815","author":"speed","version":97},{"n":87,"text":"\t}","atom":"a815","author":"speed","version":97},{"n":88,"text":"\ttry {","atom":"a815","author":"speed","version":97},{"n":89,"text":"\t\tmkdirSync(dirname(CACHE), { recursive: true });","atom":"a815","author":"speed","version":97},{"n":90,"text":"\t\twriteFileSync(CACHE, JSON.stringify(next));","atom":"a815","author":"speed","version":97},{"n":91,"text":"\t} catch {}","atom":"a815","author":"speed","version":97},{"n":92,"text":"\treturn importers;","atom":"a815","author":"speed","version":97},{"n":93,"text":"}","atom":"a815","author":"speed","version":97},{"n":94,"text":"","atom":"a815","author":"speed","version":97},{"n":95,"text":"/** The files a code file imports, as repo paths (relative imports only; packages can't change in a draft). */","atom":"a815","author":"speed","version":97},{"n":96,"text":"function importsOf(file, known) {","atom":"a815","author":"speed","version":97},{"n":97,"text":"\tconst text = readFileSync(join(root, file), \"utf8\");","atom":"a815","author":"speed","version":97},{"n":98,"text":"\tconst out = [];","atom":"a815","author":"speed","version":97},{"n":99,"text":"\tconst re = /(?:\\bfrom\\s*|\\bimport\\s*\\(\\s*|\\bimport\\s+|\\brequire\\s*\\(\\s*)[\"'](\\.{1,2}\\/[^\"']+)[\"']/g;","atom":"a815","author":"speed","version":97},{"n":100,"text":"\tfor (const m of text.matchAll(re)) {","atom":"a815","author":"speed","version":97},{"n":101,"text":"\t\tconst base = posix(join(dirname(file), m[1]));","atom":"a815","author":"speed","version":97},{"n":102,"text":"\t\tconst stem = base.replace(/\\.(m?js|cjs)$/, \"\");","atom":"a815","author":"speed","version":97},{"n":103,"text":"\t\tfor (const c of [base, `${stem}.ts`, `${stem}.tsx`, `${stem}.mts`, `${base}.ts`, `${base}.tsx`, `${base}/index.ts`])","atom":"a815","author":"speed","version":97},{"n":104,"text":"\t\t\tif (known.has(c)) {","atom":"a815","author":"speed","version":97},{"n":105,"text":"\t\t\t\tout.push(c);","atom":"a815","author":"speed","version":97},{"n":106,"text":"\t\t\t\tbreak;","atom":"a815","author":"speed","version":97},{"n":107,"text":"\t\t\t}","atom":"a815","author":"speed","version":97},{"n":108,"text":"\t}","atom":"a815","author":"speed","version":97},{"n":109,"text":"\treturn out;","atom":"a815","author":"speed","version":97},{"n":110,"text":"}","atom":"a815","author":"speed","version":97},{"n":111,"text":"","atom":"a815","author":"speed","version":97},{"n":112,"text":"/** This folder's changed files: the draft's, from abso diff, and edits not yet recorded, from abso status. */","atom":"a815","author":"speed","version":97},{"n":113,"text":"function draftFiles() {","atom":"a815","author":"speed","version":97},{"n":114,"text":"\tconst run = (args) => {","atom":"a815","author":"speed","version":97},{"n":115,"text":"\t\t// One command string: abso is a .cmd on Windows, which needs a shell, and the args are fixed words.","atom":"a815","author":"speed","version":97},{"n":116,"text":"\t\tconst r = spawnSync(`abso ${args.join(\" \")}`, { cwd: root, encoding: \"utf8\", shell: true });","atom":"a815","author":"speed","version":97},{"n":117,"text":"\t\tif (r.status !== 0) throw new Error(`abso ${args.join(\" \")} failed: ${(r.stderr || r.stdout).trim()}`);","atom":"a815","author":"speed","version":97},{"n":118,"text":"\t\treturn r.stdout;","atom":"a815","author":"speed","version":97},{"n":119,"text":"\t};","atom":"a815","author":"speed","version":97},{"n":120,"text":"\tconst files = new Set();","atom":"a815","author":"speed","version":97},{"n":121,"text":"\tfor (const m of run([\"diff\"]).matchAll(/^(?:\\+\\+\\+ b|--- a)\\/(.+)$/gm)) files.add(m[1].trim());","atom":"a815","author":"speed","version":97},{"n":122,"text":"\tconst unrecorded = /^Not yet recorded[^:]*:\\s*(.+)$/m.exec(run([\"status\"]));","atom":"a815","author":"speed","version":97},{"n":123,"text":"\tif (unrecorded) for (const f of unrecorded[1].split(/,\\s*/)) files.add(f.trim());","atom":"a815","author":"speed","version":97},{"n":124,"text":"\treturn [...files].filter(Boolean);","atom":"a815","author":"speed","version":97},{"n":125,"text":"}","atom":"a815","author":"speed","version":97},{"n":126,"text":"","atom":"a815","author":"speed","version":97},{"n":127,"text":"/**","atom":"a820","author":"speed","version":98},{"n":128,"text":" * A tsconfig's JSON. Plain JSON is read as it is; one with comments goes through TypeScript's reader, loaded","atom":"a820","author":"speed","version":98},{"n":129,"text":" * only then, since loading TypeScript takes seconds on a busy machine.","atom":"a820","author":"speed","version":98},{"n":130,"text":" */","atom":"a820","author":"speed","version":98},{"n":131,"text":"function readTsconfig(path) {","atom":"a820","author":"speed","version":98},{"n":132,"text":"\tconst text = readFileSync(path, \"utf8\");","atom":"a820","author":"speed","version":98},{"n":133,"text":"\ttry {","atom":"a820","author":"speed","version":98},{"n":134,"text":"\t\treturn JSON.parse(text);","atom":"a820","author":"speed","version":98},{"n":135,"text":"\t} catch {","atom":"a820","author":"speed","version":98},{"n":136,"text":"\t\tconst ts = createRequire(join(root, \"package.json\"))(\"typescript\");","atom":"a820","author":"speed","version":98},{"n":137,"text":"\t\treturn ts.parseConfigFileTextToJson(path, text).config ?? {};","atom":"a820","author":"speed","version":98},{"n":138,"text":"\t}","atom":"a820","author":"speed","version":98},{"n":139,"text":"}","atom":"a820","author":"speed","version":98},{"n":140,"text":"","atom":"a820","author":"speed","version":98},{"n":141,"text":"/** What the changed files reach: test files to run per test group, tsconfigs to check, files for biome. */","atom":"a815","author":"speed","version":97},{"n":142,"text":"export function plan(changed, files = allFiles()) {","atom":"a815","author":"speed","version":97},{"n":143,"text":"\tconst known = new Set(files);","atom":"a815","author":"speed","version":97},{"n":144,"text":"\tif (changed.some((f) => matches(f, SETUP))) return { full: changed.filter((f) => matches(f, SETUP)) };","atom":"a815","author":"speed","version":97},{"n":145,"text":"\tconst code = files.filter((f) => CODE.has(extname(f)) && !f.endsWith(\".d.ts\"));","atom":"a815","author":"speed","version":97},{"n":146,"text":"\tconst importers = importGraph(code, known);","atom":"a815","author":"speed","version":97},{"n":147,"text":"\t// Everything that imports a changed file, through any number of imports.","atom":"a815","author":"speed","version":97},{"n":148,"text":"\tconst reached = new Set(changed.filter((f) => known.has(f)));","atom":"a815","author":"speed","version":97},{"n":149,"text":"\tconst queue = [...reached];","atom":"a815","author":"speed","version":97},{"n":150,"text":"\twhile (queue.length)","atom":"a815","author":"speed","version":97},{"n":151,"text":"\t\tfor (const by of importers.get(queue.pop()) ?? []) if (!reached.has(by)) reached.add(by), queue.push(by);","atom":"a815","author":"speed","version":97},{"n":152,"text":"\t// A changed file that isn't code: the test files that name it.","atom":"a815","author":"speed","version":97},{"n":153,"text":"\tconst tests = TESTS.map((t) => ({ ...t, files: [] }));","atom":"a815","author":"speed","version":97},{"n":154,"text":"\tconst owner = (f) =>","atom":"a815","author":"speed","version":97},{"n":155,"text":"\t\ttests.find(","atom":"a815","author":"speed","version":97},{"n":156,"text":"\t\t\t(t) =>","atom":"a815","author":"speed","version":97},{"n":157,"text":"\t\t\t\t(t.cwd === \".\" || f.startsWith(`${t.cwd}/`)) && matches(t.cwd === \".\" ? f : f.slice(t.cwd.length + 1), t.globs),","atom":"a815","author":"speed","version":97},{"n":158,"text":"\t\t);","atom":"a815","author":"speed","version":97},{"n":159,"text":"\tconst allTests = files.filter((f) => owner(f));","atom":"a815","author":"speed","version":97},{"n":160,"text":"\tfor (const f of changed.filter((c) => known.has(c) && !CODE.has(extname(c)))) {","atom":"a815","author":"speed","version":97},{"n":161,"text":"\t\tconst name = f.split(\"/\").pop();","atom":"a815","author":"speed","version":97},{"n":162,"text":"\t\tfor (const t of allTests) if (readFileSync(join(root, t), \"utf8\").includes(name)) reached.add(t);","atom":"a815","author":"speed","version":97},{"n":163,"text":"\t}","atom":"a815","author":"speed","version":97},{"n":164,"text":"\tfor (const f of reached) {","atom":"a815","author":"speed","version":97},{"n":165,"text":"\t\tconst t = owner(f);","atom":"a815","author":"speed","version":97},{"n":166,"text":"\t\tif (t) t.files.push(t.cwd === \".\" ? f : f.slice(t.cwd.length + 1));","atom":"a815","author":"speed","version":97},{"n":167,"text":"\t}","atom":"a815","author":"speed","version":97},{"n":168,"text":"\tconst typechecks = TYPECHECKS.filter((c) => {","atom":"a815","author":"speed","version":97},{"n":169,"text":"\t\tconst cfg = readTsconfig(join(root, c.tsconfig));","atom":"a820","author":"speed","version":98},{"n":170,"text":"\t\tconst dir = posix(dirname(c.tsconfig));","atom":"a815","author":"speed","version":97},{"n":171,"text":"\t\tconst inc = (cfg.include ?? [\"**/*\"]).map((g) => posix(join(dir, g)));","atom":"a815","author":"speed","version":97},{"n":172,"text":"\t\tconst exc = (cfg.exclude ?? []).map((g) => posix(join(dir, g)));","atom":"a815","author":"speed","version":97},{"n":173,"text":"\t\treturn [...reached].some((f) => matches(f, inc) && !matches(f, exc));","atom":"a815","author":"speed","version":97},{"n":174,"text":"\t});","atom":"a815","author":"speed","version":97},{"n":175,"text":"\tconst lint = changed.filter((f) => known.has(f) && /\\.(m?[jt]sx?|cjs|json|jsonc|css)$/.test(f));","atom":"a815","author":"speed","version":97},{"n":176,"text":"\treturn { tests: tests.filter((t) => t.files.length), typechecks, lint };","atom":"a815","author":"speed","version":97},{"n":177,"text":"}","atom":"a815","author":"speed","version":97},{"n":178,"text":"","atom":"a815","author":"speed","version":97},{"n":179,"text":"/** Runs one command, its output kept, and resolves with its exit and time. */","atom":"a815","author":"speed","version":97},{"n":180,"text":"function runOne(name, cmd, args, cwd) {","atom":"a815","author":"speed","version":97},{"n":181,"text":"\tconst started = Date.now();","atom":"a815","author":"speed","version":97},{"n":182,"text":"\treturn new Promise((done) => {","atom":"a815","author":"speed","version":97},{"n":183,"text":"\t\tconst child = spawn(cmd, args, { cwd: join(root, cwd) });","atom":"a815","author":"speed","version":97},{"n":184,"text":"\t\tlet out = \"\";","atom":"a815","author":"speed","version":97},{"n":185,"text":"\t\tchild.stdout.on(\"data\", (d) => (out += d));","atom":"a815","author":"speed","version":97},{"n":186,"text":"\t\tchild.stderr.on(\"data\", (d) => (out += d));","atom":"a815","author":"speed","version":97},{"n":187,"text":"\t\tchild.on(\"close\", (code) => done({ name, code, out, ms: Date.now() - started }));","atom":"a815","author":"speed","version":97},{"n":188,"text":"\t});","atom":"a815","author":"speed","version":97},{"n":189,"text":"}","atom":"a815","author":"speed","version":97},{"n":190,"text":"","atom":"a815","author":"speed","version":97},{"n":191,"text":"async function main() {","atom":"a815","author":"speed","version":97},{"n":192,"text":"\tconst argv = process.argv.slice(2);","atom":"a815","author":"speed","version":97},{"n":193,"text":"\tconst listOnly = argv.includes(\"--list\");","atom":"a815","author":"speed","version":97},{"n":194,"text":"\tconst given = argv.filter((a) => a !== \"--list\").map((a) => posix(a).replace(/^\\.\\//, \"\"));","atom":"a815","author":"speed","version":97},{"n":195,"text":"\tconst changed = given.length ? given : draftFiles();","atom":"a815","author":"speed","version":97},{"n":196,"text":"\tif (!changed.length) {","atom":"a815","author":"speed","version":97},{"n":197,"text":"\t\tconsole.log(\"Nothing changed in this folder: nothing to check.\");","atom":"a815","author":"speed","version":97},{"n":198,"text":"\t\treturn;","atom":"a815","author":"speed","version":97},{"n":199,"text":"\t}","atom":"a815","author":"speed","version":97},{"n":200,"text":"\tconst p = plan(changed);","atom":"a815","author":"speed","version":97},{"n":201,"text":"\tif (p.full) {","atom":"a815","author":"speed","version":97},{"n":202,"text":"\t\tconsole.log(`Setup changed (${p.full.join(\", \")}): running the full check.`);","atom":"a815","author":"speed","version":97},{"n":203,"text":"\t\tif (listOnly) return;","atom":"a815","author":"speed","version":97},{"n":204,"text":"\t\tconst { check } = JSON.parse(readFileSync(join(root, \"abso.json\"), \"utf8\"));","atom":"a815","author":"speed","version":97},{"n":205,"text":"\t\tconst r = spawnSync(check, { cwd: root, stdio: \"inherit\", shell: true });","atom":"a815","author":"speed","version":97},{"n":206,"text":"\t\tprocess.exit(r.status ?? 1);","atom":"a815","author":"speed","version":97},{"n":207,"text":"\t}","atom":"a815","author":"speed","version":97},{"n":208,"text":"\tconst jobs = [];","atom":"a815","author":"speed","version":97},{"n":209,"text":"\tfor (const t of p.tests)","atom":"a815","author":"speed","version":97},{"n":210,"text":"\t\tjobs.push({","atom":"a815","author":"speed","version":97},{"n":211,"text":"\t\t\tname: `test ${t.cwd} (${t.files.length} files)`,","atom":"a815","author":"speed","version":97},{"n":212,"text":"\t\t\tcmd: process.execPath,","atom":"a815","author":"speed","version":97},{"n":213,"text":"\t\t\targs: [...t.args, \"--test\", ...t.files],","atom":"a815","author":"speed","version":97},{"n":214,"text":"\t\t\tcwd: t.cwd,","atom":"a815","author":"speed","version":97},{"n":215,"text":"\t\t});","atom":"a815","author":"speed","version":97},{"n":216,"text":"\tfor (const c of p.typechecks) {","atom":"a815","author":"speed","version":97},{"n":217,"text":"\t\tconst info = `node_modules/.cache/tsc/${c.tsconfig.replace(/[/\\\\]/g, \"_\")}.tsbuildinfo`;","atom":"a815","author":"speed","version":97},{"n":218,"text":"\t\tjobs.push({","atom":"a815","author":"speed","version":97},{"n":219,"text":"\t\t\tname: `typecheck ${c.tsconfig}`,","atom":"a815","author":"speed","version":97},{"n":220,"text":"\t\t\tcmd: process.execPath,","atom":"a815","author":"speed","version":97},{"n":221,"text":"\t\t\targs: [","atom":"a815","author":"speed","version":97},{"n":222,"text":"\t\t\t\tjoin(root, \"node_modules/typescript/bin/tsc\"),","atom":"a815","author":"speed","version":97},{"n":223,"text":"\t\t\t\t\"--noEmit\",","atom":"a815","author":"speed","version":97},{"n":224,"text":"\t\t\t\t\"-p\",","atom":"a815","author":"speed","version":97},{"n":225,"text":"\t\t\t\tc.tsconfig,","atom":"a815","author":"speed","version":97},{"n":226,"text":"\t\t\t\t\"--incremental\",","atom":"a815","author":"speed","version":97},{"n":227,"text":"\t\t\t\t\"--tsBuildInfoFile\",","atom":"a815","author":"speed","version":97},{"n":228,"text":"\t\t\t\tinfo,","atom":"a815","author":"speed","version":97},{"n":229,"text":"\t\t\t],","atom":"a815","author":"speed","version":97},{"n":230,"text":"\t\t\tcwd: \".\",","atom":"a815","author":"speed","version":97},{"n":231,"text":"\t\t});","atom":"a815","author":"speed","version":97},{"n":232,"text":"\t}","atom":"a815","author":"speed","version":97},{"n":233,"text":"\tif (p.lint.length)","atom":"a815","author":"speed","version":97},{"n":234,"text":"\t\tjobs.push({","atom":"a815","author":"speed","version":97},{"n":235,"text":"\t\t\tname: `biome (${p.lint.length} files)`,","atom":"a815","author":"speed","version":97},{"n":236,"text":"\t\t\tcmd: process.execPath,","atom":"a815","author":"speed","version":97},{"n":237,"text":"\t\t\targs: [join(root, \"node_modules/@biomejs/biome/bin/biome\"), \"check\", \"--no-errors-on-unmatched\", ...p.lint],","atom":"a815","author":"speed","version":97},{"n":238,"text":"\t\t\tcwd: \".\",","atom":"a815","author":"speed","version":97},{"n":239,"text":"\t\t});","atom":"a815","author":"speed","version":97},{"n":240,"text":"\tconsole.log(`Changed: ${changed.join(\", \")}`);","atom":"a815","author":"speed","version":97},{"n":241,"text":"\tfor (const j of jobs)","atom":"a815","author":"speed","version":97},{"n":242,"text":"\t\tconsole.log(","atom":"a815","author":"speed","version":97},{"n":243,"text":"\t\t\t`  ${j.name}${j.name.startsWith(\"test\") ? `: ${j.args.filter((a) => /\\.test\\./.test(a)).join(\" \")}` : \"\"}`,","atom":"a815","author":"speed","version":97},{"n":244,"text":"\t\t);","atom":"a815","author":"speed","version":97},{"n":245,"text":"\tif (listOnly || !jobs.length) return;","atom":"a815","author":"speed","version":97},{"n":246,"text":"\tconst started = Date.now();","atom":"a815","author":"speed","version":97},{"n":247,"text":"\tconst slots = Math.max(1, Number(process.env.ABSO_CHECK_SLOTS) || availableParallelism());","atom":"a815","author":"speed","version":97},{"n":248,"text":"\tconst results = [];","atom":"a815","author":"speed","version":97},{"n":249,"text":"\tfor (let i = 0; i < jobs.length; i += slots)","atom":"a815","author":"speed","version":97},{"n":250,"text":"\t\tresults.push(...(await Promise.all(jobs.slice(i, i + slots).map((j) => runOne(j.name, j.cmd, j.args, j.cwd)))));","atom":"a815","author":"speed","version":97},{"n":251,"text":"\tfor (const r of results.filter((r) => r.code !== 0)) console.log(`\\n--- ${r.name} failed ---\\n${r.out.trimEnd()}`);","atom":"a815","author":"speed","version":97},{"n":252,"text":"\tconsole.log(\"\");","atom":"a815","author":"speed","version":97},{"n":253,"text":"\tfor (const r of results)","atom":"a815","author":"speed","version":97},{"n":254,"text":"\t\tconsole.log(`${r.code === 0 ? \"ok  \" : \"FAIL\"} ${(r.ms / 1000).toFixed(1).padStart(6)} s  ${r.name}`);","atom":"a815","author":"speed","version":97},{"n":255,"text":"\tconsole.log(`${((Date.now() - started) / 1000).toFixed(1)} s in all. The full check runs when you push.`);","atom":"a864","author":"rename","version":100},{"n":256,"text":"\tif (results.some((r) => r.code !== 0)) process.exitCode = 1;","atom":"a815","author":"speed","version":97},{"n":257,"text":"}","atom":"a815","author":"speed","version":97},{"n":258,"text":"","atom":"a815","author":"speed","version":97},{"n":259,"text":"if (process.argv[1] && resolve(process.argv[1]) === fileURLToPath(import.meta.url)) await main();","atom":"a815","author":"speed","version":97}],"atoms":[{"atom":"a815","author":"speed","message":"","time":1791643054861,"timeIso":"2026-10-10T14:37:34.861Z","publish":{"draft":null,"version":97,"agent":"speed","message":"npm run check:changed: runs the tests that import the changed files, the typecheck when it reaches them and biome on them, for running by hand before a publish; setup changes run the full check. README says to use it instead of the full check by hand. The merge queue's check is unchanged, plus the script's own tests.","time":1791643274731,"timeIso":"2026-10-10T14:41:14.731Z"}},{"atom":"a818","author":"speed","message":"","time":1791643265981,"timeIso":"2026-10-10T14:41:05.981Z","publish":{"draft":null,"version":97,"agent":"speed","message":"npm run check:changed: runs the tests that import the changed files, the typecheck when it reaches them and biome on them, for running by hand before a publish; setup changes run the full check. README says to use it instead of the full check by hand. The merge queue's check is unchanged, plus the script's own tests.","time":1791643274731,"timeIso":"2026-10-10T14:41:14.731Z"}},{"atom":"a820","author":"speed","message":"","time":1791648216506,"timeIso":"2026-10-10T16:03:36.506Z","publish":{"draft":null,"version":98,"agent":"speed","message":"check:changed reads tsconfig.json as plain JSON and loads TypeScript only for one with comments: loading it took most of the plan's time on a busy machine.","time":1791648225141,"timeIso":"2026-10-10T16:03:45.141Z"}},{"atom":"a864","author":"rename","message":"","time":1791659799126,"timeIso":"2026-10-10T19:16:39.126Z","publish":{"draft":null,"version":100,"agent":"rename","message":"abso publish is now abso push, abso sync is now abso pull (abso 427)\n\nCommands, help, flags, messages, MCP tool names and descriptions, hook text, README, SKILL.md and tests say push and pull; \"shared\" stays the noun (\"Pushed version N\"). No aliases, no notices. A queued push that was \"pulled\" is now \"turned back\", so pull means one thing.\n\npush -f/--force/-u/--all/--tags and pull --rebase/--ff-only/--squash refuse with one plain line naming the abso way; push and pull take no remote or branch.\n\nKept as stored: log entry kinds (publish, sync, pulled), HTTP route paths, the pipeline trigger on: publish, the yours (unpublished) marker, npm-publish.","time":1791659833853,"timeIso":"2026-10-10T19:17:13.853Z"}},{"atom":"a1581","author":"codex-capacity-chair","message":"","time":1791914678514,"timeIso":"2026-10-13T18:04:38.514Z","publish":{"draft":null,"version":157,"agent":"codex-capacity-chair","message":"Share the SQLite writer and projection host with the open server","time":1791915928641,"timeIso":"2026-10-13T18:25:28.641Z"}}]}