Skip to content

Commit

Permalink
Merge pull request #521 from merge-upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
u1-liquid authored Mar 15, 2024
2 parents 13ae8e1 + acab2bf commit 9d1cdad
Show file tree
Hide file tree
Showing 83 changed files with 1,149 additions and 173 deletions.
1 change: 0 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"editorconfig.editorconfig",
"dbaeumer.vscode-eslint",
"Vue.volar",
"Vue.vscode-typescript-vue-plugin",
"Orta.vscode-jest",
"dbaeumer.vscode-eslint",
"mrmlnc.vscode-json5"
Expand Down
2 changes: 0 additions & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
"editorconfig.editorconfig",
"dbaeumer.vscode-eslint",
"Vue.volar",
"Vue.vscode-typescript-vue-plugin",
"Orta.vscode-jest",
"dbaeumer.vscode-eslint",
"mrmlnc.vscode-json5"
]
}
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"*.test.ts": "typescript"
},
"jest.jestCommandLine": "pnpm run jest",
"jest.autoRun": "off",
"jest.runMode": "on-demand",
"editor.codeActionsOnSave": {
"source.fixAll": "explicit"
},
Expand Down
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,17 @@

### Client
- Enhance: 自分のノートの添付ファイルから直接ファイルの詳細ページに飛べるように
- Enhance: 広告がMisskeyと同一ドメインの場合はRouterで遷移するように
- Enhance: リアクション・いいねの総数を表示するように
- Enhance: リアクション受け入れが「いいねのみ」の場合はリアクション絵文字一覧を表示しないように
- Enhance: 設定>プラグインのページからプラグインの簡易的なログやエラーを見られるように
- 実装の都合により、プラグインは1つエラーを起こした時に即時停止するようになりました
- Fix: 一部のページ内リンクが正しく動作しない問題を修正
- Fix: 周年の実績が閏年を考慮しない問題を修正
- Fix: ローカルURLのプレビューポップアップが左上に表示される

### Server
-
- Enhance: エンドポイント`antennas/update`の必須項目を`antennaId`のみに

## 2024.3.1

Expand Down
5 changes: 5 additions & 0 deletions cypress/e2e/basic.cy.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/

