mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-09-07 08:26:11 +00:00
* chore: release v1.6.11 Co-authored-by: Cursor <cursoragent@cursor.com> * fix(test): read /api/info version from package.json server-info unit tests hardcoded 1.6.10 while buildServerInfo reads package.json, so the 1.6.11 bump failed ubuntu coverage 3/3. Co-authored-by: Cursor <cursoragent@cursor.com> * refactor: read the published version from one helper Release bumps kept breaking tests that each re-required package.json. packageVersion() is now the single read for CLI, MCP, serve, and those tests. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Gergo Magyar <gergomagyar0@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
13 lines
496 B
TypeScript
13 lines
496 B
TypeScript
import { createRequire } from 'node:module';
|
|
import { describe, expect, it } from 'vitest';
|
|
import { packageVersion } from '../../src/core/package-version.js';
|
|
|
|
const fromManifest = (createRequire(import.meta.url)('../../package.json') as { version: string })
|
|
.version;
|
|
|
|
describe('packageVersion', () => {
|
|
it('returns the same string as gitnexus/package.json#version', () => {
|
|
expect(packageVersion()).toBe(fromManifest);
|
|
expect(packageVersion()).toMatch(/^\d+\.\d+\.\d+/);
|
|
});
|
|
});
|