Skip to content

Commit 22a0dbe

Browse files
committed
Merge tag '2024.5.0-io.8' into bun
2 parents f57db9b + a55ee2c commit 22a0dbe

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+2270
-2151
lines changed

.github/workflows/api-misskey-js.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
run_install: false
2727

2828
- name: Setup Node.js
29-
uses: actions/setup-node@v4.1.0
29+
uses: actions/setup-node@v4.2.0
3030
with:
3131
node-version-file: '.node-version'
3232
cache: 'pnpm'

.github/workflows/lint.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- uses: pnpm/action-setup@v4
3333
with:
3434
run_install: false
35-
- uses: actions/setup-node@v4.1.0
35+
- uses: actions/setup-node@v4.2.0
3636
with:
3737
node-version-file: '.node-version'
3838
cache: 'pnpm'
@@ -57,7 +57,7 @@ jobs:
5757
- uses: pnpm/action-setup@v4
5858
with:
5959
run_install: false
60-
- uses: actions/setup-node@v4.1.0
60+
- uses: actions/setup-node@v4.2.0
6161
with:
6262
node-version-file: '.node-version'
6363
cache: 'pnpm'
@@ -81,7 +81,7 @@ jobs:
8181
- uses: pnpm/action-setup@v4
8282
with:
8383
run_install: false
84-
- uses: actions/setup-node@v4.1.0
84+
- uses: actions/setup-node@v4.2.0
8585
with:
8686
node-version-file: '.node-version'
8787
cache: 'pnpm'

.github/workflows/test-backend.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
- name: Install FFmpeg
6262
uses: FedericoCarboni/setup-ffmpeg@v3
6363
- name: Use Node.js ${{ matrix.node-version }}
64-
uses: actions/setup-node@v4.1.0
64+
uses: actions/setup-node@v4.2.0
6565
with:
6666
node-version: ${{ matrix.node-version }}
6767
cache: 'pnpm'
@@ -125,7 +125,7 @@ jobs:
125125
with:
126126
run_install: false
127127
- name: Use Node.js ${{ matrix.node-version }}
128-
uses: actions/setup-node@v4.1.0
128+
uses: actions/setup-node@v4.2.0
129129
with:
130130
node-version: ${{ matrix.node-version }}
131131
cache: 'pnpm'

.github/workflows/test-frontend.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
with:
4141
run_install: false
4242
- name: Use Node.js ${{ matrix.node-version }}
43-
uses: actions/setup-node@v4.1.0
43+
uses: actions/setup-node@v4.2.0
4444
with:
4545
node-version: ${{ matrix.node-version }}
4646
cache: 'pnpm'

.github/workflows/test-misskey-js.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
run_install: false
4040

4141
- name: Setup Node.js ${{ matrix.node-version }}
42-
uses: actions/setup-node@v4.1.0
42+
uses: actions/setup-node@v4.2.0
4343
with:
4444
node-version: ${{ matrix.node-version }}
4545
cache: 'pnpm'

.github/workflows/test-production.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
with:
3131
run_install: false
3232
- name: Use Node.js ${{ matrix.node-version }}
33-
uses: actions/setup-node@v4.1.0
33+
uses: actions/setup-node@v4.2.0
3434
with:
3535
node-version: ${{ matrix.node-version }}
3636
cache: 'pnpm'

.github/workflows/validate-api-json.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
with:
3333
run_install: false
3434
- name: Use Node.js ${{ matrix.node-version }}
35-
uses: actions/setup-node@v4.1.0
35+
uses: actions/setup-node@v4.2.0
3636
with:
3737
node-version: ${{ matrix.node-version }}
3838
cache: 'pnpm'

CONTRIBUTING.md

+2-17
Original file line numberDiff line numberDiff line change
@@ -115,25 +115,10 @@ pnpm dev
115115
command.
116116

