import assert from "node:assert/strict"; import { readFile } from "node:fs/promises"; import { test } from "node:test"; async function readJSON(path: string): Promise> { return JSON.parse(await readFile(new URL(path, import.meta.url), "utf8")) as Record; } test("all published surfaces report the package version", async () => { const packageJSON = await readJSON("./package.json"); const packageLock = await readJSON("./package-lock.json"); const claudeMarketplace = await readJSON("./.claude-plugin/marketplace.json"); const claudePlugin = await readJSON("./plugins/claude-code/.claude-plugin/plugin.json"); const codexPlugin = await readJSON("./plugins/codex/.codex-plugin/plugin.json"); const mcpServer = await readFile(new URL("./mcp-server.ts", import.meta.url), "utf8"); const mcpVersion = mcpServer.match(/new McpServer\(\{ name: "code-eye", version: "([^"]+)" \}\)/)?.[1]; assert.equal(packageLock.version, packageJSON.version); assert.equal(packageLock.packages[""].version, packageJSON.version); assert.equal(claudeMarketplace.plugins[0].version, packageJSON.version); assert.equal(claudePlugin.version, packageJSON.version); assert.equal(codexPlugin.version, packageJSON.version); assert.equal(mcpVersion, packageJSON.version); });