From 35ddc5dd2bd7a66b4242fa0f8b801dd8701410f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9A=E7=8E=A9=E5=B9=BB=E7=81=B5qwq?= <94176676+HuanLinOTO@users.noreply.github.com> Date: Sat, 21 Jan 2023 00:53:20 +0800 Subject: [PATCH] feat: show description for new plugins (#3) Co-authored-by: Shigma --- src/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index b48d9ed..b5e70ef 100644 --- a/src/index.ts +++ b/src/index.ts @@ -63,8 +63,9 @@ export function apply(ctx: Context, config: Config) { const diff = Object.keys({ ...previous, ...current }).map((name) => { const version1 = previous[name]?.version const version2 = current[name]?.version + const description = current[name]?.description if (version1 === version2) return - if (!version1) return `新增:${name}` + if (!version1) return `新增:${name}\n ${description}` if (version2) return `更新:${name} (${version1} → ${version2})` if (config.showDeletion) return `删除:${name}` }).filter(Boolean).sort()