update deps (MisskeyIO#887)

(cherry picked from commit f7da2bad6f0b25652ded11e6a9f86efc40872200)
(cherry picked from commit d60c307c4e4c3eaba2a40b46ba41c4d684d5d370)

Co-authored-by: おさむのひと <46447427+samunohito@users.noreply.github.com>
Co-authored-by: かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com>
This commit is contained in:
あわわわとーにゅ 2025-01-14 02:19:05 +09:00 committed by GitHub
parent cf1952ac0d
commit 9792ea0223
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 2018 additions and 1861 deletions

View file

@ -27,11 +27,11 @@
"@rollup/plugin-typescript": "12.1.2",
"@rollup/pluginutils": "5.1.4",
"@syuilo/aiscript": "0.19.0",
"@tabler/icons-webfont": "3.26.0",
"@tabler/icons-webfont": "3.28.1",
"@twemoji/parser": "15.1.1",
"@vitejs/plugin-vue": "5.2.1",
"@vue/compiler-sfc": "3.5.13",
"aiscript-vscode": "github:aiscript-dev/aiscript-vscode#v0.1.13",
"aiscript-vscode": "github:aiscript-dev/aiscript-vscode#v0.1.15",
"astring": "1.9.0",
"broadcast-channel": "7.0.0",
"buraha": "0.0.1",
@ -41,7 +41,7 @@
"chartjs-chart-matrix": "2.0.1",
"chartjs-plugin-gradient": "0.6.1",
"chartjs-plugin-zoom": "2.2.0",
"chromatic": "11.20.2",
"chromatic": "11.22.2",
"compare-versions": "6.1.1",
"cropperjs": "2.0.0-rc.0",
"date-fns": "4.1.0",
@ -59,21 +59,21 @@
"misskey-reversi": "workspace:*",
"photoswipe": "5.4.4",
"punycode.js": "2.3.1",
"rollup": "4.29.1",
"rollup": "4.30.1",
"sanitize-html": "2.14.0",
"sass": "1.83.0",
"shiki": "1.24.4",
"sass": "1.83.1",
"shiki": "1.26.2",
"strict-event-emitter-types": "2.0.0",
"textarea-caret": "3.1.0",
"three": "0.171.0",
"three": "0.172.0",
"throttle-debounce": "5.0.2",
"tinycolor2": "1.6.0",
"tsc-alias": "1.8.10",
"tsconfig-paths": "4.2.0",
"typescript": "5.7.2",
"uuid": "11.0.3",
"typescript": "5.7.3",
"uuid": "11.0.5",
"v-code-diff": "1.13.1",
"vite": "6.0.6",
"vite": "6.0.7",
"vue": "3.5.13",
"vue-gtag": "2.0.1",
"vuedraggable": "next",
@ -105,10 +105,10 @@
"@types/estree": "1.0.6",
"@types/matter-js": "0.19.8",
"@types/micromatch": "4.0.9",
"@types/node": "22.10.2",
"@types/node": "22.10.5",
"@types/punycode.js": "npm:@types/punycode@2.1.4",
"@types/sanitize-html": "2.13.0",
"@types/three": "0.171.0",
"@types/three": "0.172.0",
"@types/throttle-debounce": "5.0.2",
"@types/tinycolor2": "1.4.6",
"@types/ws": "8.5.13",
@ -122,8 +122,8 @@
"eslint": "8.57.1",
"eslint-plugin-import": "2.31.0",
"eslint-plugin-vue": "9.32.0",
"fast-glob": "3.3.2",
"happy-dom": "16.0.1",
"fast-glob": "3.3.3",
"happy-dom": "16.5.3",
"intersection-observer": "0.12.2",
"micromatch": "4.0.8",
"msw": "2.7.0",

View file

@ -3,7 +3,8 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { getHighlighterCore, loadWasm } from 'shiki/core';
import { createHighlighterCore } from 'shiki/core';
import { createOnigurumaEngine } from 'shiki/engine/oniguruma';
import darkPlus from 'shiki/themes/dark-plus.mjs';
import { bundledThemesInfo } from 'shiki/themes';
import { bundledLanguagesInfo } from 'shiki/langs';
@ -60,8 +61,6 @@ export async function getHighlighter(): Promise<HighlighterCore> {
}
async function initHighlighter() {
await loadWasm(import('shiki/onig.wasm?init'));
// テーマの重複を消す
const themes = unique([
darkPlus,
@ -69,7 +68,8 @@ async function initHighlighter() {
]);
const jsLangInfo = bundledLanguagesInfo.find(t => t.id === 'javascript');
const highlighter = await getHighlighterCore({
const highlighter = await createHighlighterCore({
engine: createOnigurumaEngine(() => import('shiki/onig.wasm?init')),
themes,
langs: [
...(jsLangInfo ? [async () => await jsLangInfo.import()] : []),

View file

@ -7,10 +7,10 @@ import { deepClone } from './clone.js';
import type { Cloneable } from './clone.js';
type DeepPartial<T> = {
[P in keyof T]?: T[P] extends Record<string | number | symbol, unknown> ? DeepPartial<T[P]> : T[P];
[P in keyof T]?: T[P] extends Record<PropertyKey, unknown> ? DeepPartial<T[P]> : T[P];
};
function isPureObject(value: unknown): value is Record<string | number | symbol, unknown> {
function isPureObject(value: unknown): value is Record<PropertyKey, unknown> {
return typeof value === 'object' && value !== null && !Array.isArray(value);
}
@ -18,14 +18,14 @@ function isPureObject(value: unknown): value is Record<string | number | symbol,
* valueにないキーをdefからもらう\
* nullはそのままundefinedはdefの値
**/
export function deepMerge<X extends Record<string | number | symbol, unknown>>(value: DeepPartial<X>, def: X): X {
export function deepMerge<X extends Record<PropertyKey, unknown>>(value: DeepPartial<X>, def: X): X {
if (isPureObject(value) && isPureObject(def)) {
const result = deepClone(value as Cloneable) as X;
for (const [k, v] of Object.entries(def) as [keyof X, X[keyof X]][]) {
if (!Object.hasOwn(value, k) || value[k] === undefined) {
result[k] = v;
} else if (isPureObject(v) && isPureObject(result[k])) {
const child = deepClone(result[k] as Cloneable) as DeepPartial<X[keyof X] & Record<string | number | symbol, unknown>>;
const child = deepClone(result[k] as Cloneable) as DeepPartial<X[keyof X] & Record<PropertyKey, unknown>>;
result[k] = deepMerge<typeof v>(child, v);
}
}

View file

@ -10,8 +10,8 @@
"declaration": false,
"sourceMap": false,
"target": "es2022",
"module": "nodenext",
"moduleResolution": "nodenext",
"module": "es2022",
"moduleResolution": "bundler",
"removeComments": false,
"noLib": false,
"strict": true,