From 3c7fa8fe82c927bc527514e7eb1a1f55b2323308 Mon Sep 17 00:00:00 2001 From: Last2014 Date: Thu, 21 May 2026 22:45:48 +0900 Subject: [PATCH] =?UTF-8?q?Fix:=20=E5=9C=B0=E9=9C=87=E6=83=85=E5=A0=B1?= =?UTF-8?q?=E3=81=AE=E6=83=85=E5=A0=B1=E6=BA=90=E3=81=A8=E5=90=84=E9=9C=87?= =?UTF-8?q?=E5=BA=A6=E3=81=AE=E9=96=93=E3=81=AB=E6=94=B9=E8=A1=8C=E3=81=8C?= =?UTF-8?q?=E3=81=AA=E3=81=84=E5=95=8F=E9=A1=8C=20/=20Fix:=20=E6=9C=80?= =?UTF-8?q?=E5=A4=A7=E9=9C=87=E5=BA=A6=E3=81=8C=E4=B8=8D=E6=98=8E=E3=81=AA?= =?UTF-8?q?=E5=A0=B4=E5=90=88=E3=81=AB=E3=82=82=E8=A1=8C=E3=81=8C=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0=E3=81=95=E3=82=8C=E3=82=8B=E5=95=8F=E9=A1=8C=20/=20Fi?= =?UTF-8?q?x:=20pnpm=E3=81=8C=E5=8B=95=E4=BD=9C=E3=81=97=E3=81=AA=E3=81=84?= =?UTF-8?q?=E5=95=8F=E9=A1=8C=20/=202026.5.8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 5 +++++ package.json | 2 +- pnpm-workspace.yaml | 7 +++---- src/feature/earthquake/index.ts | 6 ++++-- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7585f32..4865a42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# 2026.5.8 +- Fix: 地震情報の情報源と各震度の間に改行がない問題 +- Fix: 最大震度が不明な場合にも行が追加される問題 +- Fix: pnpmが動作しない問題 + # 2026.5.7 - Feat: 朝四時に何してるんだい? - Chg: pnpm 11.1.3 diff --git a/package.json b/package.json index 0da40d0..dad87f4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "notice-uwuzu", - "version": "2026.5.7", + "version": "2026.5.8", "type": "module", "main": "dist/index.js", "scripts": { diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 22d40a0..694aa03 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,4 +1,3 @@ -onlyBuiltDependencies: - - "better-uwuzu-sdk" - - "miq" - - sharp +allowBuilds: + canvas: true + sharp: true \ No newline at end of file diff --git a/src/feature/earthquake/index.ts b/src/feature/earthquake/index.ts index 9ba4128..05e0501 100644 --- a/src/feature/earthquake/index.ts +++ b/src/feature/earthquake/index.ts @@ -168,7 +168,9 @@ const processMessage = async (message: any) => { const earthquakeNoticeText = []; earthquakeNoticeText.push(`### ${typeMessage[message.issue.type] ?? "地震情報"}`); earthquakeNoticeText.push(`⏰時刻: ${format(new Date(message.earthquake.time), "yyyy年M月d日 H:mm")}頃`); - earthquakeNoticeText.push(`🫨最大震度: ${scaleMessages[String(message.earthquake.maxScale)]}`); + earthquakeNoticeText.push(...(message.earthquake.maxScale === -1 + ? [] + : [`🫨最大震度: ${scaleMessages[String(message.earthquake.maxScale)]}`])); earthquakeNoticeText.push(...(message.earthquake.hypocenter.name === "" ? [] : [`📍震源地: ${message.earthquake.hypocenter.name}`])); @@ -192,7 +194,7 @@ const processMessage = async (message: any) => { earthquakeNoticeText.push(...(message.comments.freeFormComment === "" ? [] : [message.comments.freeFormComment])); - earthquakeNoticeText.push(`🔬情報源: P2P地震速報 - ${message.issue.source ?? "不明"}`); + earthquakeNoticeText.push(EOL + `🔬情報源: P2P地震速報 - ${message.issue.source ?? "不明"}`); const earthquakeUeuses = await createUeuse({ text: earthquakeNoticeText.join(EOL), }, "地震発生情報");