From 115d91812e4bc25a56126f23b4ad13b07d451552 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=8A=E3=81=95=E3=82=80=E3=81=AE=E3=81=B2=E3=81=A8?= <46447427+samunohito@users.noreply.github.com> Date: Wed, 20 Mar 2024 10:30:45 +0900 Subject: [PATCH] =?UTF-8?q?fix(frontend):=20shiki=E3=81=AE=E8=A8=80?= =?UTF-8?q?=E8=AA=9E=E3=83=BB=E3=83=86=E3=83=BC=E3=83=9E=E3=81=AE=E5=AE=9A?= =?UTF-8?q?=E7=BE=A9=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB=E3=82=92CDN(esm.s?= =?UTF-8?q?h)=E3=81=8B=E3=82=89=E5=8F=96=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB=E3=81=99=E3=82=8B=20(#13598)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(frontend): shikiの言語・テーマの定義ファイルをCDN(esm.sh)から取るようにする * fix CHANGELOG.md --- CHANGELOG.md | 2 ++ packages/frontend/package.json | 2 +- .../frontend/src/components/MkCode.core.vue | 10 +++---- packages/frontend/src/index.html | 2 +- .../frontend/src/scripts/code-highlighter.ts | 18 ++++++------ packages/frontend/src/scripts/theme.ts | 4 +-- packages/frontend/src/store.ts | 1 - packages/frontend/vite.config.ts | 29 +++++++++++++++++++ pnpm-lock.yaml | 20 ++++++++----- 9 files changed, 61 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d948127d06..18dd07f1c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,8 @@ (Cherry-picked from https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/459) - Fix: ページタイトルでローカルユーザーとリモートユーザーの区別がつかない問題を修正 (Cherry-picked from https://github.com/MisskeyIO/misskey/pull/528) +- Fix: コードブロックのシンタックスハイライトで使用される定義ファイルをCDNから取得するように #13177 + - CDNから取得せずMisskey本体にバンドルする場合は`pacakges/frontend/vite.config.ts`を修正してください。 ### Server - Enhance: エンドポイント`antennas/update`の必須項目を`antennaId`のみに diff --git a/packages/frontend/package.json b/packages/frontend/package.json index 682def8e8d..db7f7b76f6 100644 --- a/packages/frontend/package.json +++ b/packages/frontend/package.json @@ -60,7 +60,7 @@ "rollup": "4.12.0", "sanitize-html": "2.12.1", "sass": "1.71.1", - "shiki": "1.1.7", + "shiki": "1.2.0", "strict-event-emitter-types": "2.0.0", "textarea-caret": "3.1.0", "three": "0.162.0", diff --git a/packages/frontend/src/components/MkCode.core.vue b/packages/frontend/src/components/MkCode.core.vue index 872517b6aa..c0e7df5dac 100644 --- a/packages/frontend/src/components/MkCode.core.vue +++ b/packages/frontend/src/components/MkCode.core.vue @@ -9,9 +9,9 @@ SPDX-License-Identifier: AGPL-3.0-only