mirror of
https://github.com/pssah4/vault-operator.git
synced 2026-07-22 07:01:22 +00:00
versions.json was last updated for 2.12.8 and never bumped for 2.13.x or 2.14.x. The Obsidian plugin crawler reads versions.json to find the newest plugin version compatible with a given Obsidian version. With the file ending at 2.12.8 the Community Plugins entry still offered 2.12.8 even though manifest.json reports 2.14.3. Root cause: the package.json version-lifecycle hook references version-bump.mjs but the file did not exist, so npm version was never run during the recent releases. Backfill versions.json with all release tags 2.13.0..2.14.3 using the minAppVersion stored in each tag's manifest.json (verified via gh api). Add the missing version-bump.mjs so npm version handles manifest.json + versions.json automatically from now on. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
17 lines
719 B
JavaScript
17 lines
719 B
JavaScript
import { readFileSync, writeFileSync } from 'fs';
|
|
|
|
const targetVersion = process.env.npm_package_version;
|
|
if (!targetVersion) {
|
|
throw new Error('npm_package_version is not set. Run via `npm version <new>`.');
|
|
}
|
|
|
|
const manifest = JSON.parse(readFileSync('manifest.json', 'utf8'));
|
|
const { minAppVersion } = manifest;
|
|
manifest.version = targetVersion;
|
|
writeFileSync('manifest.json', JSON.stringify(manifest, null, 2) + '\n');
|
|
|
|
const versions = JSON.parse(readFileSync('versions.json', 'utf8'));
|
|
versions[targetVersion] = minAppVersion;
|
|
writeFileSync('versions.json', JSON.stringify(versions, null, 2) + '\n');
|
|
|
|
console.log(`Bumped manifest.json + versions.json to ${targetVersion} (minAppVersion=${minAppVersion})`);
|