117117
- Server-side source files and automatically builds them if they are modified. Automatically start the server process(es).
118-
- Vite HMR (just the `vite` command) is available. The behavior may be different from production.
119118
- Service Worker is watched by esbuild.
120-
- The front end can be viewed by accessing `http://localhost:5173`.
121-
- The backend listens on the port configured with `port` in .config/default.yml.
122-
If you have not changed it from the default, it will be "http://localhost:3000".
123-
If "port" in .config/default.yml is set to something other than 3000, you need to change the proxy settings in packages/frontend/vite.config.local-dev.ts.
124-
125-
### `MK_DEV_PREFER=backend pnpm dev`
126-
pnpm dev has another mode with `MK_DEV_PREFER=backend`.
127-
128-
```
129-
MK_DEV_PREFER=backend pnpm dev
130-
```
131-
132-
- This mode is closer to the production environment than the default mode.
133-
- Vite runs behind the backend (the backend will proxy Vite at /vite).
119+
- Vite HMR (just the `vite` command) is available. The behavior may be different from production.
120+
- Vite runs behind the backend (the backend will proxy Vite at /vite except for websocket used for HMR).
134121
- You can see Misskey by accessing `http://localhost:3000` (Replace `3000` with the port configured with `port` in .config/default.yml).
135-
- To change the port of Vite, specify with `VITE_PORT` environment variable.
136-
- HMR may not work in some environments such as Windows.
137122

138123
### Dev Container
139124
Instead of running `pnpm` locally, you can use Dev Container to set up your development environment.

locales/en-US.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -1498,7 +1498,9 @@ _accountMigration:
14981498
migrationConfirm: "Really migrate this account to {account}? Once started, this process cannot be stopped or taken back, and you will not be able to use this account in its original state anymore."
14991499
movedAndCannotBeUndone: "\nThis account has been migrated.\nMigration cannot be reversed."
15001500
postMigrationNote: "This account will unfollow all accounts it is currently following 24 hours after migration finishes.\nBoth the number of follows and followers will then become zero. To avoid your followers from being unable to see followers only posts of this account, they will however continue following this account."
1501-
movedTo: "New account:"
1501+
movedTo: "Migrated account:"
1502+
movedToServer: "Migrated server"
1503+
movedFromServer: "Original server"
15021504
_achievements:
15031505
earnedAt: "Unlocked at"
15041506
_types:

locales/index.d.ts

