Skip to content

Commit

Permalink
Merge pull request #156 from taiyme/merge-upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
taiyme authored Jan 29, 2024
2 parents 6f4abf0 + 2fad293 commit 5a2e3c2
Show file tree
Hide file tree
Showing 140 changed files with 6,249 additions and 3,400 deletions.
6 changes: 3 additions & 3 deletions .config/example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,14 +160,14 @@ id: 'aidx'
# Job concurrency per worker
#deliverJobConcurrency: 128
#inboxJobConcurrency: 16
#relashionshipJobConcurrency: 16
# What's relashionshipJob?:
#relationshipJobConcurrency: 16
# What's relationshipJob?:
# Follow, unfollow, block and unblock(ings) while following-imports, etc. or account migrations.

# Job rate limiter
#deliverJobPerSec: 128
#inboxJobPerSec: 32
#relashionshipJobPerSec: 64
#relationshipJobPerSec: 64

# Job attempts
#deliverJobMaxAttempts: 12
Expand Down
29 changes: 18 additions & 11 deletions .github/workflows/check-misskey-js-autogen.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Check Misskey JS autogen

on:
pull_request:
pull_request_target:
branches:
- master
- develop
Expand All @@ -15,13 +15,14 @@ jobs:
pull-requests: write

env:
api_json_names: "api-base.json api-head.json"
api_json_name: "api-head.json"

steps:
- name: checkout
uses: actions/checkout@v4
with:
submodules: true
ref: ${{ github.event.pull_request.head.sha }}

- name: setup pnpm
uses: pnpm/action-setup@v2
Expand Down Expand Up @@ -87,22 +88,27 @@ jobs:
find . -mindepth 1 -maxdepth 1 -type f -name '*.zip' -exec unzip {} -d . ';'
ls -la
- name: get head checksum
run: |-
checksum=$(realpath head_checksum)
cd packages/misskey-js/src
find autogen -type f -exec sh -c 'echo $(sed -E "s/^\s+\*\s+generatedAt:.+$//" {} | sha256sum | cut -d" " -f 1) {}' \; > $checksum
cd ../../..
- name: build autogen
run: |-
for name in $(echo $api_json_names)
do
checksum=$(mktemp)
mv $name packages/misskey-js/generator/api.json
checksum=$(realpath ${api_json_name}_checksum)
mv $api_json_name packages/misskey-js/generator/api.json
cd packages/misskey-js/generator
pnpm run generate
find built -type f -exec sh -c 'echo $(sed -E "s/^\s+\*\s+generatedAt:.+$//" {} | sha256sum | cut -d" " -f 1) {}' \; > $checksum
cd ../../..
cp $checksum ${name}_checksum
done
cd built
find autogen -type f -exec sh -c 'echo $(sed -E "s/^\s+\*\s+generatedAt:.+$//" {} | sha256sum | cut -d" " -f 1) {}' \; > $checksum
cd ../../../..
- name: check update for type definitions
run: diff $(echo -n ${api_json_names} | awk -v RS=" " '{ printf "%s_checksum ", $0 }')
run: diff head_checksum ${api_json_name}_checksum

- name: send message
if: failure()
Expand All @@ -125,3 +131,4 @@ jobs:
comment_tag: check-misskey-js-autogen
mode: delete
message: "Thank you!"
create_if_not_exists: false
2 changes: 2 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,6 @@ jobs:
- run: pnpm i --frozen-lockfile
- run: pnpm --filter misskey-js run build
if: ${{ matrix.workspace == 'backend' }}
- run: pnpm --filter misskey-reversi run build:tsc
if: ${{ matrix.workspace == 'backend' }}
- run: pnpm --filter ${{ matrix.workspace }} run typecheck
45 changes: 45 additions & 0 deletions .github/workflows/on-release-created.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: On Release Created (Publish misskey-js)

on:
release:
types: [created]

workflow_dispatch:

jobs:
publish-misskey-js:
name: Publish misskey-js
runs-on: ubuntu-latest

permissions:
contents: read
id-token: write

strategy:
matrix:
node-version: [20.10.0]

steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
registry-url: 'https://registry.npmjs.org'
- name: Publish package
run: |
corepack enable
pnpm i --frozen-lockfile
pnpm build
pnpm --filter misskey-js publish --access public --no-git-checks --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
NPM_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
14 changes: 14 additions & 0 deletions .github/workflows/test-misskey-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,17 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./packages/misskey-js/coverage/coverage-final.json

check-version:
# ルートの package.json と packages/misskey-js/package.json のバージョンが一致しているかを確認する
name: Check version
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Check version
run: |
if [ "$(jq -r '.version' package.json)" != "$(jq -r '.version' packages/misskey-js/package.json)" ]; then
echo "Version mismatch!"
exit 1
fi
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,14 @@
- Enhance: 絵文字ピッカー・オートコンプリートで、完全一致した絵文字を優先的に表示するように
- Enhance: Playの説明欄にMFMを使えるように
- Enhance: チャンネルノートの場合は詳細ページからその前後のノートを見れるように
- Enhance: 季節に応じた画面の演出を南半球でも利用できるように
- Enhance: タイムラインフィルターの設定をすべて保持できるように
- 今までの「TLに他の人への返信を含める」設定は一旦リセットされます
- Enhance: タイムラインフィルターに「センシティブなファイルを含むノートを表示」を追加
- Enhance: ノート作成画面のファイル添付メニューから直接ファイルを削除できるように
- Enhance: MFMの属性でオートコンプリートが使用できるように #12735
- Enhance: 絵文字編集ダイアログをモーダルではなくウィンドウで表示するように
- Enhance: リモートのユーザーはメニューから直接リモートで表示できるように
- Fix: ネイティブモードの絵文字がモノクロにならないように
- Fix: v2023.12.0で追加された「モデレーターがユーザーのアイコンもしくはバナー画像を未設定状態にできる機能」が管理画面上で正しく表示されていない問題を修正
- Fix: AiScriptの`readline`関数が不正な値を返すことがある問題のv2023.12.0時点での修正がPlay以外に適用されていないのを修正
Expand All @@ -56,6 +63,10 @@
- Fix: `notes/create`で、`text`が空白文字のみで構成されていてかつリノート、ファイルまたは投票を含んでいるリクエストに対するレスポンスの`text``""`から`null`になるように変更
- Fix: ipv4とipv6の両方が利用可能な環境でallowedPrivateNetworksが設定されていた場合プライベートipの検証ができていなかった問題を修正
- Fix: properly handle cc followers
- Fix: ジョブに関する設定の名前を修正 relashionshipJobPerSec -> relationshipJobPerSec

### Service Worker
- Enhance: オフライン表示のデザインを改善・多言語対応

## 2023.12.2

Expand Down
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ RUN --mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked \
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/tsconfig.json", "./packages/misskey-bubble-game/"]
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/tsconfig.json", "./packages/misskey-reversi/"]
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"]
Expand Down Expand Up @@ -81,7 +81,7 @@ 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-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", "./"]
Expand Down Expand Up @@ -129,7 +129,7 @@ COPY --chown=misskey:misskey --from=native-builder /misskey/packages/misskey-js/
COPY --chown=misskey:misskey --from=native-builder /misskey/packages/backend/built ./packages/backend/built
COPY --chown=misskey:misskey --from=native-builder /misskey/built ./built
COPY --chown=misskey:misskey --from=target-builder /misskey/packages/misskey-bubble-game/node_modules ./packages/misskey-bubble-game/node_modules
# COPY --chown=misskey:misskey --from=target-builder /misskey/packages/misskey-reversi/node_modules ./packages/misskey-reversi/node_modules
COPY --chown=misskey:misskey --from=target-builder /misskey/packages/misskey-reversi/node_modules ./packages/misskey-reversi/node_modules
COPY --chown=misskey:misskey --from=target-builder /misskey/packages/misskey-js/node_modules ./packages/misskey-js/node_modules
COPY --chown=misskey:misskey --from=target-builder /misskey/packages/backend/node_modules ./packages/backend/node_modules
COPY --chown=misskey:misskey --from=target-builder /misskey/node_modules ./node_modules
Expand Down
9 changes: 6 additions & 3 deletions cypress/e2e/basic.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,13 @@ describe('After user signed in', () => {
});

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