describe('Before setup instance', () => {
beforeEach(() => {
cy.resetState();
Expand Down
5 changes: 5 additions & 0 deletions cypress/e2e/router.cy.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/

describe('Router transition', () => {
describe('Redirect', () => {
// サーバの初期化。ルートのテストに関しては各describeごとに1度だけ実行で十分だと思う(使いまわした方が早い)
Expand Down
5 changes: 5 additions & 0 deletions cypress/e2e/widgets.cy.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/

/* flaky
describe('After user signed in', () => {
beforeEach(() => {
Expand Down
4 changes: 4 additions & 0 deletions locales/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6973,6 +6973,10 @@ export interface Locale extends ILocale {
* ソースを表示
*/
"viewSource": string;
/**
* ログを表示
*/
"viewLog": string;
};
"_preferencesBackups": {
/**
Expand Down
1 change: 1 addition & 0 deletions locales/ja-JP.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1817,6 +1817,7 @@ _plugin:
installWarn: "信頼できないプラグインはインストールしないでください。"
manage: "プラグインの管理"
viewSource: "ソースを表示"
viewLog: "ログを表示"

_preferencesBackups:
list: "作成したバックアップ"
Expand Down
7 changes: 6 additions & 1 deletion packages/backend/generate_api_json.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/

import { loadConfig } from './built/config.js'
import { genOpenapiSpec } from './built/server/api/openapi/gen-spec.js'
import { writeFileSync } from "node:fs";

const config = loadConfig();
const spec = genOpenapiSpec(config, true);

writeFileSync('./built/api.json', JSON.stringify(spec), 'utf-8');
writeFileSync('./built/api.json', JSON.stringify(spec), 'utf-8');
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/

export class UserBlacklistAnntena1689325027964 {
name = 'UserBlacklistAnntena1689325027964'

Expand Down
5 changes: 5 additions & 0 deletions packages/backend/migration/1690417561185-fix-renote-muting.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/

export class FixRenoteMuting1690417561185 {
name = 'FixRenoteMuting1690417561185'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/

export class ChangeCacheRemoteFilesDefault1690417561186 {
name = 'ChangeCacheRemoteFilesDefault1690417561186'

Expand Down
5 changes: 5 additions & 0 deletions packages/backend/migration/1690417561187-Fix.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/

export class RefineAnnouncement1691649257651 {
name = 'RefineAnnouncement1691649257651'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/

export class RefineAnnouncement21691657412740 {
name = 'RefineAnnouncement21691657412740'

Expand Down
5 changes: 5 additions & 0 deletions packages/backend/migration/1695260774117-verified-links.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/

export class VerifiedLinks1695260774117 {
name = 'VerifiedLinks1695260774117'

Expand Down
5 changes: 5 additions & 0 deletions packages/backend/migration/1695288787870-following-notify.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/

export class FollowingNotify1695288787870 {
name = 'FollowingNotify1695288787870'

Expand Down
5 changes: 5 additions & 0 deletions packages/backend/migration/1695440131671-short-name.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/

export class ShortName1695440131671 {
name = 'ShortName1695440131671'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/

export class MutingNotificationTypes1695605508898 {
name = 'MutingNotificationTypes1695605508898'

Expand Down
5 changes: 5 additions & 0 deletions packages/backend/migration/1695901659683-note-updated-at.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/

export class NoteUpdatedAt1695901659683 {
name = 'NoteUpdatedAt1695901659683'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/

export class UserListMembership1696323464251 {
name = 'UserListMembership1696323464251'

Expand Down
5 changes: 5 additions & 0 deletions packages/backend/migration/1696331570827-hibernation.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/

export class Hibernation1696331570827 {
name = 'Hibernation1696331570827'

Expand Down
5 changes: 5 additions & 0 deletions packages/backend/migration/1696332072038-clean.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/

export class Clean1696332072038 {
name = 'Clean1696332072038'

Expand Down
5 changes: 5 additions & 0 deletions packages/backend/migration/1700383825690-hard-mute.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/

export class HardMute1700383825690 {
name = 'HardMute1700383825690'

Expand Down
2 changes: 1 addition & 1 deletion packages/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"watch": "node watch.mjs",
"restart": "pnpm build && pnpm start",
"dev": "nodemon -w src -e ts,js,mjs,cjs,json --exec \"cross-env NODE_ENV=development pnpm run restart\"",
"typecheck": "tsc --noEmit",
"typecheck": "tsc --noEmit && tsc -p test --noEmit",
"eslint": "eslint --quiet \"src/**/*.ts\"",
"lint": "pnpm typecheck && pnpm eslint",
"jest": "cross-env NODE_ENV=test node --experimental-vm-modules --experimental-import-meta-resolve node_modules/jest/bin/jest.js --forceExit --config jest.config.unit.cjs",
Expand Down
5 changes: 5 additions & 0 deletions packages/backend/src/core/ChannelFollowingService.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/

import { Inject, Injectable, OnModuleInit } from '@nestjs/common';
import Redis from 'ioredis';
import { DI } from '@/di-symbols.js';
Expand Down
3 changes: 1 addition & 2 deletions packages/backend/src/core/WebAuthnService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
verifyRegistrationResponse,
} from '@simplewebauthn/server';
import { AttestationFormat, isoCBOR } from '@simplewebauthn/server/helpers';
import { tinyCbor } from '@simplewebauthn/server/esm/deps.js';
import { DI } from '@/di-symbols.js';
import type { UserSecurityKeysRepository } from '@/models/_.js';
import type { Config } from '@/config.js';
Expand Down Expand Up @@ -199,7 +198,7 @@ export class WebAuthnService {
if (cert[0] === 0x04) { // 前の実装ではいつも 0x04 で始まっていた
const halfLength = (cert.length - 1) / 2;

const cborMap = new Map<number, tinyCbor.CBORType>();
const cborMap = new Map<number, number | Uint8Array>();
cborMap.set(1, 2); // kty, EC2
cborMap.set(3, -7); // alg, ES256
cborMap.set(-1, 1); // crv, P256
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export class ApNoteService {
object,
error: err
});
throw new Error('invalid note');
throw err;
}

const note = object as IPost;
Expand Down
Loading

0 comments on commit 9d1cdad

Please sign in to comment.