diff --git a/package.json b/package.json index 99387fd..60928ea 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "blit-tech", - "version": "0.2.0", + "version": "1.0.0", "type": "module", "description": "A lightweight WebGPU retro engine for TypeScript, inspired by RetroBlit.", "author": "Václav Vančura", diff --git a/src/core/BTAPI.test.ts b/src/core/BTAPI.test.ts index 3bf6da5..3d11d0b 100644 --- a/src/core/BTAPI.test.ts +++ b/src/core/BTAPI.test.ts @@ -12,6 +12,10 @@ * stubbed animation-frame scheduling, and per-test singleton reset helpers. */ +import { readFileSync } from 'node:fs'; +import { dirname, join } from 'node:path'; +import { fileURLToPath } from 'node:url'; + import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; import { @@ -139,6 +143,14 @@ describe('BTAPI', () => { it('should expose VERSION_PATCH as a number', () => { expect(typeof BTAPI.VERSION_PATCH).toBe('number'); }); + + it('should match package.json version', () => { + const packageJsonPath = join(dirname(fileURLToPath(import.meta.url)), '../../package.json'); + const { version } = JSON.parse(readFileSync(packageJsonPath, 'utf8')) as { version: string }; + const btapiVersion = `${BTAPI.VERSION_MAJOR}.${BTAPI.VERSION_MINOR}.${BTAPI.VERSION_PATCH}`; + + expect(btapiVersion).toBe(version); + }); }); // #endregion diff --git a/src/core/BTAPI.ts b/src/core/BTAPI.ts index 7a50f18..bd4ad48 100644 --- a/src/core/BTAPI.ts +++ b/src/core/BTAPI.ts @@ -47,10 +47,10 @@ export class BTAPI { /** * Major semantic-version component. */ - public static readonly VERSION_MAJOR = 0; + public static readonly VERSION_MAJOR = 1; /** Minor version number. */ - public static readonly VERSION_MINOR = 2; + public static readonly VERSION_MINOR = 0; /** Patch version number. */ public static readonly VERSION_PATCH = 0; diff --git a/src/render/SoftwareTicker.ts b/src/render/SoftwareTicker.ts index 0ed05fd..d4214e9 100644 --- a/src/render/SoftwareTicker.ts +++ b/src/render/SoftwareTicker.ts @@ -62,7 +62,7 @@ export class SoftwareTicker { /** * Creates a ticker for the given engine version. * - * @param version - Engine version string (e.g. `"0.2.0"`), embedded in the banner text. + * @param version - Engine version string (e.g. `"1.0.0"`), embedded in the banner text. */ constructor(version: string) { this.text = `SOFTWARE RENDERER - blit-tech v${version}`;