From 0fd06e3f0d8589176d33acf2b15decd0643eac29 Mon Sep 17 00:00:00 2001 From: tamaina Date: Tue, 7 May 2024 11:07:16 +0900 Subject: [PATCH 01/26] fix --- package.json | 148 +++++++++++++++---------------- packages/misskey-js/package.json | 122 ++++++++++++------------- 2 files changed, 135 insertions(+), 135 deletions(-) diff --git a/package.json b/package.json index bc5d396d6c09..e05fbdcca74d 100644 --- a/package.json +++ b/package.json @@ -1,76 +1,76 @@ { - "name": "misskey", - "version": "2024.5.0-beta.1", - "codename": "nasubi", - "repository": { - "type": "git", - "url": "https://github.com/misskey-dev/misskey.git" - }, - "packageManager": "pnpm@9.0.6", - "workspaces": [ - "packages/frontend", - "packages/backend", - "packages/sw", - "packages/misskey-js", - "packages/misskey-reversi", - "packages/misskey-bubble-game" - ], - "private": true, - "scripts": { - "build-pre": "node ./scripts/build-pre.js", - "build-assets": "node ./scripts/build-assets.mjs", - "build": "pnpm build-pre && pnpm -r build && pnpm build-assets", - "build-storybook": "pnpm --filter frontend build-storybook", - "build-misskey-js-with-types": "pnpm build-pre && pnpm --filter backend... --filter=!misskey-js build && pnpm --filter backend generate-api-json && ncp packages/backend/built/api.json packages/misskey-js/generator/api.json && pnpm --filter misskey-js update-autogen-code && pnpm --filter misskey-js build && pnpm --filter misskey-js api", - "start": "pnpm check:connect && cd packages/backend && node ./built/boot/entry.js", - "start:test": "cd packages/backend && cross-env NODE_ENV=test node ./built/boot/entry.js", - "init": "pnpm migrate", - "migrate": "cd packages/backend && pnpm migrate", - "revert": "cd packages/backend && pnpm revert", - "check:connect": "cd packages/backend && pnpm check:connect", - "migrateandstart": "pnpm migrate && pnpm start", - "watch": "pnpm dev", - "dev": "node scripts/dev.mjs", - "lint": "pnpm -r lint", - "cy:open": "pnpm cypress open --browser --e2e --config-file=cypress.config.ts", - "cy:run": "pnpm cypress run", - "e2e": "pnpm start-server-and-test start:test http://localhost:61812 cy:run", - "jest": "cd packages/backend && pnpm jest", - "jest-and-coverage": "cd packages/backend && pnpm jest-and-coverage", - "test": "pnpm -r test", - "test-and-coverage": "pnpm -r test-and-coverage", - "clean": "node ./scripts/clean.js", - "clean-all": "node ./scripts/clean-all.js", - "cleanall": "pnpm clean-all" - }, - "resolutions": { - "chokidar": "3.5.3", - "lodash": "4.17.21" - }, - "dependencies": { - "cssnano": "6.1.2", - "execa": "8.0.1", - "fast-glob": "3.3.2", - "ignore-walk": "6.0.4", - "js-yaml": "4.1.0", - "postcss": "8.4.38", - "tar": "6.2.1", - "terser": "5.30.3", - "typescript": "5.4.5", - "esbuild": "0.20.2", - "glob": "10.3.12" - }, - "devDependencies": { - "@types/node": "20.12.7", - "@typescript-eslint/eslint-plugin": "7.7.1", - "@typescript-eslint/parser": "7.7.1", - "cross-env": "7.0.3", - "cypress": "13.7.3", - "eslint": "8.57.0", - "ncp": "2.0.0", - "start-server-and-test": "2.0.3" - }, - "optionalDependencies": { - "@tensorflow/tfjs-core": "4.4.0" - } + "name": "misskey", + "version": "2024.5.0-beta.1", + "codename": "nasubi", + "repository": { + "type": "git", + "url": "https://github.com/misskey-dev/misskey.git" + }, + "packageManager": "pnpm@9.0.6", + "workspaces": [ + "packages/frontend", + "packages/backend", + "packages/sw", + "packages/misskey-js", + "packages/misskey-reversi", + "packages/misskey-bubble-game" + ], + "private": true, + "scripts": { + "build-pre": "node ./scripts/build-pre.js", + "build-assets": "node ./scripts/build-assets.mjs", + "build": "pnpm build-pre && pnpm -r build && pnpm build-assets", + "build-storybook": "pnpm --filter frontend build-storybook", + "build-misskey-js-with-types": "pnpm build-pre && pnpm --filter backend... --filter=!misskey-js build && pnpm --filter backend generate-api-json && ncp packages/backend/built/api.json packages/misskey-js/generator/api.json && pnpm --filter misskey-js update-autogen-code && pnpm --filter misskey-js build && pnpm --filter misskey-js api", + "start": "pnpm check:connect && cd packages/backend && node ./built/boot/entry.js", + "start:test": "cd packages/backend && cross-env NODE_ENV=test node ./built/boot/entry.js", + "init": "pnpm migrate", + "migrate": "cd packages/backend && pnpm migrate", + "revert": "cd packages/backend && pnpm revert", + "check:connect": "cd packages/backend && pnpm check:connect", + "migrateandstart": "pnpm migrate && pnpm start", + "watch": "pnpm dev", + "dev": "node scripts/dev.mjs", + "lint": "pnpm -r lint", + "cy:open": "pnpm cypress open --browser --e2e --config-file=cypress.config.ts", + "cy:run": "pnpm cypress run", + "e2e": "pnpm start-server-and-test start:test http://localhost:61812 cy:run", + "jest": "cd packages/backend && pnpm jest", + "jest-and-coverage": "cd packages/backend && pnpm jest-and-coverage", + "test": "pnpm -r test", + "test-and-coverage": "pnpm -r test-and-coverage", + "clean": "node ./scripts/clean.js", + "clean-all": "node ./scripts/clean-all.js", + "cleanall": "pnpm clean-all" + }, + "resolutions": { + "chokidar": "3.5.3", + "lodash": "4.17.21" + }, + "dependencies": { + "cssnano": "6.1.2", + "execa": "8.0.1", + "fast-glob": "3.3.2", + "ignore-walk": "6.0.4", + "js-yaml": "4.1.0", + "postcss": "8.4.38", + "tar": "6.2.1", + "terser": "5.30.3", + "typescript": "5.4.5", + "esbuild": "0.20.2", + "glob": "10.3.12" + }, + "devDependencies": { + "@types/node": "20.12.7", + "@typescript-eslint/eslint-plugin": "7.7.1", + "@typescript-eslint/parser": "7.7.1", + "cross-env": "7.0.3", + "cypress": "13.7.3", + "eslint": "8.57.0", + "ncp": "2.0.0", + "start-server-and-test": "2.0.3" + }, + "optionalDependencies": { + "@tensorflow/tfjs-core": "4.4.0" + } } diff --git a/packages/misskey-js/package.json b/packages/misskey-js/package.json index e7766cda12ba..cc5d5bdbf4fa 100644 --- a/packages/misskey-js/package.json +++ b/packages/misskey-js/package.json @@ -1,63 +1,63 @@ { - "type": "module", - "name": "misskey-js", - "version": "2024.5.0-beta.1", - "description": "Misskey SDK for JavaScript", - "main": "./built/index.js", - "types": "./built/index.d.ts", - "exports": { - ".": { - "import": "./built/index.js", - "types": "./built/index.d.ts" - }, - "./*": { - "import": "./built/*", - "types": "./built/*" - } - }, - "scripts": { - "build": "node ./build.js", - "watch": "nodemon -w package.json -e json --exec \"node ./build.js --watch\"", - "tsd": "tsd", - "api": "pnpm api-extractor run --local --verbose", - "api-prod": "pnpm api-extractor run --verbose", - "eslint": "eslint . --ext .js,.jsx,.ts,.tsx", - "typecheck": "tsc --noEmit", - "lint": "pnpm typecheck && pnpm eslint", - "jest": "jest --coverage --detectOpenHandles", - "test": "pnpm jest && pnpm tsd", - "update-autogen-code": "pnpm --filter misskey-js-type-generator generate && ncp generator/built/autogen src/autogen" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/misskey-dev/misskey.js.git" - }, - "devDependencies": { - "@microsoft/api-extractor": "7.43.1", - "@misskey-dev/eslint-plugin": "1.0.0", - "@swc/jest": "0.2.36", - "@types/jest": "29.5.12", - "@types/node": "20.12.7", - "@typescript-eslint/eslint-plugin": "7.7.1", - "@typescript-eslint/parser": "7.7.1", - "eslint": "8.57.0", - "jest": "29.7.0", - "jest-fetch-mock": "3.0.3", - "jest-websocket-mock": "2.5.0", - "mock-socket": "9.3.1", - "ncp": "2.0.0", - "nodemon": "3.1.0", - "execa": "8.0.1", - "tsd": "0.30.7", - "typescript": "5.4.5", - "esbuild": "0.19.11", - "glob": "10.3.12" - }, - "files": [ - "built" - ], - "dependencies": { - "eventemitter3": "5.0.1", - "reconnecting-websocket": "4.4.0" - } + "type": "module", + "name": "misskey-js", + "version": "2024.5.0-beta.1", + "description": "Misskey SDK for JavaScript", + "main": "./built/index.js", + "types": "./built/index.d.ts", + "exports": { + ".": { + "import": "./built/index.js", + "types": "./built/index.d.ts" + }, + "./*": { + "import": "./built/*", + "types": "./built/*" + } + }, + "scripts": { + "build": "node ./build.js", + "watch": "nodemon -w package.json -e json --exec \"node ./build.js --watch\"", + "tsd": "tsd", + "api": "pnpm api-extractor run --local --verbose", + "api-prod": "pnpm api-extractor run --verbose", + "eslint": "eslint . --ext .js,.jsx,.ts,.tsx", + "typecheck": "tsc --noEmit", + "lint": "pnpm typecheck && pnpm eslint", + "jest": "jest --coverage --detectOpenHandles", + "test": "pnpm jest && pnpm tsd", + "update-autogen-code": "pnpm --filter misskey-js-type-generator generate && ncp generator/built/autogen src/autogen" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/misskey-dev/misskey.js.git" + }, + "devDependencies": { + "@microsoft/api-extractor": "7.43.1", + "@misskey-dev/eslint-plugin": "1.0.0", + "@swc/jest": "0.2.36", + "@types/jest": "29.5.12", + "@types/node": "20.12.7", + "@typescript-eslint/eslint-plugin": "7.7.1", + "@typescript-eslint/parser": "7.7.1", + "eslint": "8.57.0", + "jest": "29.7.0", + "jest-fetch-mock": "3.0.3", + "jest-websocket-mock": "2.5.0", + "mock-socket": "9.3.1", + "ncp": "2.0.0", + "nodemon": "3.1.0", + "execa": "8.0.1", + "tsd": "0.30.7", + "typescript": "5.4.5", + "esbuild": "0.19.11", + "glob": "10.3.12" + }, + "files": [ + "built" + ], + "dependencies": { + "eventemitter3": "5.0.1", + "reconnecting-websocket": "4.4.0" + } } From f5d57c02c7edbf71c4f2eaff789dfd093513027d Mon Sep 17 00:00:00 2001 From: tamaina Date: Tue, 7 May 2024 14:38:43 +0900 Subject: [PATCH 02/26] dev: modify release manager to set indent type --- .github/workflows/release-with-dispatch.yml | 3 +++ .github/workflows/release-with-ready.yml | 1 + 2 files changed, 4 insertions(+) diff --git a/.github/workflows/release-with-dispatch.yml b/.github/workflows/release-with-dispatch.yml index 1a954739d959..bc6448cb37d8 100644 --- a/.github/workflows/release-with-dispatch.yml +++ b/.github/workflows/release-with-dispatch.yml @@ -61,6 +61,7 @@ jobs: - use_external_app_to_release: ${{ vars.USE_RELEASE_APP == 'true' }} + indent: ${{ vars.INDENT }} secrets: RELEASE_APP_ID: ${{ secrets.RELEASE_APP_ID }} RELEASE_APP_PRIVATE_KEY: ${{ secrets.RELEASE_APP_PRIVATE_KEY }} @@ -75,6 +76,7 @@ jobs: pr_number: ${{ needs.get-pr.outputs.pr_number }} package_jsons_to_rewrite: ${{ vars.PACKAGE_JSONS_TO_REWRITE }} use_external_app_to_release: ${{ vars.USE_RELEASE_APP == 'true' }} + indent: ${{ vars.INDENT }} secrets: RELEASE_APP_ID: ${{ secrets.RELEASE_APP_ID }} RELEASE_APP_PRIVATE_KEY: ${{ secrets.RELEASE_APP_PRIVATE_KEY }} @@ -115,6 +117,7 @@ jobs: # } package_jsons_to_rewrite: ${{ vars.PACKAGE_JSONS_TO_REWRITE }} use_external_app_to_release: ${{ vars.USE_RELEASE_APP == 'true' }} + indent: ${{ vars.INDENT }} secrets: RELEASE_APP_ID: ${{ secrets.RELEASE_APP_ID }} RELEASE_APP_PRIVATE_KEY: ${{ secrets.RELEASE_APP_PRIVATE_KEY }} diff --git a/.github/workflows/release-with-ready.yml b/.github/workflows/release-with-ready.yml index b64ed20791b0..139503e563e8 100644 --- a/.github/workflows/release-with-ready.yml +++ b/.github/workflows/release-with-ready.yml @@ -33,6 +33,7 @@ jobs: pr_number: ${{ github.event.pull_request.number }} package_jsons_to_rewrite: ${{ vars.PACKAGE_JSONS_TO_REWRITE }} use_external_app_to_release: ${{ vars.USE_RELEASE_APP == 'true' }} + indent: ${{ vars.INDENT }} secrets: RELEASE_APP_ID: ${{ secrets.RELEASE_APP_ID }} RELEASE_APP_PRIVATE_KEY: ${{ secrets.RELEASE_APP_PRIVATE_KEY }} From b298897bdedc988800f72798cdbf2dbcd2e994ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=8A=E3=81=95=E3=82=80=E3=81=AE=E3=81=B2=E3=81=A8?= <46447427+samunohito@users.noreply.github.com> Date: Fri, 10 May 2024 15:32:23 +0900 Subject: [PATCH 03/26] =?UTF-8?q?fix(backend):=20=E4=B8=8D=E8=A6=81?= =?UTF-8?q?=E3=81=AAUserProfile=E3=81=AE=E5=8F=96=E5=BE=97=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20(#13812)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(backend): 不要なuserProfileの取得を修正 * fix: pnpm@9.0.6 to pnpm@9.1.0 * Revert "fix: pnpm@9.0.6 to pnpm@9.1.0" This reverts commit eaf265ec2cf255cadeaa516d5b668134bc397211. --- packages/backend/src/core/entities/UserEntityService.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/backend/src/core/entities/UserEntityService.ts b/packages/backend/src/core/entities/UserEntityService.ts index df2b27d70974..d85f31a9895a 100644 --- a/packages/backend/src/core/entities/UserEntityService.ts +++ b/packages/backend/src/core/entities/UserEntityService.ts @@ -637,18 +637,17 @@ export class UserEntityService implements OnModuleInit { } const _userIds = _users.map(u => u.id); - // -- 特に前提条件のない値群を取得 - - const profilesMap = await this.userProfilesRepository.findBy({ userId: In(_userIds) }) - .then(profiles => new Map(profiles.map(p => [p.userId, p]))); - // -- 実行者の有無や指定スキーマの種別によって要否が異なる値群を取得 + let profilesMap: Map = new Map(); let userRelations: Map = new Map(); let userMemos: Map = new Map(); let pinNotes: Map = new Map(); if (options?.schema !== 'UserLite') { + profilesMap = await this.userProfilesRepository.findBy({ userId: In(_userIds) }) + .then(profiles => new Map(profiles.map(p => [p.userId, p]))); + const meId = me ? me.id : null; if (meId) { userMemos = await this.userMemosRepository.findBy({ userId: meId }) From f6af6d9679305b36dc993a310462a6065248ae1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=8A=E3=81=95=E3=82=80=E3=81=AE=E3=81=B2=E3=81=A8?= <46447427+samunohito@users.noreply.github.com> Date: Fri, 10 May 2024 15:33:25 +0900 Subject: [PATCH 04/26] =?UTF-8?q?fix(backend):=20UserEntityService.getRela?= =?UTF-8?q?tions=E3=81=AE=E5=8F=96=E5=BE=97=E5=87=A6=E7=90=86=E3=82=92?= =?UTF-8?q?=E8=BB=BD=E9=87=8F=E5=8C=96=20(#13811)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(backend): UserEntityService.getRelationsの取得処理を軽量化 * rollback --- .../src/core/entities/UserEntityService.ts | 49 +++++++++++++------ 1 file changed, 35 insertions(+), 14 deletions(-) diff --git a/packages/backend/src/core/entities/UserEntityService.ts b/packages/backend/src/core/entities/UserEntityService.ts index d85f31a9895a..b80a1ec206b4 100644 --- a/packages/backend/src/core/entities/UserEntityService.ts +++ b/packages/backend/src/core/entities/UserEntityService.ts @@ -249,20 +249,41 @@ export class UserEntityService implements OnModuleInit { ] = await Promise.all([ this.followingsRepository.findBy({ followerId: me }) .then(f => new Map(f.map(it => [it.followeeId, it]))), - this.followingsRepository.findBy({ followeeId: me }) - .then(it => it.map(it => it.followerId)), - this.followRequestsRepository.findBy({ followerId: me }) - .then(it => it.map(it => it.followeeId)), - this.followRequestsRepository.findBy({ followeeId: me }) - .then(it => it.map(it => it.followerId)), - this.blockingsRepository.findBy({ blockerId: me }) - .then(it => it.map(it => it.blockeeId)), - this.blockingsRepository.findBy({ blockeeId: me }) - .then(it => it.map(it => it.blockerId)), - this.mutingsRepository.findBy({ muterId: me }) - .then(it => it.map(it => it.muteeId)), - this.renoteMutingsRepository.findBy({ muterId: me }) - .then(it => it.map(it => it.muteeId)), + this.followingsRepository.createQueryBuilder('f') + .select('f.followerId') + .where('f.followeeId = :me', { me }) + .getRawMany<{ f_followerId: string }>() + .then(it => it.map(it => it.f_followerId)), + this.followRequestsRepository.createQueryBuilder('f') + .select('f.followeeId') + .where('f.followerId = :me', { me }) + .getRawMany<{ f_followeeId: string }>() + .then(it => it.map(it => it.f_followeeId)), + this.followRequestsRepository.createQueryBuilder('f') + .select('f.followerId') + .where('f.followeeId = :me', { me }) + .getRawMany<{ f_followerId: string }>() + .then(it => it.map(it => it.f_followerId)), + this.blockingsRepository.createQueryBuilder('b') + .select('b.blockeeId') + .where('b.blockerId = :me', { me }) + .getRawMany<{ b_blockeeId: string }>() + .then(it => it.map(it => it.b_blockeeId)), + this.blockingsRepository.createQueryBuilder('b') + .select('b.blockerId') + .where('b.blockeeId = :me', { me }) + .getRawMany<{ b_blockerId: string }>() + .then(it => it.map(it => it.b_blockerId)), + this.mutingsRepository.createQueryBuilder('m') + .select('m.muteeId') + .where('m.muterId = :me', { me }) + .getRawMany<{ m_muteeId: string }>() + .then(it => it.map(it => it.m_muteeId)), + this.renoteMutingsRepository.createQueryBuilder('m') + .select('m.muteeId') + .where('m.muterId = :me', { me }) + .getRawMany<{ m_muteeId: string }>() + .then(it => it.map(it => it.m_muteeId)), ]); return new Map( From 12ae9a2b23436732ef453c6bca5f22bbca229d2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=B5=E3=82=8B=E3=81=B5=E3=82=8B?= Date: Mon, 13 May 2024 11:19:19 +0900 Subject: [PATCH 05/26] =?UTF-8?q?feat:=20DevContainer=E3=81=ABpnpm?= =?UTF-8?q?=E3=82=92=E3=82=A4=E3=83=B3=E3=82=B9=E3=83=88=E3=83=BC=E3=83=AB?= =?UTF-8?q?=E3=81=99=E3=82=8B=E9=9A=9B=E3=80=81corepack=E3=82=92=E4=BD=BF?= =?UTF-8?q?=E3=81=86=E3=82=88=E3=81=86=E3=81=AB=E3=81=99=E3=82=8B=20(#1382?= =?UTF-8?q?1)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .devcontainer/devcontainer.json | 6 ++---- .devcontainer/init.sh | 2 ++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 182ee2fbb2cc..31b6212cb5c4 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -4,12 +4,10 @@ "service": "app", "workspaceFolder": "/workspace", "features": { - "ghcr.io/devcontainers-contrib/features/pnpm:2": { - "version": "8.9.2" - }, "ghcr.io/devcontainers/features/node:1": { "version": "20.12.2" - } + }, + "ghcr.io/devcontainers-contrib/features/corepack:1": {} }, "forwardPorts": [3000], "postCreateCommand": "sudo chmod 755 .devcontainer/init.sh && .devcontainer/init.sh", diff --git a/.devcontainer/init.sh b/.devcontainer/init.sh index bcad3e6d8527..729e1a9d2d9d 100755 --- a/.devcontainer/init.sh +++ b/.devcontainer/init.sh @@ -4,6 +4,8 @@ set -xe sudo chown -R node /workspace git submodule update --init +corepack install +corepack enable pnpm config set store-dir /home/node/.local/share/pnpm/store pnpm install --frozen-lockfile cp .devcontainer/devcontainer.yml .config/default.yml From 9b0fc317514a9c6ec8f400a317e67fdeba160e7a Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Tue, 14 May 2024 19:18:30 +0900 Subject: [PATCH 06/26] Update FUNDING.yml --- .github/FUNDING.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index c6b2a1611c49..d42b58abc09c 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,3 +1,4 @@ # These are supported funding model platforms +github: [misskey-dev] patreon: syuilo From def7b8c55e342aea855e56da634994c02f56f600 Mon Sep 17 00:00:00 2001 From: zyoshoka <107108195+zyoshoka@users.noreply.github.com> Date: Sat, 18 May 2024 12:42:26 +0900 Subject: [PATCH 07/26] fix(frontend): fix Chromatic test fails (#13826) * fix: attempt to fix Chromatic test fails * chore: add comment --- packages/frontend/src/components/MkModal.vue | 5 ++++- .../frontend/src/components/global/MkAd.stories.impl.ts | 8 +++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/frontend/src/components/MkModal.vue b/packages/frontend/src/components/MkModal.vue index eb240da75978..9e69ab2207f5 100644 --- a/packages/frontend/src/components/MkModal.vue +++ b/packages/frontend/src/components/MkModal.vue @@ -276,8 +276,11 @@ const align = () => { const onOpened = () => { emit('opened'); + // NOTE: Chromatic テストの際に undefined になる場合がある + if (content.value == null) return; + // モーダルコンテンツにマウスボタンが押され、コンテンツ外でマウスボタンが離されたときにモーダルバックグラウンドクリックと判定させないためにマウスイベントを監視しフラグ管理する - const el = content.value!.children[0]; + const el = content.value.children[0]; el.addEventListener('mousedown', ev => { contentClicking = true; window.addEventListener('mouseup', ev => { diff --git a/packages/frontend/src/components/global/MkAd.stories.impl.ts b/packages/frontend/src/components/global/MkAd.stories.impl.ts index a1d274382fa3..aef26ab92d64 100644 --- a/packages/frontend/src/components/global/MkAd.stories.impl.ts +++ b/packages/frontend/src/components/global/MkAd.stories.impl.ts @@ -11,6 +11,10 @@ import { i18n } from '@/i18n.js'; let lock: Promise | undefined; +function sleep(ms: number) { + return new Promise(resolve => setTimeout(resolve, ms)); +} + const common = { render(args) { return { @@ -43,6 +47,8 @@ const common = { lock = new Promise(r => resolve = r); try { + // NOTE: sleep しないと何故か落ちる + await sleep(100); const canvas = within(canvasElement); const a = canvas.getByRole('link'); // await expect(a.href).toMatch(/^https?:\/\/.*#test$/); @@ -53,7 +59,7 @@ const common = { const i = buttons[0]; await expect(i).toBeInTheDocument(); await userEvent.click(i); - // await expect(canvasElement).toHaveTextContent(i18n.ts._ad.back); + await expect(canvasElement).toHaveTextContent(i18n.ts._ad.back); await expect(a).not.toBeInTheDocument(); await expect(i).not.toBeInTheDocument(); buttons = canvas.getAllByRole('button'); From ba62b7378bb13b384bd9db27acb0013fb90b53b3 Mon Sep 17 00:00:00 2001 From: zyoshoka <107108195+zyoshoka@users.noreply.github.com> Date: Sat, 18 May 2024 18:52:17 +0900 Subject: [PATCH 08/26] fix(storybook): fix wrong `tabler-icons` CSS path (#13828) --- packages/frontend/.storybook/preview-head.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/frontend/.storybook/preview-head.html b/packages/frontend/.storybook/preview-head.html index 4722fe7f5f46..ae42fd49bc6a 100644 --- a/packages/frontend/.storybook/preview-head.html +++ b/packages/frontend/.storybook/preview-head.html @@ -5,7 +5,7 @@ - +