BOM-tolerant manifest parse in the release workflow

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Nossimonov 2026-07-21 17:47:10 -07:00
parent d44993394b
commit 36f9274e89

View file

@ -50,7 +50,8 @@ jobs:
cp chartdown/packages/obsidian/dist/manifest.json manifest.json
node -e "
const fs = require('fs');
const m = JSON.parse(fs.readFileSync('manifest.json', 'utf8'));
// BOM-tolerant: Windows tooling occasionally writes one.
const m = JSON.parse(fs.readFileSync('manifest.json', 'utf8').replace(/^/, ''));
const versions = fs.existsSync('versions.json') ? JSON.parse(fs.readFileSync('versions.json', 'utf8')) : {};
versions[m.version] = m.minAppVersion;
fs.writeFileSync('versions.json', JSON.stringify(versions, null, 2) + '\n');