it('account setup wizard', () => {
cy.get('[data-cy-user-setup-continue]').click();
// 表示に時間がかかるのでデフォルト秒数だとタイムアウトする
cy.get('[data-cy-user-setup-continue]', { timeout: 12000 }).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 @@ -202,7 +204,8 @@ describe('After user setup', () => {
cy.login('alice', 'alice1234');

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

Expand Down
30 changes: 30 additions & 0 deletions cypress/e2e/router.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
describe('Router transition', () => {
describe('Redirect', () => {
// サーバの初期化。ルートのテストに関しては各describeごとに1度だけ実行で十分だと思う(使いまわした方が早い)
before(() => {
cy.resetState();

// インスタンス初期セットアップ
cy.registerUser('admin', 'pass', true);

// ユーザー作成
cy.registerUser('alice', 'alice1234');

cy.login('alice', 'alice1234');

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

it('redirect to user profile', () => {
// テストのためだけに用意されたリダイレクト用ルートに飛ぶ
cy.visit('/redirect-test');

// プロフィールページのURLであることを確認する
cy.url().should('include', '/@alice')
});
});
});
7 changes: 7 additions & 0 deletions locales/ar-SA.yml
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,8 @@ hcaptcha: "hCaptcha"
enableHcaptcha: "فعّل hCaptcha"
hcaptchaSiteKey: "مفتاح الموقع"
hcaptchaSecretKey: "المفتاح السري"
mcaptchaSiteKey: "مفتاح الموقع"
mcaptchaSecretKey: "المفتاح السري"
recaptcha: "reCAPTCHA"
enableRecaptcha: "تمكين reCAPTCHA"
recaptchaSiteKey: "مفتاح الموقع"
Expand Down Expand Up @@ -1010,6 +1012,7 @@ icon: "الصورة الرمزية"
replies: "رد"
renotes: "أعد النشر"
flip: "اقلب"
lastNDays: "آخر {n} أيام"
_initialAccountSetting:
accountCreated: "نجح إنشاء حسابك!"
letsStartAccountSetup: "إذا كنت جديدًا لنعدّ حسابك الشخصي."
Expand Down Expand Up @@ -1414,6 +1417,7 @@ _profile:
_exportOrImport:
allNotes: "كل الملاحظات"
favoritedNotes: " الملاحظات المفضلة"
clips: "مِشبك"
followingList: "المتابَعون"
muteList: "المستخدمون المكتومون"
blockingList: "المستخدمون المحجوبون"
Expand Down Expand Up @@ -1561,3 +1565,6 @@ _moderationLogTypes:
suspend: "علِق"
resetPassword: "أعد تعيين كلمتك السرية"
createInvitation: "ولِّد دعوة"
_reversi:
total: "المجموع"

6 changes: 6 additions & 0 deletions locales/bn-BD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,8 @@ hcaptcha: "hCaptcha"
enableHcaptcha: "hCaptcha চালু করুন"
hcaptchaSiteKey: "সাইট কী"
hcaptchaSecretKey: "সিক্রেট কী"
mcaptchaSiteKey: "সাইট কী"
mcaptchaSecretKey: "সিক্রেট কী"
recaptcha: "reCAPTCHA"
enableRecaptcha: "reCAPTCHA চালু করুন"
recaptchaSiteKey: "সাইট কী"
Expand Down Expand Up @@ -1190,6 +1192,7 @@ _profile:
changeBanner: "ব্যানার পরিবর্তন করুন"
_exportOrImport:
allNotes: "সকল নোট"
clips: "ক্লিপ"
followingList: "অনুসরণ করা হচ্ছে"
muteList: "মিউট"
blockingList: "ব্লক"
Expand Down Expand Up @@ -1341,3 +1344,6 @@ _webhookSettings:
_moderationLogTypes:
suspend: "স্থগিত করা"
resetPassword: "পাসওয়ার্ড রিসেট করুন"
_reversi:
total: "মোট"

Loading

0 comments on commit 5a2e3c2

Please sign in to comment.