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

Merge upstream #174

Merged
merged 35 commits into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
e89d760
Enhance: 連合向けのノート配信を軽量化 (#13192)
mei23 Feb 7, 2024
56d7f58
Fix(frontend): MkCodeEditorで行がずれていくのを修正 (#13188)
1Step621 Feb 7, 2024
313ce82
正しい 2024.2.0-beta.10 改版手順? (#13173)
mei23 Feb 7, 2024
155896a
enhance(frontend/HorizontalSwipe): 操作性の改善 (#13038)
kakkokari-gtyih Feb 7, 2024
52bf808
typo
syuilo Feb 7, 2024
82c34f7
Fix: Summaly proxy利用時にプレイヤーが動作しないことがあるのを修正 (#13196)
mei23 Feb 8, 2024
5299d17
test(frontend): migrate MSW in Storybook to v2 (#13195)
zyoshoka Feb 8, 2024
90b633b
fix(frontend) misskey-js type (#13202)
kakkokari-gtyih Feb 8, 2024
0f7918c
refactor(backend): exist -> exists (#13203)
kakkokari-gtyih Feb 8, 2024
d40612a
fix(frontend): aiscriptのコードブロックでのハイライト指定を修正 (#13208)
kakkokari-gtyih Feb 8, 2024
c0cb76f
chore: use [email protected] / [email protected]
tamaina Feb 8, 2024
614c9a0
fix: 特定文字列を含むノートを投稿できないようにする管理画面用設定項目を追加 (#13210)
samunohito Feb 9, 2024
c23c97d
perf(frontend): splash screenのdomが消えない場合があるのを修正
syuilo Feb 9, 2024
37d83df
chore(deps): bump pnpm/action-setup from 2 to 3 (#13215)
dependabot[bot] Feb 9, 2024
b5b31bf
New Crowdin updates (#13179)
syuilo Feb 9, 2024
7fc1d77
update deps
syuilo Feb 9, 2024
639f14f
2024.2.0-beta.11
syuilo Feb 9, 2024
7a8cf27
fix misskey-js version
kakkokari-gtyih Feb 9, 2024
207e4f3
dev: Update misskey-tga deploy-test-environment.yml (#13221)
Srgr0 Feb 10, 2024
0736eea
fix: misskey-jsの型定義生成時にバックエンドの依存パッケージもビルドするように (#13249)
kakkokari-gtyih Feb 11, 2024
674fd0b
Update about-misskey.vue
syuilo Feb 11, 2024
25383de
New Crowdin updates (#13216)
syuilo Feb 11, 2024
4bdaf26
Merge branch 'develop' of https://github.com/misskey-dev/misskey into…
syuilo Feb 11, 2024
3dc095d
feat: provide tarball (#13260)
acid-chicken Feb 12, 2024
6afd2dc
New translations ja-jp.yml (Spanish) (#13261)
syuilo Feb 12, 2024
9b5aeb7
update SPDX-FileCopyrightText
syuilo Feb 12, 2024
a1e12c0
Merge branch 'develop' of https://github.com/misskey-dev/misskey into…
syuilo Feb 12, 2024
b95e250
refactor(msjs): avoid any (part 1) (#13247)
KisaragiEffective Feb 12, 2024
63c4396
ci(test-frontend): Cypressのテストの失敗時、永遠に止まらない問題を回避 (MisskeyIO#434) (#13…
u1-liquid Feb 12, 2024
4f80b6f
chore: 以前の開発環境(backendにアクセスする方式)を立ち上げられるように (#13220)
tamaina Feb 12, 2024
e12369a
fix: downgrade vue to 3.4.15
tamaina Feb 12, 2024
32c5c43
enhance: 禁止ワードはリモートノートも対象に (#13280)
tamaina Feb 12, 2024
50817df
Update CHANGELOG.md (#13282)
KisaragiEffective Feb 12, 2024
309a943
perf: omit search for immutable static requests (#13265)
acid-chicken Feb 13, 2024
140a44f
Merge remote-tracking branch 'upstream/develop' into merge-upstream
taiyme Feb 13, 2024
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
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/check-misskey-js-autogen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
ref: ${{ github.event.pull_request.head.sha }}

- name: setup pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v3
with:
version: 8

Expand Down
59 changes: 51 additions & 8 deletions .github/workflows/deploy-test-environment.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,66 @@
name: deploy-test-environment

on:
#push:
issue_comment:
types: [created]
workflow_dispatch:
inputs:
repository:
description: 'Repository to deploy (optional)'
type: string
description: 'Repository to deploy (optional, use the repository where this workflow is stored by default)'
required: false
default: ''
branch_or_hash:
description: 'Branch or Commit hash to deploy (optional)'
type: string
description: 'Branch or Commit hash to deploy (optional, use the branch where this workflow is stored by default)'
required: false
default: ''
wait_time:
description: 'Time to wait in seconds (optional, 1800 seconds by default)'
required: false
default: ''

jobs:
deploy-test-environment:
get-pr-ref:
runs-on: ubuntu-latest
if: github.event_name == 'issue_comment' && github.event.issue.pull_request && startsWith(github.event.comment.body, '/preview')
outputs:
pr-ref: ${{ steps.get-ref.outputs.pr-ref }}
wait_time: ${{ steps.get-wait-time.outputs.wait_time }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Get PR ref
id: get-ref
env:
GH_TOKEN: ${{ github.token }}
run: |
PR_NUMBER=$(jq --raw-output .issue.number $GITHUB_EVENT_PATH)
PR_REF=$(gh pr view $PR_NUMBER --json headRefName -q '.headRefName')
echo "pr-ref=$PR_REF" > $GITHUB_OUTPUT

- name: Extract wait time
id: get-wait-time
run: |
COMMENT_BODY="${{ github.event.comment.body }}"
WAIT_TIME=$(echo "$COMMENT_BODY" | grep -oP '(?<=/preview\s)\d+' || echo "1800")
echo "wait_time=$WAIT_TIME" > $GITHUB_OUTPUT

deploy-test-environment-pr-comment:
needs: get-pr-ref
uses: joinmisskey/misskey-tga/.github/workflows/deploy-test-environment.yml@main
with:
repository: ${{ github.repository }}
branch_or_hash: ${{ needs.get-pr-ref.outputs.pr-ref }}
wait_time: ${{ needs.get-pr-ref.outputs.wait_time }}
secrets:
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}

deploy-test-environment-wd:
if: github.event_name == 'workflow_dispatch'
uses: joinmisskey/misskey-tga/.github/workflows/deploy-test-environment.yml@main
with:
repository: ${{ github.event.inputs.repository }}
branch_or_hash: ${{ github.event.inputs.branch_or_hash }}
repository: ${{ inputs.repository || github.repository }}
branch_or_hash: ${{ inputs.branch_or_hash || github.ref_name }}
wait_time: ${{ inputs.wait_time || '1800' }}
secrets:
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
2 changes: 1 addition & 1 deletion .github/workflows/get-api-diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
ref: ${{ matrix.ref }}
submodules: true
- name: Install pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v3
with:
version: 8
run_install: false
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
with:
fetch-depth: 0
submodules: true
- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v3
with:
version: 8
run_install: false
Expand All @@ -54,7 +54,7 @@ jobs:
with:
fetch-depth: 0
submodules: true
- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v3
with:
version: 7
run_install: false
Expand All @@ -80,7 +80,7 @@ jobs:
with:
fetch-depth: 0
submodules: true
- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v3
with:
version: 7
run_install: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/on-release-created.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
with:
submodules: true
- name: Install pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v3
with:
version: 8
run_install: false
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
with:
submodules: true
- name: Install pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v3
with:
version: 8
run_install: false
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
with:
submodules: true
- name: Install pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v3
with:
version: 8
run_install: false
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/test-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
with:
submodules: true
- name: Install pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v3
with:
version: 8
run_install: false
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
#- uses: browser-actions/setup-firefox@latest
# if: ${{ matrix.browser == 'firefox' }}
- name: Install pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v3
with:
version: 7
run_install: false
Expand All @@ -115,6 +115,7 @@ jobs:
run: pnpm exec cypress install
- name: Cypress run
uses: cypress-io/github-action@v6
timeout-minutes: 15
with:
install: false
start: pnpm start:test
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
with:
submodules: true
- name: Install pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v3
with:
version: 8
run_install: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/validate-api-json.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
with:
submodules: true
- name: Install pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v3
with:
version: 8
run_install: false
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
- Fix: リモートユーザーのリアクション一覧がすべて見えてしまうのを修正
* すべてのリモートユーザーのリアクション一覧を見えないようにします
- Enhance: モデレーターはすべてのユーザーのリアクション一覧を見られるように
- Fix: 特定のキーワード及び正規表現にマッチする文字列を含むノートが投稿された際、エラーに出来るような設定項目を追加 #13207
* デフォルトは空欄なので適用前と同等の動作になります

### Client
- Feat: 新しいゲームを追加
Expand Down Expand Up @@ -73,6 +75,8 @@
- Fix: キャプションが空の画像をクロップするとキャプションにnullという文字列が入ってしまう問題の修正
- Fix: プロフィールを編集してもリロードするまで反映されない問題を修正
- Fix: エラー画像URLを設定した後解除すると,デフォルトの画像が表示されない問題の修正
- Fix: MkCodeEditorで行がずれていってしまう問題の修正
- Fix: Summaly proxy利用時にプレイヤーが動作しないことがあるのを修正 #13196

### Server
- Enhance: 連合先のレートリミットに引っかかった際にリトライするようになりました
Expand All @@ -87,6 +91,7 @@
- Fix: properly handle cc followers
- Fix: ジョブに関する設定の名前を修正 relashionshipJobPerSec -> relationshipJobPerSec
- Fix: コントロールパネル->モデレーション->「誰でも新規登録できるようにする」の初期値をONからOFFに変更 #13122
- Enhance: 連合向けのノート配信を軽量化 #13192

### Service Worker
- Enhance: オフライン表示のデザインを改善・多言語対応
Expand Down
22 changes: 17 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,19 @@ command.
If you have not changed it from the default, it will be "http://localhost:3000".
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.

### `MK_DEV_PREFER=backend pnpm dev`
pnpm dev has another mode with `MK_DEV_PREFER=backend`.

```
MK_DEV_PREFER=backend pnpm dev
```

- This mode is closer to the production environment than the default mode.
- Vite runs behind the backend (the backend will proxy Vite at /vite).
- You can see Misskey by accessing `http://localhost:3000` (Replace `3000` with the port configured with `port` in .config/default.yml).
- To change the port of Vite, specify with `VITE_PORT` environment variable.
- HMR may not work in some environments such as Windows.

### Dev Container
Instead of running `pnpm` locally, you can use Dev Container to set up your development environment.
To use Dev Container, open the project directory on VSCode with Dev Containers installed.
Expand Down Expand Up @@ -286,18 +299,17 @@ export const argTypes = {
min: 1,
max: 4,
},
},
};
```

Also, you can use msw to mock API requests in the storybook. Creating a `MyComponent.stories.msw.ts` file to define the mock handlers.

```ts
import { rest } from 'msw';
import { HttpResponse, http } from 'msw';
export const handlers = [
rest.post('/api/notes/timeline', (req, res, ctx) => {
return res(
ctx.json([]),
);
http.post('/api/notes/timeline', ({ request }) => {
return HttpResponse.json([]);
}),
];
```
Expand Down
71 changes: 38 additions & 33 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ FROM --platform=$BUILDPLATFORM node:${NODE_VERSION} AS submodule

WORKDIR /misskey

COPY .git .git
COPY ./.git/ ./.git/

RUN git submodule update --init --recursive

Expand All @@ -30,35 +30,40 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \

RUN corepack enable

COPY --link ["packages/sw/package.json", "./packages/sw/"]
COPY --link ["packages/misskey-bubble-game/package.json", "./packages/misskey-bubble-game/"]
COPY --link ["packages/misskey-reversi/package.json", "./packages/misskey-reversi/"]
COPY --link ["packages/misskey-js/package.json", "./packages/misskey-js/"]
COPY --link ["packages/backend/package.json", "./packages/backend/"]
COPY --link ["packages/frontend/package.json", "./packages/frontend/"]
COPY --link ["pnpm-lock.yaml", "pnpm-workspace.yaml", "package.json", "./"]
COPY --link ./packages/sw/package.json ./packages/sw/
COPY --link ./packages/misskey-bubble-game/package.json ./packages/misskey-bubble-game/
COPY --link ./packages/misskey-reversi/package.json ./packages/misskey-reversi/
COPY --link ./packages/misskey-js/package.json ./packages/misskey-js/
COPY --link ./packages/backend/package.json ./packages/backend/
COPY --link ./packages/frontend/package.json ./packages/frontend/
COPY --link ./pnpm-lock.yaml ./pnpm-workspace.yaml ./package.json ./

RUN --mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked \
pnpm i --frozen-lockfile --aggregate-output

COPY --link ["scripts/", "./scripts/"]
COPY --link ["packages/sw/build.js", "packages/sw/tsconfig.json", "./packages/sw/"]
COPY --link ["packages/sw/src/", "./packages/sw/src/"]
COPY --link ["packages/misskey-bubble-game/build.js", "packages/misskey-bubble-game/tsconfig.json", "./packages/misskey-bubble-game/"]
COPY --link ["packages/misskey-bubble-game/src/", "./packages/misskey-bubble-game/src/"]
COPY --link ["packages/misskey-reversi/build.js", "packages/misskey-reversi/tsconfig.json", "./packages/misskey-reversi/"]
COPY --link ["packages/misskey-reversi/src/", "./packages/misskey-reversi/src/"]
COPY --link ["packages/misskey-js/tsconfig.json", "./packages/misskey-js/"]
COPY --link ["packages/misskey-js/src/", "./packages/misskey-js/src/"]
COPY --link ["packages/backend/.swcrc", "./packages/backend/"]
COPY --link ["packages/backend/src/", "./packages/backend/src/"]
COPY --link ["locales/", "./locales/"]
COPY --link ["packages/frontend/vite.config.ts", "packages/frontend/vite.json5.ts", "./packages/frontend/"]
COPY --link ["packages/frontend/assets/", "./packages/frontend/assets/"]
COPY --link ["packages/frontend/lib/", "./packages/frontend/lib/"]
COPY --link ["packages/frontend/src/", "./packages/frontend/src/"]
COPY --link .git ./.git
COPY --link --from=submodule ["/misskey/fluent-emojis/", "./fluent-emojis/"]
COPY --link ./scripts/ ./scripts/
COPY --link ./packages/sw/build.js ./packages/sw/tsconfig.json ./packages/sw/
COPY --link ./packages/sw/src/ ./packages/sw/src/
COPY --link ./packages/misskey-bubble-game/build.js ./packages/misskey-bubble-game/tsconfig.json ./packages/misskey-bubble-game/
COPY --link ./packages/misskey-bubble-game/src/ ./packages/misskey-bubble-game/src/
COPY --link ./packages/misskey-reversi/build.js ./packages/misskey-reversi/tsconfig.json ./packages/misskey-reversi/
COPY --link ./packages/misskey-reversi/src/ ./packages/misskey-reversi/src/
COPY --link ./packages/misskey-js/tsconfig.json ./packages/misskey-js/
COPY --link ./packages/misskey-js/src/ ./packages/misskey-js/src/
COPY --link ./packages/backend/.swcrc ./packages/backend/
COPY --link ./packages/backend/src/ ./packages/backend/src/
COPY --link ./locales/ ./locales/
COPY --link ./packages/frontend/vite.config.ts ./packages/frontend/vite.json5.ts ./packages/frontend/
COPY --link ./packages/frontend/assets/ ./packages/frontend/assets/
COPY --link ./packages/frontend/lib/ ./packages/frontend/lib/
COPY --link ./packages/frontend/src/ ./packages/frontend/src/
COPY --link ./scripts/changelog-checker/.gitignore ./scripts/changelog-checker/
COPY --link ./packages/misskey-js/generator/.gitignore ./packages/misskey-js/generator/
COPY --link ./packages/frontend/.storybook/.gitignore ./packages/frontend/.storybook/
COPY --link ./packages/frontend/.gitignore ./packages/frontend/
COPY --link ./.gitignore ./
COPY --link ./.git/ ./.git/
COPY --link --from=submodule /misskey/fluent-emojis/ ./fluent-emojis/

ENV NODE_ENV=production

Expand All @@ -79,12 +84,12 @@ RUN corepack enable

WORKDIR /misskey

COPY --link ["scripts/", "./scripts/"]
COPY --link ["packages/misskey-bubble-game/package.json", "./packages/misskey-bubble-game/"]
COPY --link ["packages/misskey-reversi/package.json", "./packages/misskey-reversi/"]
COPY --link ["packages/misskey-js/package.json", "./packages/misskey-js/"]
COPY --link ["packages/backend/package.json", "./packages/backend/"]
COPY --link ["pnpm-lock.yaml", "pnpm-workspace.yaml", "package.json", "./"]
COPY --link ./scripts/ ./scripts/
COPY --link ./packages/misskey-bubble-game/package.json ./packages/misskey-bubble-game/
COPY --link ./packages/misskey-reversi/package.json ./packages/misskey-reversi/
COPY --link ./packages/misskey-js/package.json ./packages/misskey-js/
COPY --link ./packages/backend/package.json ./packages/backend/
COPY --link ./pnpm-lock.yaml ./pnpm-workspace.yaml ./package.json ./

RUN --mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked \
pnpm i --frozen-lockfile --aggregate-output
Expand Down Expand Up @@ -123,7 +128,7 @@ COPY --chown=misskey:misskey ./packages/backend/migration/ ./packages/backend/mi
COPY --chown=misskey:misskey ./packages/frontend/assets/ ./packages/frontend/assets/
COPY --chown=misskey:misskey ./.node-version ./package.json ./pnpm-workspace.yaml ./
COPY --chown=misskey:misskey ./healthcheck.sh ./
COPY --chown=misskey:misskey --from=submodule /misskey/fluent-emojis/ /misskey/fluent-emojis/
COPY --chown=misskey:misskey --from=submodule /misskey/fluent-emojis/ ./fluent-emojis/
COPY --chown=misskey:misskey --from=native-builder /misskey/packages/misskey-bubble-game/built/ ./packages/misskey-bubble-game/built/
COPY --chown=misskey:misskey --from=native-builder /misskey/packages/misskey-reversi/built/ ./packages/misskey-reversi/built/
COPY --chown=misskey:misskey --from=native-builder /misskey/packages/misskey-js/built/ ./packages/misskey-js/built/
Expand Down
6 changes: 3 additions & 3 deletions cypress/e2e/basic.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,12 @@ describe('After user signed in', () => {

it('successfully loads', () => {
// 表示に時間がかかるのでデフォルト秒数だとタイムアウトする
cy.get('[data-cy-user-setup-continue]', { timeout: 12000 }).should('be.visible');
cy.get('[data-cy-user-setup-continue]', { timeout: 30000 }).should('be.visible');
});

it('account setup wizard', () => {
// 表示に時間がかかるのでデフォルト秒数だとタイムアウトする
cy.get('[data-cy-user-setup-continue]', { timeout: 12000 }).click();
cy.get('[data-cy-user-setup-continue]', { timeout: 30000 }).click();

cy.get('[data-cy-user-setup-user-name] input').type('ありす');
cy.get('[data-cy-user-setup-user-description] textarea').type('ほげ');
Expand Down Expand Up @@ -205,7 +205,7 @@ describe('After user setup', () => {

// アカウント初期設定ウィザード
// 表示に時間がかかるのでデフォルト秒数だとタイムアウトする
cy.get('[data-cy-user-setup] [data-cy-modal-window-close]', { timeout: 12000 }).click();
cy.get('[data-cy-user-setup] [data-cy-modal-window-close]', { timeout: 30000 }).click();
cy.get('[data-cy-modal-dialog-ok]').click();
});

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/router.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe('Router transition', () => {

// アカウント初期設定ウィザード
// 表示に時間がかかるのでデフォルト秒数だとタイムアウトする
cy.get('[data-cy-user-setup] [data-cy-modal-window-close]', { timeout: 12000 }).click();
cy.get('[data-cy-user-setup] [data-cy-modal-window-close]', { timeout: 30000 }).click();
cy.wait(500);
cy.get('[data-cy-modal-dialog-ok]').click();
});
Expand Down
Loading