From 5079a4b7dde5e6b3e3709e5054c38e331849658e Mon Sep 17 00:00:00 2001 From: zyoshoka <107108195+zyoshoka@users.noreply.github.com> Date: Thu, 1 Feb 2024 09:42:55 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix(ci):=20`misskey-js`=20=E3=81=AE?= =?UTF-8?q?=E3=83=90=E3=83=BC=E3=82=B8=E3=83=A7=E3=83=B3=E3=83=81=E3=82=A7?= =?UTF-8?q?=E3=83=83=E3=82=AF=E3=82=92=E3=83=88=E3=83=AA=E3=82=AC=E3=83=BC?= =?UTF-8?q?=E3=81=99=E3=82=8B=E6=9D=A1=E4=BB=B6=E3=81=AE=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=20(#13116)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(misskey-js): バージョンチェックのトリガー条件を修正 * chore(misskey-js): 2024.2.0-beta.8 --- .../workflows/check-misskey-js-version.yml | 28 +++++++++++++++++++ .github/workflows/test-misskey-js.yml | 14 ---------- packages/misskey-js/package.json | 2 +- 3 files changed, 29 insertions(+), 15 deletions(-) create mode 100644 .github/workflows/check-misskey-js-version.yml diff --git a/.github/workflows/check-misskey-js-version.yml b/.github/workflows/check-misskey-js-version.yml new file mode 100644 index 0000000000..325a893605 --- /dev/null +++ b/.github/workflows/check-misskey-js-version.yml @@ -0,0 +1,28 @@ +name: Check Misskey JS version + +on: + push: + branches: [ develop ] + paths: + - packages/misskey-js/package.json + - package.json + pull_request: + branches: [ develop ] + paths: + - packages/misskey-js/package.json + - package.json + +jobs: + check-version: + # ルートの package.json と packages/misskey-js/package.json のバージョンが一致しているかを確認する + name: Check version + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4.1.1 + - 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 diff --git a/.github/workflows/test-misskey-js.yml b/.github/workflows/test-misskey-js.yml index 5aed385df9..10c7ccf4d3 100644 --- a/.github/workflows/test-misskey-js.yml +++ b/.github/workflows/test-misskey-js.yml @@ -54,17 +54,3 @@ 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/checkout@v4.1.1 - - 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 diff --git a/packages/misskey-js/package.json b/packages/misskey-js/package.json index 99ec405ed6..03952c7ac1 100644 --- a/packages/misskey-js/package.json +++ b/packages/misskey-js/package.json @@ -1,7 +1,7 @@ { "type": "module", "name": "misskey-js", - "version": "2024.2.0-beta.7", + "version": "2024.2.0-beta.8", "description": "Misskey SDK for JavaScript", "types": "./built/dts/index.d.ts", "exports": { From 0641454c233e197a70ef6e1eb89a06c90bde125f Mon Sep 17 00:00:00 2001 From: 1Step621 <86859447+1STEP621@users.noreply.github.com> Date: Thu, 1 Feb 2024 09:43:23 +0900 Subject: [PATCH 2/2] =?UTF-8?q?Fix(frontend):=20=E3=83=AA=E3=83=90?= =?UTF-8?q?=E3=83=BC=E3=82=B7=E3=81=A7=E8=87=AA=E5=88=86=E8=87=AA=E4=BF=A1?= =?UTF-8?q?=E3=82=92=E6=8B=9B=E5=BE=85=E3=81=A7=E3=81=8D=E3=82=8B=E3=81=AE?= =?UTF-8?q?=E3=82=92=E4=BF=AE=E6=AD=A3=20&=20os.selectUser()=E3=81=AEinclu?= =?UTF-8?q?deSelf=E3=81=8C=E6=A9=9F=E8=83=BD=E3=81=97=E3=81=A6=E3=81=84?= =?UTF-8?q?=E3=81=AA=E3=81=84=E3=81=AE=E3=82=92=E4=BF=AE=E6=AD=A3=20(#1311?= =?UTF-8?q?7)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * リバーシで自分自信を招待できるのを修正 & os.selectUser()のincludeSelfが機能していないのを修正 * lint fix --- .../src/components/MkUserSelectDialog.vue | 24 +++++++++++++------ packages/frontend/src/pages/reversi/index.vue | 2 +- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/packages/frontend/src/components/MkUserSelectDialog.vue b/packages/frontend/src/components/MkUserSelectDialog.vue index 1846361108..7bef0a6e73 100644 --- a/packages/frontend/src/components/MkUserSelectDialog.vue +++ b/packages/frontend/src/components/MkUserSelectDialog.vue @@ -101,7 +101,13 @@ function search() { limit: 10, detail: false, }).then(_users => { - users.value = _users; + users.value = _users.filter((u) => { + if (props.includeSelf === false) { + return u.id !== $i?.id; + } else { + return true; + } + }); }); } @@ -131,18 +137,22 @@ onMounted(() => { misskeyApi('users/show', { userIds: defaultStore.state.recentlyUsedUsers, }).then(foundUsers => { - const _users = foundUsers.filter((u) => { + let _users = foundUsers; + _users = _users.filter((u) => { if (props.localOnly) { return u.host == null; } else { return true; } }); - if (props.includeSelf && _users.find(x => $i ? x.id === $i.id : true) == null) { - recentUsers.value = [$i!, ..._users]; - } else { - recentUsers.value = _users; - } + _users = _users.filter((u) => { + if (props.includeSelf === false) { + return u.id !== $i?.id; + } else { + return true; + } + }); + recentUsers.value = _users; }); }); diff --git a/packages/frontend/src/pages/reversi/index.vue b/packages/frontend/src/pages/reversi/index.vue index fca9f9e643..f342c986fc 100644 --- a/packages/frontend/src/pages/reversi/index.vue +++ b/packages/frontend/src/pages/reversi/index.vue @@ -196,7 +196,7 @@ async function matchHeatbeat() { async function matchUser() { pleaseLogin(); - const user = await os.selectUser({ localOnly: true }); + const user = await os.selectUser({ includeSelf: false, localOnly: true }); if (user == null) return; matchingUser.value = user;