Format authored monorepo code with pinned language formatters

This commit is contained in:
Timothy J. Aveni
2026-09-15 15:23:24 -07:00
parent a174faea5c
commit 00fc2b9ff1
69 changed files with 5135 additions and 3306 deletions
+6 -3
View File
@@ -8,12 +8,15 @@ import { promisify } from "node:util";
import { inspectAuthoringRepository } from "../src/capability-language/authoring-inspect.js";
const execFile = promisify(callback);
test("inspection keeps current files and labels historical recovery without granting verification", async context => {
test("inspection keeps current files and labels historical recovery without granting verification", async (context) => {
const root = await mkdtemp(path.join(os.tmpdir(), "qx-inspection-test-"));
context.after(() => rm(root, { recursive: true, force: true }));
const git = (...args: string[]) => execFile("git", ["-C", root, ...args]);
await git("init");
await writeFile(path.join(root, "interface.qx"), 'interface Example id "interface:example" revision "interface:example@1" {}');
await writeFile(
path.join(root, "interface.qx"),
'interface Example id "interface:example" revision "interface:example@1" {}',
);
await git("add", ".");
await git("-c", "user.name=Test", "-c", "user.email=test@example.test", "commit", "-m", "contract");
const commit = (await git("rev-parse", "HEAD")).stdout.trim();
@@ -30,7 +33,7 @@ test("inspection keeps current files and labels historical recovery without gran
assert.match(inspected.files[1].declarations[0].source, /New/);
assert.equal((await git("rev-parse", "HEAD")).stdout.trim(), commit);
await symlink(path.join(root, "interface.qx"), path.join(root, "linked.qx"));
const linked = (await inspectAuthoringRepository(root)).files.find(file => file.file === "linked.qx")!;
const linked = (await inspectAuthoringRepository(root)).files.find((file) => file.file === "linked.qx")!;
assert.equal(linked.status, "unavailable");
assert.deepEqual(linked.declarations, []);
assert.match(JSON.stringify(linked.currentErrors), /ordinary files/);