diff --git a/CHANGELOG.md b/CHANGELOG.md index f5dca887d..12f3c7593 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/cypress/e2e/basic.cy.js b/cypress/e2e/basic.cy.ts similarity index 100% rename from cypress/e2e/basic.cy.js rename to cypress/e2e/basic.cy.ts diff --git a/cypress/e2e/router.cy.js b/cypress/e2e/router.cy.ts similarity index 100% rename from cypress/e2e/router.cy.js rename to cypress/e2e/router.cy.ts diff --git a/cypress/e2e/widgets.cy.js b/cypress/e2e/widgets.cy.ts similarity index 100% rename from cypress/e2e/widgets.cy.js rename to cypress/e2e/widgets.cy.ts diff --git a/cypress/support/commands.js b/cypress/support/commands.ts similarity index 98% rename from cypress/support/commands.js rename to cypress/support/commands.ts index 91a4d7abe..c2d92e166 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.ts @@ -30,7 +30,7 @@ Cypress.Commands.add('visitHome', () => { }) Cypress.Commands.add('resetState', () => { - cy.window(win => { + cy.window().then(win => { win.indexedDB.deleteDatabase('keyval-store'); }); cy.request('POST', '/api/reset-db', {}).as('reset'); diff --git a/cypress/support/e2e.js b/cypress/support/e2e.ts similarity index 100% rename from cypress/support/e2e.js rename to cypress/support/e2e.ts diff --git a/cypress/support/index.ts b/cypress/support/index.ts new file mode 100644 index 000000000..c1bed2197 --- /dev/null +++ b/cypress/support/index.ts @@ -0,0 +1,19 @@ +declare global { + namespace Cypress { + interface Chainable { + login(username: string, password: string): Chainable; + + registerUser( + username: string, + password: string, + isAdmin?: boolean + ): Chainable; + + resetState(): Chainable; + + visitHome(): Chainable; + } + } +} + +export {} diff --git a/cypress/tsconfig.json b/cypress/tsconfig.json new file mode 100644 index 000000000..6fe7f32cc --- /dev/null +++ b/cypress/tsconfig.json @@ -0,0 +1,8 @@ +{ + "compilerOptions": { + "lib": ["dom", "es5"], + "target": "es5", + "types": ["cypress", "node"] + }, + "include": ["./**/*.ts"] +} diff --git a/package.json b/package.json index 21fb66700..680c08868 100644 --- a/package.json +++ b/package.json @@ -55,13 +55,14 @@ "cssnano": "6.1.0", "execa": "8.0.1", "js-yaml": "4.1.0", - "postcss": "8.4.35", + "postcss": "8.4.37", "terser": "5.29.2", "typescript": "5.4.2" }, "devDependencies": { - "@typescript-eslint/eslint-plugin": "7.2.0", - "@typescript-eslint/parser": "7.2.0", + "@types/node": "20.11.30", + "@typescript-eslint/eslint-plugin": "7.3.1", + "@typescript-eslint/parser": "7.3.1", "cross-env": "7.0.3", "cypress": "13.7.0", "eslint": "8.57.0", diff --git a/packages/backend/package.json b/packages/backend/package.json index 83256149a..9db75f49a 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -66,8 +66,8 @@ }, "dependencies": { "@authenio/samlify-node-xmllint": "2.0.0", - "@aws-sdk/client-s3": "3.534.0", - "@aws-sdk/lib-storage": "3.534.0", + "@aws-sdk/client-s3": "3.537.0", + "@aws-sdk/lib-storage": "3.537.0", "@bull-board/api": "5.15.1", "@bull-board/fastify": "5.15.1", "@bull-board/ui": "5.15.1", @@ -77,15 +77,15 @@ "@fastify/cors": "9.0.1", "@fastify/express": "2.3.0", "@fastify/formbody": "7.4.0", - "@fastify/http-proxy": "9.4.0", + "@fastify/http-proxy": "9.5.0", "@fastify/multipart": "8.1.0", "@fastify/static": "7.0.1", "@fastify/view": "9.0.0", "@misskey-dev/sharp-read-bmp": "1.2.0", - "@misskey-dev/summaly": "5.0.3", - "@nestjs/common": "10.3.3", - "@nestjs/core": "10.3.3", - "@nestjs/testing": "10.3.3", + "@misskey-dev/summaly": "5.1.0", + "@nestjs/common": "10.3.4", + "@nestjs/core": "10.3.4", + "@nestjs/testing": "10.3.4", "@peertube/http-signature": "1.7.0", "@simplewebauthn/server": "9.0.3", "@sinonjs/fake-timers": "11.2.2", @@ -100,7 +100,7 @@ "bcryptjs": "2.4.3", "blurhash": "2.0.5", "body-parser": "1.20.2", - "bullmq": "5.4.2", + "bullmq": "5.4.3", "cacheable-lookup": "7.0.0", "cbor": "9.0.2", "chalk": "5.3.0", @@ -109,7 +109,7 @@ "cli-highlight": "2.1.11", "color-convert": "2.0.1", "content-disposition": "0.5.4", - "date-fns": "3.4.0", + "date-fns": "3.6.0", "deep-email-validator": "0.1.21", "fastify": "4.26.2", "fastify-http-errors-enhanced": "5.0.3", @@ -122,7 +122,7 @@ "happy-dom": "10.0.3", "hpagent": "1.2.0", "htmlescape": "1.1.1", - "http-link-header": "1.1.2", + "http-link-header": "1.1.3", "ioredis": "5.3.2", "ip-cidr": "3.1.0", "ipaddr.js": "2.1.0", @@ -177,7 +177,7 @@ "slacc": "0.0.10", "strict-event-emitter-types": "2.0.0", "stringz": "2.1.0", - "systeminformation": "5.22.2", + "systeminformation": "5.22.6", "tinycolor2": "1.6.0", "tmp": "0.2.3", "tsc-alias": "1.8.8", @@ -194,7 +194,7 @@ "devDependencies": { "@jest/globals": "29.7.0", "@misskey-dev/eslint-plugin": "1.0.0", - "@nestjs/platform-express": "10.3.3", + "@nestjs/platform-express": "10.3.4", "@simplewebauthn/types": "9.0.1", "@swc/jest": "0.2.36", "@types/accepts": "1.3.7", @@ -213,13 +213,13 @@ "@types/jsrsasign": "10.5.13", "@types/mime-types": "2.1.4", "@types/ms": "0.7.34", - "@types/node": "20.11.27", + "@types/node": "20.11.30", "@types/node-forge": "1.3.11", "@types/nodemailer": "6.4.14", "@types/oauth": "0.9.4", "@types/oauth2orize": "1.11.4", "@types/oauth2orize-pkce": "0.1.2", - "@types/pg": "8.11.2", + "@types/pg": "8.11.3", "@types/pug": "2.0.10", "@types/punycode": "2.1.4", "@types/qrcode": "1.5.5", @@ -235,8 +235,8 @@ "@types/vary": "1.1.3", "@types/web-push": "3.6.3", "@types/ws": "8.5.10", - "@typescript-eslint/eslint-plugin": "7.2.0", - "@typescript-eslint/parser": "7.2.0", + "@typescript-eslint/eslint-plugin": "7.3.1", + "@typescript-eslint/parser": "7.3.1", "aws-sdk-client-mock": "3.0.1", "cross-env": "7.0.3", "eslint": "8.57.0", diff --git a/packages/frontend/package.json b/packages/frontend/package.json index fd9715ee9..6299973a1 100644 --- a/packages/frontend/package.json +++ b/packages/frontend/package.json @@ -41,10 +41,10 @@ "chartjs-chart-matrix": "2.0.1", "chartjs-plugin-gradient": "0.6.1", "chartjs-plugin-zoom": "2.0.1", - "chromatic": "11.0.8", + "chromatic": "11.1.1", "compare-versions": "6.1.0", "cropperjs": "2.0.0-beta.4", - "date-fns": "3.4.0", + "date-fns": "3.6.0", "escape-regexp": "0.0.1", "estree-walker": "3.0.3", "eventemitter3": "5.0.1", @@ -62,7 +62,7 @@ "rollup": "4.13.0", "sanitize-html": "2.12.1", "sass": "1.72.0", - "shiki": "1.1.7", + "shiki": "1.2.0", "strict-event-emitter-types": "2.0.0", "textarea-caret": "3.1.0", "three": "0.162.0", @@ -79,39 +79,39 @@ }, "devDependencies": { "@misskey-dev/eslint-plugin": "1.0.0", - "@misskey-dev/summaly": "5.0.3", - "@storybook/addon-actions": "8.0.0", - "@storybook/addon-essentials": "8.0.0", - "@storybook/addon-interactions": "8.0.0", - "@storybook/addon-links": "8.0.0", - "@storybook/addon-mdx-gfm": "8.0.0", - "@storybook/addon-storysource": "8.0.0", - "@storybook/blocks": "8.0.0", - "@storybook/components": "8.0.0", - "@storybook/core-events": "8.0.0", - "@storybook/manager-api": "8.0.0", - "@storybook/preview-api": "8.0.0", - "@storybook/react": "8.0.0", - "@storybook/react-vite": "8.0.0", - "@storybook/test": "8.0.0", - "@storybook/theming": "8.0.0", - "@storybook/types": "8.0.0", - "@storybook/vue3": "8.0.0", - "@storybook/vue3-vite": "8.0.0", - "@testing-library/vue": "8.0.2", + "@misskey-dev/summaly": "5.1.0", + "@storybook/addon-actions": "8.0.2", + "@storybook/addon-essentials": "8.0.2", + "@storybook/addon-interactions": "8.0.2", + "@storybook/addon-links": "8.0.2", + "@storybook/addon-mdx-gfm": "8.0.2", + "@storybook/addon-storysource": "8.0.2", + "@storybook/blocks": "8.0.2", + "@storybook/components": "8.0.2", + "@storybook/core-events": "8.0.2", + "@storybook/manager-api": "8.0.2", + "@storybook/preview-api": "8.0.2", + "@storybook/react": "8.0.2", + "@storybook/react-vite": "8.0.2", + "@storybook/test": "8.0.2", + "@storybook/theming": "8.0.2", + "@storybook/types": "8.0.2", + "@storybook/vue3": "8.0.2", + "@storybook/vue3-vite": "8.0.2", + "@testing-library/vue": "8.0.3", "@types/escape-regexp": "0.0.3", "@types/estree": "1.0.5", "@types/matter-js": "0.19.6", "@types/micromatch": "4.0.6", - "@types/node": "20.11.27", + "@types/node": "20.11.30", "@types/punycode": "2.1.4", "@types/sanitize-html": "2.11.0", "@types/throttle-debounce": "5.0.2", "@types/tinycolor2": "1.4.6", "@types/uuid": "9.0.8", "@types/ws": "8.5.10", - "@typescript-eslint/eslint-plugin": "7.2.0", - "@typescript-eslint/parser": "7.2.0", + "@typescript-eslint/eslint-plugin": "7.3.1", + "@typescript-eslint/parser": "7.3.1", "@vitest/coverage-v8": "0.34.6", "@vue/runtime-core": "3.4.15", "acorn": "8.11.3", @@ -124,14 +124,14 @@ "happy-dom": "13.6.2", "intersection-observer": "0.12.2", "micromatch": "4.0.5", - "msw": "2.2.3", + "msw": "2.2.9", "msw-storybook-addon": "2.0.0-beta.1", "nodemon": "3.1.0", "prettier": "3.2.5", "react": "18.2.0", "react-dom": "18.2.0", "start-server-and-test": "2.0.3", - "storybook": "8.0.0", + "storybook": "8.0.2", "storybook-addon-misskey-theme": "github:misskey-dev/storybook-addon-misskey-theme", "vite-plugin-turbosnap": "1.0.3", "vitest": "0.34.6", diff --git a/packages/frontend/src/boot/common.ts b/packages/frontend/src/boot/common.ts index 681beaf00..d86ae18ff 100644 --- a/packages/frontend/src/boot/common.ts +++ b/packages/frontend/src/boot/common.ts @@ -145,8 +145,11 @@ export async function common(createVue: () => App) { // NOTE: この処理は必ずクライアント更新チェック処理より後に来ること(テーマ再構築のため) watch(defaultStore.reactiveState.darkMode, (darkMode) => { applyTheme(darkMode ? ColdDeviceStorage.get('darkTheme') : ColdDeviceStorage.get('lightTheme')); + document.documentElement.dataset.colorMode = darkMode ? 'dark' : 'light'; }, { immediate: miLocalStorage.getItem('theme') == null }); + document.documentElement.dataset.colorMode = defaultStore.state.darkMode ? 'dark' : 'light'; + const darkTheme = computed(ColdDeviceStorage.makeGetterSetter('darkTheme')); const lightTheme = computed(ColdDeviceStorage.makeGetterSetter('lightTheme')); diff --git a/packages/frontend/src/components/MkCode.core.vue b/packages/frontend/src/components/MkCode.core.vue index 872517b6a..c0e7df5da 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