bruce2431_obsidian-chat-bub.../version-bump.mjs
bruce2431 bbdbbf0247 v1.0.0: Obsidian 聊天记录气泡渲染插件
- 检测 #聊天记录 标签自动识别
- 解析格式: [发送者] YYYY-MM-DD HH:MM:SS
- 微信风格气泡: 对方浅灰 #f2f3f5 / 自己微信绿 #95ec69
- 引用回复灰色引用条、合并转发可展开卡片
- Obsidian ![[文件]] 内部链接转图片/音频/视频
- 全屏 fixed overlay,零触碰 Obsidian DOM
- Ctrl+P 命令渲染,Esc/✕ 退出
- 基于 obsidianmd/obsidian-sample-plugin 模板
2026-06-15 17:25:04 +08:00

17 lines
758 B
JavaScript

import { readFileSync, writeFileSync } from 'fs';
const targetVersion = process.env.npm_package_version;
// read minAppVersion from manifest.json and bump version to target version
const manifest = JSON.parse(readFileSync('manifest.json', 'utf8'));
const { minAppVersion } = manifest;
manifest.version = targetVersion;
writeFileSync('manifest.json', JSON.stringify(manifest, null, '\t'));
// update versions.json with target version and minAppVersion from manifest.json
// but only if the target version is not already in versions.json
const versions = JSON.parse(readFileSync('versions.json', 'utf8'));
if (!(targetVersion in versions)) {
versions[targetVersion] = minAppVersion;
writeFileSync('versions.json', JSON.stringify(versions, null, '\t'));
}