+8
Original file line numberDiff line numberDiff line change
@@ -6004,6 +6004,14 @@ export interface Locale extends ILocale {
60046004
* 移行先のアカウント:
60056005
*/
60066006
"movedTo": string;
6007+
/**
6008+
* 移行先のサーバー
6009+
*/
6010+
"movedToServer": string;
6011+
/**
6012+
* 移行元のサーバー
6013+
*/
6014+
"movedFromServer": string;
60076015
};
60086016
"_achievements": {
60096017
/**

locales/ja-JP.yml

+2
Original file line numberDiff line numberDiff line change
@@ -1511,6 +1511,8 @@ _accountMigration:
15111511
movedAndCannotBeUndone: "\nアカウントは移行されています。\n移行を取り消すことはできません。"
15121512
postMigrationNote: "このアカウントからのフォロー解除は移行操作から24時間後に実行されます。\nこのアカウントのフォロー・フォロワー数は0になっています。フォロワーの解除はされないため、あなたのフォロワーはこのアカウントのフォロワー向け投稿を引き続き閲覧できます。"
15131513
movedTo: "移行先のアカウント:"
1514+
movedToServer: "移行先のサーバー"
1515+
movedFromServer: "移行元のサーバー"
15141516

15151517
_achievements:
15161518
earnedAt: "獲得日時"

locales/ko-KR.yml

+2
Original file line numberDiff line numberDiff line change
@@ -1496,6 +1496,8 @@ _accountMigration:
14961496
movedAndCannotBeUndone: "\n이사한 계정입니다.\n이사는 취소할 수 없습니다."
14971497
postMigrationNote: "이 계정의 팔로잉 해제는 이사 후 24시간 뒤에 실행됩니다.\n이 계정의 팔로우 및 팔로워 수는 0으로 표시됩니다. 팔로워 해제는 이루어지지 않으므로, 당신의 팔로워는 이 계정의 팔로워 한정 게시물을 계속해서 열람할 수 있습니다."
14981498
movedTo: "이사할 계정:"
1499+
movedToServer: "이사한 서버"
1500+
movedFromServer: "기존 서버"
14991501
_achievements:
15001502
earnedAt: "달성 일시"
15011503
_types:

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "misskey",
3-
"version": "2024.5.0-io.7c",
3+
"version": "2024.5.0-io.8",
44
"codename": "nasubi",
55
"repository": {
66
"type": "git",
@@ -69,11 +69,11 @@
6969
"typescript": "5.7.3"
7070
},
7171
"devDependencies": {
72-
"@types/node": "22.10.7",
72+
"@types/node": "22.13.0",
7373
"@typescript-eslint/eslint-plugin": "7.10.0",
7474
"@typescript-eslint/parser": "7.10.0",
7575
"cross-env": "7.0.3",
76-
"cypress": "13.17.0",
76+
"cypress": "14.0.1",
7777
"eslint": "8.57.1",
7878
"ncp": "2.0.0",
7979
"start-server-and-test": "2.0.10"

packages/backend/package.json

+31-31
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,16 @@
3333
"generate-api-json": "pnpm build && bun run ./scripts/generate_api_json.js"
3434
},
3535
"optionalDependencies": {
36-
"@swc/core-darwin-arm64": "1.10.7",
37-
"@swc/core-darwin-x64": "1.10.7",
38-
"@swc/core-linux-arm-gnueabihf": "1.10.7",
39-
"@swc/core-linux-arm64-gnu": "1.10.7",
40-
"@swc/core-linux-arm64-musl": "1.10.7",
41-
"@swc/core-linux-x64-gnu": "1.10.7",
42-
"@swc/core-linux-x64-musl": "1.10.7",
43-
"@swc/core-win32-arm64-msvc": "1.10.7",
44-
"@swc/core-win32-ia32-msvc": "1.10.7",
45-
"@swc/core-win32-x64-msvc": "1.10.7",
36+
"@swc/core-darwin-arm64": "1.10.12",
37+
"@swc/core-darwin-x64": "1.10.12",
38+
"@swc/core-linux-arm-gnueabihf": "1.10.12",
39+
"@swc/core-linux-arm64-gnu": "1.10.12",
40+
"@swc/core-linux-arm64-musl": "1.10.12",
41+
"@swc/core-linux-x64-gnu": "1.10.12",
42+
"@swc/core-linux-x64-musl": "1.10.12",
43+
"@swc/core-win32-arm64-msvc": "1.10.12",
44+
"@swc/core-win32-ia32-msvc": "1.10.12",
45+
"@swc/core-win32-x64-msvc": "1.10.12",
4646
"@tensorflow/tfjs": "4.22.0",
4747
"@tensorflow/tfjs-node": "4.22.0",
4848
"bufferutil": "4.0.9",
@@ -63,11 +63,11 @@
6363
},
6464
"dependencies": {
6565
"@authenio/samlify-node-xmllint": "2.0.0",
66-
"@aws-sdk/client-s3": "3.729.0",
67-
"@aws-sdk/lib-storage": "3.729.0",
68-
"@bull-board/api": "6.6.2",
69-
"@bull-board/fastify": "6.6.2",
70-
"@bull-board/ui": "6.6.2",
66+
"@aws-sdk/client-s3": "3.740.0",
67+
"@aws-sdk/lib-storage": "3.740.0",
68+
"@bull-board/api": "6.7.4",
69+
"@bull-board/fastify": "6.7.4",
70+
"@bull-board/ui": "6.7.4",
7171
"@discordapp/twemoji": "15.1.0",
7272
"@elastic/elasticsearch": "8.17.0",
7373
"@fastify/accepts": "5.0.2",
@@ -76,21 +76,21 @@
7676
"@fastify/express": "4.0.2",
7777
"@fastify/formbody": "8.0.2",
7878
"@fastify/http-proxy": "11.0.1",
79-
"@fastify/multipart": "9.0.2",
79+
"@fastify/multipart": "9.0.3",
8080
"@fastify/static": "8.0.4",
8181
"@fastify/view": "10.0.2",
8282
"@misskey-dev/sharp-read-bmp": "1.2.0",
8383
"@misskey-dev/summaly": "github:MisskeyIO/summaly#5.1.3",
8484
"@napi-rs/canvas": "0.1.65",
85-
"@nestjs/common": "10.4.15",
86-
"@nestjs/core": "10.4.15",
87-
"@nestjs/testing": "10.4.15",
85+
"@nestjs/common": "11.0.7",
86+
"@nestjs/core": "11.0.7",
87+
"@nestjs/testing": "11.0.7",
8888
"@peertube/http-signature": "1.7.0",
89-
"@simplewebauthn/server": "13.1.0",
89+
"@simplewebauthn/server": "13.1.1",
9090
"@sinonjs/fake-timers": "11.3.1",
9191
"@smithy/node-http-handler": "4.0.2",
9292
"@swc/cli": "0.6.0",
93-
"@swc/core": "1.10.7",
93+
"@swc/core": "1.10.12",
9494
"@twemoji/parser": "15.1.1",
9595
"accepts": "1.3.8",
9696
"ajv": "8.17.1",
@@ -99,7 +99,7 @@
9999
"bcryptjs": "2.4.3",
100100
"blurhash": "2.0.5",
101101
"body-parser": "1.20.3",
102-
"bullmq": "5.34.10",
102+
"bullmq": "5.39.1",
103103
"cacheable-lookup": "7.0.0",
104104
"cbor": "10.0.3",
105105
"chalk": "5.4.1",
@@ -114,7 +114,7 @@
114114
"fastify-http-errors-enhanced": "6.0.1",
115115
"fastify-raw-body": "5.0.0",
116116
"feed": "4.2.2",
117-
"file-type": "20.0.0",
117+
"file-type": "20.0.1",
118118
"fluent-ffmpeg": "2.1.3",
119119
"form-data": "4.0.1",
120120
"got": "14.4.5",
@@ -131,7 +131,7 @@
131131
"json5": "2.2.3",
132132
"jsonld": "8.3.3",
133133
"jsrsasign": "11.1.0",
134-
"meilisearch": "0.48.0",
134+
"meilisearch": "0.48.2",
135135
"mfm-js": "0.24.0",
136136
"microformats-parser": "2.0.2",
137137
"mime-types": "2.1.35",
@@ -142,7 +142,7 @@
142142
"nested-property": "4.0.0",
143143
"node-fetch": "3.3.2",
144144
"node-forge": "1.3.1",
145-
"nodemailer": "6.9.16",
145+
"nodemailer": "6.10.0",
146146
"nsfwjs": "4.2.0",
147147
"oauth": "0.10.0",
148148
"oauth2orize": "1.12.0",
@@ -191,7 +191,7 @@
191191
"devDependencies": {
192192
"@jest/globals": "29.7.0",
193193
"@misskey-dev/eslint-plugin": "1.0.0",
194-
"@nestjs/platform-express": "10.4.15",
194+
"@nestjs/platform-express": "11.0.7",
195195
"@swc/jest": "0.2.37",
196196
"@types/accepts": "1.3.7",
197197
"@types/archiver": "6.0.3",
@@ -208,14 +208,14 @@
208208
"@types/jsonld": "1.5.15",
209209
"@types/jsrsasign": "10.5.15",
210210
"@types/mime-types": "2.1.4",
211-
"@types/ms": "0.7.34",
212-
"@types/node": "22.10.7",
211+
"@types/ms": "2.1.0",
212+
"@types/node": "22.13.0",
213213
"@types/node-forge": "1.3.11",
214214
"@types/nodemailer": "6.4.17",
215215
"@types/oauth": "0.9.6",
216216
"@types/oauth2orize": "1.11.5",
217217
"@types/oauth2orize-pkce": "0.1.2",
218-
"@types/pg": "8.11.10",
218+
"@types/pg": "8.11.11",
219219
"@types/psl": "1.1.3",
220220
"@types/pug": "2.0.10",
221221
"@types/punycode.js": "npm:@types/punycode@2.1.4",
@@ -231,7 +231,7 @@
231231
"@types/tmp": "0.2.6",
232232
"@types/vary": "1.1.3",
233233
"@types/web-push": "3.6.4",
234-
"@types/ws": "8.5.13",
234+
"@types/ws": "8.5.14",
235235
"@typescript-eslint/eslint-plugin": "7.10.0",
236236
"@typescript-eslint/parser": "7.10.0",
237237
"aws-sdk-client-mock": "4.1.0",
@@ -243,7 +243,7 @@
243243
"jest": "29.7.0",
244244
"jest-mock": "29.7.0",
245245
"nodemon": "3.1.9",
246-
"pid-port": "1.0.0",
246+
"pid-port": "1.0.2",
247247
"simple-oauth2": "5.1.0"
248248
}
249249
}

packages/backend/src/core/RoleService.ts

+16-3
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ export class RoleService implements OnApplicationShutdown, OnModuleInit {
350350
* 指定ユーザーのバッジロール一覧取得
351351
*/
352352
@bindThis
353-
public async getUserBadgeRoles(userId: MiUser['id']) {
353+
public async getUserBadgeRoles(userId: MiUser['id'], publicOnly: boolean) {
354354
const now = Date.now();
355355
let assigns = await this.roleAssignmentByUserIdCache.fetch(userId, () => this.roleAssignmentsRepository.findBy({ userId }));
356356
// 期限切れのロールを除外
@@ -362,12 +362,25 @@ export class RoleService implements OnApplicationShutdown, OnModuleInit {
362362
if (badgeCondRoles.length > 0) {
363363
const user = roles.some(r => r.target === 'conditional') ? await this.cacheService.findUserById(userId) : null;
364364
const matchedBadgeCondRoles = badgeCondRoles.filter(r => this.evalCond(user!, assignedRoles, r.condFormula));
365-
return [...assignedBadgeRoles, ...matchedBadgeCondRoles];
365+
return this.sortAndMapBadgeRoles([...assignedBadgeRoles, ...matchedBadgeCondRoles], publicOnly);
366366
} else {
367-
return assignedBadgeRoles;
367+
return this.sortAndMapBadgeRoles(assignedBadgeRoles, publicOnly);
368368
}
369369
}
370370

371+
@bindThis
372+
private sortAndMapBadgeRoles(roles: MiRole[], publicOnly: boolean) {
373+
return roles
374+
.filter((r) => r.isPublic || !publicOnly)
375+
.sort((a, b) => b.displayOrder - a.displayOrder)
376+
.map((r) => ({
377+
name: r.name,
378+
iconUrl: r.iconUrl,
379+
displayOrder: r.displayOrder,
380+
behavior: r.badgeBehavior ?? undefined,
381+
}));
382+
}
383+
371384
@bindThis
372385
public async getUserPolicies(userId: MiUser['id'] | null): Promise<RolePolicies> {
373386
const meta = await this.metaService.fetch();

packages/backend/src/core/entities/DriveFileEntityService.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,8 @@ export class DriveFileEntityService {
7777
@bindThis
7878
private getProxiedUrl(url: string, mode?: 'static' | 'avatar'): string {
7979
return appendQuery(
80-
`${this.config.mediaProxy}/${mode ?? 'image'}.webp`,
80+
`${this.config.mediaProxy}/${mode ?? 'image'}/${encodeURIComponent(url)}`,
8181
query({
82-
url,
8382
...(mode ? { [mode]: '1' } : {}),
8483
}),
8584
);

0 commit comments

Comments
 (0)