Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release: 2025.3.2 #15633

Draft
wants to merge 24 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
05cdc09
[skip ci] Update CHANGELOG.md (prepend template)
github-actions[bot] Mar 9, 2025
d30ddd4
Refine preferences (#15597)
syuilo Mar 9, 2025
abc1e91
refactor
syuilo Mar 9, 2025
bdb7453
enhance(frontend): tweak settings page
syuilo Mar 9, 2025
f35eb0f
enhnace(frontend): 文字列比較のためのローマナイズを強化(設定の検索) (#15632)
kakkokari-gtyih Mar 9, 2025
06e7272
Bump version to 2025.3.2-alpha.0
github-actions[bot] Mar 9, 2025
be7e3b9
refactor(frontend): scripts -> utility
syuilo Mar 9, 2025
fcd7fa6
Merge branch 'develop' of https://github.com/misskey-dev/misskey into…
syuilo Mar 9, 2025
2918fb2
refactor(frontend): relocate theme script
syuilo Mar 9, 2025
69eee9f
enhance(frontend): ウィジェットもpreference管理に
syuilo Mar 9, 2025
933abed
Bump version to 2025.3.2-alpha.1
github-actions[bot] Mar 9, 2025
27e8805
refactor(frontend): relocate plugin consts
syuilo Mar 9, 2025
c9c04d8
enhance(frontend): migrate overridedDeviceKind to preference
syuilo Mar 9, 2025
6cefabc
chore(frontend): remove unused binding
syuilo Mar 9, 2025
0402866
enhance(frontend): improve plugin management
syuilo Mar 9, 2025
db5c127
fix(backend): fix handling of invalid urls in user profile (#15635)
eternal-flame-AD Mar 9, 2025
8e33043
Bump version to 2025.3.2-alpha.2
github-actions[bot] Mar 9, 2025
c76afce
enhance(frontend): improve plugin management
syuilo Mar 9, 2025
ac21fa7
Bump version to 2025.3.2-alpha.3
github-actions[bot] Mar 9, 2025
88efc0a
fix(dev): 検索インデックス対象ファイルでHMRが効かない問題を修正 (#15638)
tai-cha Mar 9, 2025
d9858b0
enhance(frontend): improve plugin management
syuilo Mar 10, 2025
6419af2
fix(frontend, dev): storybookのビルドエラー修正のため、as構文にリファクタ (#15640)
tai-cha Mar 10, 2025
4df9083
fix(frontend): テーマ切り替え時に一部の色が変わらない問題を修正
syuilo Mar 10, 2025
16ad6b3
Bump version to 2025.3.2-alpha.4
github-actions[bot] Mar 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
## 2025.3.2

### General
-

### Client
- Feat: 設定の管理が強化されました
- 自動でバックアップされるように
- Enhance: プラグインの管理が強化されました
- Fix: テーマ切り替え時に一部の色が変わらない問題を修正

### Server
- Fix: プロフィール追加情報で無効なURLに入力された場合に照会エラーを出るのを修正


## 2025.3.1

### General
Expand Down
80 changes: 80 additions & 0 deletions locales/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5278,6 +5278,86 @@ export interface Locale extends ILocale {
* アクセシビリティ
*/
"accessibility": string;
/**
* 設定のプロファイル
*/
"preferencesProfile": string;
/**
* 設定IDをコピー
*/
"copyPreferenceId": string;
/**
* 初期値に戻す
*/
"resetToDefaultValue": string;
/**
* アカウントで上書き
*/
"overrideByAccount": string;
/**
* 無題
*/
"untitled": string;
/**
* 名前はありません
*/
"noName": string;
/**
* スキップ
*/
"skip": string;
/**
* 復元
*/
"restore": string;
"_preferencesProfile": {
/**
* プロファイル名
*/
"profileName": string;
/**
* このデバイスを識別する名前を設定してください。
*/
"profileNameDescription": string;
/**
* 例: 「メインPC」、「スマホ」など
*/
"profileNameDescription2": string;
};
"_preferencesBackup": {
/**
* 自動バックアップ
*/
"autoBackup": string;
/**
* バックアップから復元
*/
"restoreFromBackup": string;
/**
* バックアップが見つかりませんでした
*/
"noBackupsFoundTitle": string;
/**
* 自動で作成されたバックアップは見つかりませんでしたが、バックアップファイルを手動で保存している場合、それをインポートして復元することはできます。
*/
"noBackupsFoundDescription": string;
/**
* 復元するバックアップを選択してください
*/
"selectBackupToRestore": string;
/**
* 自動バックアップを有効にするにはプロファイル名の設定が必要です。
*/
"youNeedToNameYourProfileToEnableAutoBackup": string;
/**
* このデバイスで設定の自動バックアップは有効になっていません。
*/
"autoPreferencesBackupIsNotEnabledForThisDevice": string;
/**
* 設定のバックアップが見つかりました
*/
"backupFound": string;
};
"_accountSettings": {
/**
* コンテンツの表示にログインを必須にする
Expand Down
23 changes: 23 additions & 0 deletions locales/ja-JP.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1315,6 +1315,29 @@ markAsSensitiveConfirm: "このメディアをセンシティブとして設定
unmarkAsSensitiveConfirm: "このメディアのセンシティブ指定を解除しますか?"
preferences: "環境設定"
accessibility: "アクセシビリティ"
preferencesProfile: "設定のプロファイル"
copyPreferenceId: "設定IDをコピー"
resetToDefaultValue: "初期値に戻す"
overrideByAccount: "アカウントで上書き"
untitled: "無題"
noName: "名前はありません"
skip: "スキップ"
restore: "復元"

_preferencesProfile:
profileName: "プロファイル名"
profileNameDescription: "このデバイスを識別する名前を設定してください。"
profileNameDescription2: "例: 「メインPC」、「スマホ」など"

_preferencesBackup:
autoBackup: "自動バックアップ"
restoreFromBackup: "バックアップから復元"
noBackupsFoundTitle: "バックアップが見つかりませんでした"
noBackupsFoundDescription: "自動で作成されたバックアップは見つかりませんでしたが、バックアップファイルを手動で保存している場合、それをインポートして復元することはできます。"
selectBackupToRestore: "復元するバックアップを選択してください"
youNeedToNameYourProfileToEnableAutoBackup: "自動バックアップを有効にするにはプロファイル名の設定が必要です。"
autoPreferencesBackupIsNotEnabledForThisDevice: "このデバイスで設定の自動バックアップは有効になっていません。"
backupFound: "設定のバックアップが見つかりました"

_accountSettings:
requireSigninToViewContents: "コンテンツの表示にログインを必須にする"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "misskey",
"version": "2025.3.1",
"version": "2025.3.2-alpha.4",
"codename": "nasubi",
"repository": {
"type": "git",
Expand Down
19 changes: 18 additions & 1 deletion packages/backend/src/core/activitypub/ApRendererService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -499,11 +499,28 @@ export class ApRendererService {
this.userProfilesRepository.findOneByOrFail({ userId: user.id }),
]);

const tryRewriteUrl = (maybeUrl: string) => {
const urlSafeRegex = /^(?:http[s]?:\/\/.)?(?:www\.)?[-a-zA-Z0-9@%._\+~#=]{2,256}\.[a-z]{2,6}\b(?:[-a-zA-Z0-9@:%_\+.~#?&\/\/=]*)/;
try {
const match = maybeUrl.match(urlSafeRegex);
if (!match) {
return maybeUrl;
}
const urlPart = match[0];
const urlPartParsed = new URL(urlPart);
const restPart = maybeUrl.slice(match[0].length);

return `<a href="${urlPartParsed.href}" rel="me nofollow noopener" target="_blank">${urlPart}</a>${restPart}`;
} catch (e) {
return maybeUrl;
}
};

const attachment = profile.fields.map(field => ({
type: 'PropertyValue',
name: field.name,
value: (field.value.startsWith('http://') || field.value.startsWith('https://'))
? `<a href="${new URL(field.value).href}" rel="me nofollow noopener" target="_blank">${new URL(field.value).href}</a>`
? tryRewriteUrl(field.value)
: field.value,
}));

Expand Down
14 changes: 7 additions & 7 deletions packages/frontend/.storybook/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ let moduleInitialized = false;
let unobserve = () => {};
let misskeyOS = null;

function loadTheme(applyTheme: typeof import('../src/scripts/theme')['applyTheme']) {
function loadTheme(applyTheme: typeof import('../src/theme')['applyTheme']) {
unobserve();
const theme = themes[document.documentElement.dataset.misskeyTheme];
if (theme) {
Expand Down Expand Up @@ -67,10 +67,10 @@ queueMicrotask(() => {
import('../src/components'),
import('../src/directives'),
import('../src/widgets'),
import('../src/scripts/theme'),
import('../src/store'),
import('../src/theme'),
import('../src/preferences'),
import('../src/os'),
]).then(([{ default: components }, { default: directives }, { default: widgets }, { applyTheme }, { defaultStore }, os]) => {
]).then(([{ default: components }, { default: directives }, { default: widgets }, { applyTheme }, { prefer }, os]) => {
setup((app) => {
moduleInitialized = true;
if (app[appInitialized]) {
Expand All @@ -83,7 +83,7 @@ queueMicrotask(() => {
widgets(app);
misskeyOS = os;
if (isChromatic()) {
defaultStore.set('animation', false);
prefer.set('animation', false);
}
});
});
Expand All @@ -104,9 +104,9 @@ const preview = {
}
}).catch(() => {})
: Promise.resolve();
const resetDefaultStorePromise = import('../src/store').then(({ defaultStore }) => {
const resetDefaultStorePromise = import('../src/store').then(({ store }) => {
// @ts-expect-error
defaultStore.init();
store.init();
}).catch(() => {});
Promise.all([resetIndexedDBPromise, resetDefaultStorePromise]).then(() => {
initLocalStorage();
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/@types/theme.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

declare module '@@/themes/*.json5' {
import { Theme } from '@/scripts/theme.js';
import { Theme } from '@/theme.js';

const theme: Theme;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ describe(normalizeClass.name, () => {

it('Composition API (standard)', () => {
const ast = parse(`
import { c as api, d as defaultStore, i as i18n, aD as notePage, bN as ImgWithBlurhash, bY as getStaticImageUrl, _ as _export_sfc } from './app-!~{001}~.js';
import { c as api, d as store, i as i18n, aD as notePage, bN as ImgWithBlurhash, bY as getStaticImageUrl, _ as _export_sfc } from './app-!~{001}~.js';
import { M as MkContainer } from './MkContainer-!~{03M}~.js';
import { b as defineComponent, a as ref, e as onMounted, z as resolveComponent, g as openBlock, h as createBlock, i as withCtx, K as createTextVNode, E as toDisplayString, u as unref, l as createBaseVNode, q as normalizeClass, B as createCommentVNode, k as createElementBlock, F as Fragment, C as renderList, A as createVNode } from './vue-!~{002}~.js';
import './photoswipe-!~{003}~.js';
Expand All @@ -74,7 +74,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
let fetching = ref(true);
let images = ref([]);
function thumbnail(image) {
return defaultStore.state.disableShowingAnimatedImages ? getStaticImageUrl(image.url) : image.thumbnailUrl;
return store.state.disableShowingAnimatedImages ? getStaticImageUrl(image.url) : image.thumbnailUrl;
}
onMounted(() => {
const image = [
Expand Down Expand Up @@ -173,7 +173,7 @@ export { index_photos as default };
`.slice(1), { ecmaVersion: 'latest', sourceType: 'module' });
unwindCssModuleClassName(ast);
expect(generate(ast)).toBe(`
import {c as api, d as defaultStore, i as i18n, aD as notePage, bN as ImgWithBlurhash, bY as getStaticImageUrl, _ as _export_sfc} from './app-!~{001}~.js';
import {c as api, d as store, i as i18n, aD as notePage, bN as ImgWithBlurhash, bY as getStaticImageUrl, _ as _export_sfc} from './app-!~{001}~.js';
import {M as MkContainer} from './MkContainer-!~{03M}~.js';
import {b as defineComponent, a as ref, e as onMounted, z as resolveComponent, g as openBlock, h as createBlock, i as withCtx, K as createTextVNode, E as toDisplayString, u as unref, l as createBaseVNode, q as normalizeClass, B as createCommentVNode, k as createElementBlock, F as Fragment, C as renderList, A as createVNode} from './vue-!~{002}~.js';
import './photoswipe-!~{003}~.js';
Expand All @@ -190,7 +190,7 @@ const index_photos = defineComponent({
let fetching = ref(true);
let images = ref([]);
function thumbnail(image) {
return defaultStore.state.disableShowingAnimatedImages ? getStaticImageUrl(image.url) : image.thumbnailUrl;
return store.state.disableShowingAnimatedImages ? getStaticImageUrl(image.url) : image.thumbnailUrl;
}
onMounted(() => {
const image = ["image/jpeg", "image/webp", "image/avif", "image/png", "image/gif", "image/apng", "image/vnd.mozilla.apng"];
Expand Down Expand Up @@ -268,7 +268,7 @@ export {index_photos as default};
it('Composition API (with `useCssModule()`)', () => {
const ast = parse(`
import { a7 as getCurrentInstance, b as defineComponent, G as useCssModule, a1 as h, H as TransitionGroup } from './!~{002}~.js';
import { d as defaultStore, aK as toast, b5 as MkAd, i as i18n, _ as _export_sfc } from './app-!~{001}~.js';
import { d as store, aK as toast, b5 as MkAd, i as i18n, _ as _export_sfc } from './app-!~{001}~.js';

function isDebuggerEnabled(id) {
try {
Expand Down Expand Up @@ -393,7 +393,7 @@ const _sfc_main = defineComponent({
el.style.left = "";
}
return () => h(
defaultStore.state.animation ? TransitionGroup : "div",
prefer.s.animation ? TransitionGroup : "div",
{
class: {
[$style["date-separated-list"]]: true,
Expand All @@ -402,7 +402,7 @@ const _sfc_main = defineComponent({
[$style["direction-down"]]: props.direction === "down",
[$style["direction-up"]]: props.direction === "up"
},
...defaultStore.state.animation ? {
...prefer.s.animation ? {
name: "list",
tag: "div",
onBeforeLeave,
Expand Down Expand Up @@ -441,7 +441,7 @@ export { MkDateSeparatedList as M };
unwindCssModuleClassName(ast);
expect(generate(ast)).toBe(`
import {a7 as getCurrentInstance, b as defineComponent, G as useCssModule, a1 as h, H as TransitionGroup} from './!~{002}~.js';
import {d as defaultStore, aK as toast, b5 as MkAd, i as i18n, _ as _export_sfc} from './app-!~{001}~.js';
import {d as store, aK as toast, b5 as MkAd, i as i18n, _ as _export_sfc} from './app-!~{001}~.js';
function isDebuggerEnabled(id) {
try {
return localStorage.getItem(\`DEBUG_\${id}\`) !== null;
Expand Down Expand Up @@ -555,15 +555,15 @@ const _sfc_main = defineComponent({
el.style.top = "";
el.style.left = "";
}
return () => h(defaultStore.state.animation ? TransitionGroup : "div", {
return () => h(prefer.s.animation ? TransitionGroup : "div", {
class: {
[$style["date-separated-list"]]: true,
[$style["date-separated-list-nogap"]]: props.noGap,
[$style["reversed"]]: props.reversed,
[$style["direction-down"]]: props.direction === "down",
[$style["direction-up"]]: props.direction === "up"
},
...defaultStore.state.animation ? {
...prefer.s.animation ? {
name: "list",
tag: "div",
onBeforeLeave,
Expand Down
36 changes: 28 additions & 8 deletions packages/frontend/lib/vite-plugin-create-search-index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1213,22 +1213,37 @@ async function processVueFile(
transformedCodeCache: Record<string, string>
}> {
const normalizedId = id.replace(/\\/g, '/'); // ファイルパスを正規化
// すでにキャッシュに存在する場合は、そのまま返す
if (transformedCodeCache[normalizedId] && transformedCodeCache[normalizedId].includes('markerId=')) {

// 開発モード時はコード内容に変更があれば常に再処理する
// コード内容が同じ場合のみキャッシュを使用
const isDevMode = process.env.NODE_ENV === 'development';

const s = new MagicString(code); // magic-string のインスタンスを作成

if (!isDevMode && transformedCodeCache[normalizedId] && transformedCodeCache[normalizedId].includes('markerId=')) {
logger.info(`Using cached version for ${id}`);
return {
code: transformedCodeCache[normalizedId],
map: null,
map: s.generateMap({ source: id, includeContent: true }),
transformedCodeCache
};
}

// すでに処理済みのファイルでコードに変更がない場合はキャッシュを返す
if (transformedCodeCache[normalizedId] === code) {
logger.info(`Code unchanged for ${id}, using cached version`);
return {
code: transformedCodeCache[normalizedId],
map: s.generateMap({ source: id, includeContent: true }),
transformedCodeCache
};
}

const s = new MagicString(code); // magic-string のインスタンスを作成
const parsed = vueSfcParse(code, { filename: id });
if (!parsed.descriptor.template) {
return {
code,
map: null,
map: s.generateMap({ source: id, includeContent: true }),
transformedCodeCache
};
}
Expand Down Expand Up @@ -1466,16 +1481,21 @@ export default function pluginCreateSearchIndex(options: Options): Plugin {
if (isMatch) break; // いずれかのパターンでマッチしたら、outer loop も抜ける
}


if (!isMatch) {
return;
}

// ファイルの内容が変更された場合は再処理を行う
const normalizedId = id.replace(/\\/g, '/');
const hasContentChanged = !transformedCodeCache[normalizedId] || transformedCodeCache[normalizedId] !== code;

const transformed = await processVueFile(code, id, options, transformedCodeCache);
transformedCodeCache = transformed.transformedCodeCache; // キャッシュを更新
if (isDevServer) {
await analyzeVueProps({ ...options, transformedCodeCache }); // analyzeVueProps を呼び出す

if (isDevServer && hasContentChanged) {
await analyzeVueProps({ ...options, transformedCodeCache }); // ファイルが変更されたときのみ分析を実行
}

return transformed;
},

Expand Down
3 changes: 2 additions & 1 deletion packages/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@
"v-code-diff": "1.13.1",
"vite": "6.2.1",
"vue": "3.5.13",
"vuedraggable": "next"
"vuedraggable": "next",
"wanakana": "5.3.1"
},
"devDependencies": {
"@misskey-dev/summaly": "5.2.0",
Expand Down
Loading