فینورا پرو - سامانه جامع حسابداری و صدور فاکتور
fix(A07): ensure UI, runtime and installer versions agree
* fix(A07): derive runtime version from package metadata * fix(A07): keep displayed app version in sync with runtime * test(A07): assert consistent UI/runtime/installer version
davoodmehraban89 committed
Oct 14, 2026 at 23:27 UTC
5288db63d6748c7e091f38acadcc9435bf9dab50
3 files changed
+22
-2
index.html
+1
-1
@@ -23,7 +23,7 @@
23
<div class="brand-logo">فینورا</div>
24
<div class="brand-text hide-on-collapse">
25
<h1>Factor-easyPro</h1>
26
- <small>نسخه ۲.۰.۳</small>
26
+ <small id="appVersionLabel">نسخه ۲.۰.۳</small>
27
</div>
28
</div>
29
src/main.js
+4
-1
@@ -2,6 +2,7 @@
2
// Finora Pro — Main Entry Point
3
// ============================================================
4
5
+import appPackage from '../package.json' with { type: 'json' };
6
import { SettingsView } from './views/SettingsView.js';
7
import { ChequesView } from './views/ChequesView.js';
8
import { TreasuryView } from './views/TreasuryView.js';
@@ -28,7 +29,7 @@ import { LicenseService } from './core/LicenseService.js';
29
import { CompanyService } from './core/CompanyService.js';
30
31
const FINORA = {
31
- version: '1.1.1',
32
+ version: appPackage.version,
33
Storage: StorageService,
34
Theme, Toast, Router, Auth, EventBus, Modal, KeyboardShortcuts, License: LicenseService, Company: CompanyService,
35
Utils: { Formatters, Jalali, numberToWords, NumberInput }
@@ -141,6 +142,8 @@ function showBootstrapError(err) {
142
143
async function bootstrap() {
144
try {
145
+ const visibleVersion = document.getElementById('appVersionLabel');
146
+ if (visibleVersion) visibleVersion.textContent = 'نسخه ' + FINORA.version;
147
console.log('🚀 Finora Pro v' + FINORA.version);
148
149
Theme.init();
tests/app-version-consistency.test.mjs
new
+17
@@ -0,0 +1,17 @@
1
+import test from 'node:test';
2
+import assert from 'node:assert/strict';
3
+import { readFileSync } from 'node:fs';
4
+
5
+const read = file => readFileSync(new URL('../' + file, import.meta.url), 'utf8');
6
+const manifest = JSON.parse(read('package.json'));
7
+const tauri = JSON.parse(read('src-tauri/tauri.conf.json'));
8
+const entry = read('src/main.js');
9
+const html = read('index.html');
10
+
11
+test('A07: desktop and application version use a single package manifest', () => {
12
+ assert.equal(manifest.version, tauri.version);
13
+ assert.match(entry, /version: appPackage\.version/);
14
+ assert.doesNotMatch(entry, /version:\s*['"]1\.1\.1['"]/);
15
+ assert.match(html, /id="appVersionLabel"/);
16
+ assert.match(entry, /visibleVersion\.textContent\s*=\s*'نسخه '\s*\+\s*FINORA\.version/);
17
+});