Give the plugin its own CalVer

The plugin ships inside the server image but shared the app's CalVer, so an
app-only release marked every paired reader as needing a plugin update. It
also let the version drift: the 2026.10.09 release still reported 2026.09.25.

- read the plugin version from const.lua at startup so LATEST_PLUGIN_VERSION
  cannot diverge from the packaged plugin
- keep MIN_COVER_PLUGIN_VERSION and MIN_INCREMENTAL_PLUGIN_VERSION as
  independent compatibility floors instead of copies of the app version
- add scripts/version.mjs (check by default, --write to sync) with a
  dependency-free zip reader; npm test now fails on a drifted version string
  or a stale public/kovi-plugin.zip
- bump the app version to 2026.11.13
This commit is contained in:
mdaleo404 committed 2026-11-13 07:44:48 +00:00
1 parent 355688eaa5
commit d95d19cd38
7 files changed
+185 -7

No files matched your search

+5 -2
View File
@@ -45,9 +45,12 @@ test('server detects plugins too old for embedded-cover requests',()=>{
assert.match(server,/update_recommended/);
});
test('packaged plugin version is aligned with kovi 2026.09.25',()=>{
test('plugin version is declared once and surfaced in its metadata',()=>{
const constants=fs.readFileSync(new URL('../plugins/kovi.koplugin/const.lua', import.meta.url),'utf8');
assert.match(constants,/2026\.09\.25/);
const meta=fs.readFileSync(new URL('../plugins/kovi.koplugin/_meta.lua', import.meta.url),'utf8');
const version=/VERSION\s*=\s*"([^"]+)"/.exec(constants)?.[1];
assert.match(version||'',/^\d{4}\.\d{2}\.\d{2}$/);
assert.ok(meta.includes(`v${version}`));
});