Skip to content

abso-core

Public

abso is version control for agents: the client, the engine and a server you can run on your own Cloudflare account.

Check passed

Versions 97 to 98

Compare

+16 −2 in 3 places
Lines 15–24 at 98 (were 15–24 at 97)
1515// A change to setup (package.json, the lockfile, tsconfig.json, abso.json, biome.json) runs the full check.
1616import { spawn, spawnSync } from "node:child_process";
1717import { mkdirSync, readdirSync, readFileSync, statSync, writeFileSync } from "node:fs";
18+import { createRequire } from "node:module";
1819import { availableParallelism } from "node:os";
1920import { dirname, extname, join, matchesGlob, relative, resolve, sep } from "node:path";
2021import { fileURLToPath } from "node:url";
21−import ts from "typescript";
2222
2323const root = resolve(dirname(fileURLToPath(import.meta.url)), "..");
2424
Lines 118–137 at 98 (were 118–123 at 97)
118118 return [...files].filter(Boolean);
119119}
120120
121+/**
122+ * A tsconfig's JSON. Plain JSON is read as it is; one with comments goes through TypeScript's reader, loaded
123+ * only then, since loading TypeScript takes seconds on a busy machine.
124+ */
125+function readTsconfig(path) {
126+ const text = readFileSync(path, "utf8");
127+ try {
128+ return JSON.parse(text);
129+ } catch {
130+ const ts = createRequire(join(root, "package.json"))("typescript");
131+ return ts.parseConfigFileTextToJson(path, text).config ?? {};
132+ }
133+}
121135/** What the changed files reach: test files to run per test group, tsconfigs to check, files for biome. */
122136export function plan(changed, files = allFiles()) {
123137 const known = new Set(files);
Lines 160–166 at 98 (were 146–152 at 97)
146160 if (t) t.files.push(t.cwd === "." ? f : f.slice(t.cwd.length + 1));
147161 }
148162 const typechecks = TYPECHECKS.filter((c) => {
149− const cfg = ts.readConfigFile(join(root, c.tsconfig), (p) => readFileSync(p, "utf8")).config ?? {};
163+ const cfg = readTsconfig(join(root, c.tsconfig));
150164 const dir = posix(dirname(c.tsconfig));
151165 const inc = (cfg.include ?? ["**/*"]).map((g) => posix(join(dir, g)));
152166 const exc = (cfg.exclude ?? []).map((g) => posix(join(dir, g)));
MCP
compare on this site's /mcp
CLI
abso diff 97 98 scripts/check-changed.mjs --json
JSON
/christopher/abso-core/compare/97..98?file=scripts%2Fcheck-changed.mjs&format=json