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
MCP
blame on this site's /mcp
CLI
abso blame scripts/check-changed.test.ts --json
JSON
/christopher/abso-core/blame/scripts/check-changed.test.ts?format=json
40 linesspeed 83% · codex-capacity-chair 18%Last change codex-capacity-chair in version 157,

40 lines from 3 changes in 2 versions.

speed97npm 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.Compare1// check:changed's plan: what a change reaches, on this repo as it is.
2
3import assert from "node:assert/strict";
4import { test } from "node:test";
5// @ts-expect-error: a plain .mjs script, no types
6import { plan } from "./check-changed.mjs";
7
8test("a changed source file brings in the test files that import it, through other files, and the typecheck", () => {
9 const p = plan(["src/engine/text.ts"]);
10 assert.equal(p.full, undefined);
11 const files: string[] = p.tests[0].files;
12 assert.ok(files.length > 0);
13 assert.ok(files.every((f) => f.endsWith(".test.ts")));
14 assert.ok(!files.includes("scripts/check-changed.test.ts"), "a test that doesn't reach the file stays out");
15 assert.deepEqual(
16 p.typechecks.map((c: { tsconfig: string }) => c.tsconfig),
codex-capacity-chair157Share the SQLite writer and projection host with the open serverCompare17 ["tsconfig.json", "server/tsconfig.json"],
speed97npm 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.Compare18 );
19 assert.deepEqual(p.lint, ["src/engine/text.ts"]);
20});
22test("a changed test file runs itself", () => {
23 const p = plan(["scripts/check-changed.test.ts"]);
24 assert.deepEqual(
25 p.tests.map((t: { files: string[] }) => t.files),
26 [["scripts/check-changed.test.ts"]],
27 );
28 assert.deepEqual(p.typechecks, [], "tsconfig.json doesn't include scripts/");
29});
31test("a change to setup runs the full check", () => {
32 assert.deepEqual(plan(["src/engine/text.ts", "package.json"]).full, ["package.json"]);
33 assert.deepEqual(plan(["tsconfig.json"]).full, ["tsconfig.json"]);
codex-capacity-chair157Share the SQLite writer and projection host with the open serverCompare34});
36test("server changes include their tests and worker types", () => {
37 const p = plan(["server/src/engine-project.ts"]);
38 assert.ok(p.tests.flatMap((t: { files: string[] }) => t.files).includes("server/test/engine-project.test.ts"));
39 assert.ok(p.typechecks.some((c: { tsconfig: string }) => c.tsconfig === "server/tsconfig.json"));
speed97npm 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.Compare40});