import assert from "node:assert/strict"; import { readFileSync } from "node:fs"; import test from "node:test"; import { APPLICATION_VERSION } from "../src/version.js"; test("package, gateway, and bridge share one application version", () => { const packageMetadata = JSON.parse(readFileSync("package.json", "utf8")) as { version: string }; assert.equal(APPLICATION_VERSION, packageMetadata.version); for (const path of ["src/server.ts", "src/bridge.ts"]) { const source = readFileSync(path, "utf8"); assert.match(source, /version: APPLICATION_VERSION/); assert.doesNotMatch(source, /version: "\d+\.\d+\.\d+(?:-rc\.\d+)?"/); } });