diff --git a/.config/docker_example.env b/.config/docker_example.env index 2797c2f807..3774d86d1c 100644 --- a/.config/docker_example.env +++ b/.config/docker_example.env @@ -2,3 +2,4 @@ POSTGRES_PASSWORD=example-cherrypick-pass POSTGRES_USER=example-cherrypick-user POSTGRES_DB=cherrypick +DATABASE_URL="postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}" diff --git a/.config/example.yml b/.config/example.yml index 5ad6ae0fef..39f1322131 100644 --- a/.config/example.yml +++ b/.config/example.yml @@ -2,6 +2,63 @@ # CherryPick configuration #━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +# ┌──────────────────────────────┐ +#───┘ a boring but important thing └──────────────────────────── + +# +# First of all, let me tell you a story that may possibly be +# boring to you and possibly important to you. +# +# CherryPick is licensed under the AGPLv3 license. This license is +# known to be often misunderstood. Please read the following +# instructions carefully and select the appropriate option so +# that you do not negligently cause a license violation. +# + +# -------- +# Option 1: If you host CherryPick AS-IS (without any changes to +# the source code. forks are not included). +# +# Step 1: Congratulations! You don't need to do anything. + +# -------- +# Option 2: If you have made changes to the source code (forks +# are included) and publish a Git repository of source +# code. There should be no access restrictions on +# this repository. Strictly speaking, it doesn't have +# to be a Git repository, but you'll probably use Git! +# +# Step 1: Build and run the CherryPick server first. +# Step 2: Open in +# your browser with the administrator account. +# Step 3: Enter the URL of your Git repository in the +# "Repository URL" field. + +# -------- +# Option 3: If neither of the above applies to you. +# (In this case, the source code should be published +# on the CherryPick interface. IT IS NOT ENOUGH TO +# DISCLOSE THE SOURCE CODE WEHN A USER REQUESTS IT BY +# E-MAIL OR OTHER MEANS. If you are not satisfied +# with this, it is recommended that you read the +# license again carefully. Anyway, enabling this +# option will automatically generate and publish a +# tarball at build time, protecting you from +# inadvertent license violations. (There is no legal +# guarantee, of course.) The tarball will generated +# from the root directory of your codebase. So it is +# also recommended to check directory +# once after building and before activating the server +# to avoid ACCIDENTAL LEAKING OF SENSITIVE INFORMATION. +# To prevent certain files from being included in the +# tarball, add a glob pattern after line 15 in +# . DO NOT FORGET TO BUILD AFTER +# ENABLING THIS OPTION!) +# +# Step 1: Uncomment the following line. +# +# publishTarballInsteadOfProvideRepositoryUrl: true + # ┌─────┐ #───┘ URL └───────────────────────────────────────────────────── @@ -118,7 +175,7 @@ redis: # ┌───────────────────────────┐ #───┘ MeiliSearch configuration └───────────────────────────── -# You can set scope to local (default value) or global +# You can set scope to local (default value) or global # (include notes from remote). #meilisearch: @@ -160,14 +217,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 @@ -223,7 +280,7 @@ proxyRemoteFiles: true signToActivityPubGet: true # For security reasons, uploading attachments from the intranet is prohibited, -# but exceptions can be made from the following settings. Default value is "undefined". +# but exceptions can be made from the following settings. Default value is "undefined". # Read changelog to learn more (Improvements of 12.90.0 (2021/09/04)). #allowedPrivateNetworks: [ # '127.0.0.1/32' diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 5955f6b5d9..d4678ec5e0 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -17,16 +17,32 @@ updates: directory: "/" schedule: interval: daily - # PNPM has an issue with dependabot. See: - # https://github.com/dependabot/dependabot-core/issues/7258 - # https://github.com/pnpm/pnpm/issues/6530 - # TODO: Restore this when the issue is solved - open-pull-requests-limit: 0 + open-pull-requests-limit: 10 + # List dependencies required to be updated together, sharing the same version numbers. + # Those who simply have the common owner (e.g. @fastify) don't need to be listed. groups: - swc: + aws-sdk: patterns: - - "@swc/*" + - "@aws-sdk/*" + bull-board: + patterns: + - "@bull-board/*" + nestjs: + patterns: + - "@nestjs/*" + slacc: + patterns: + - "slacc-*" storybook: patterns: - "storybook*" - "@storybook/*" + swc-core: + patterns: + - "@swc/core*" + typescript-eslint: + patterns: + - "@typescript-eslint/*" + tensorflow: + patterns: + - "@tensorflow/*" diff --git a/.github/workflows/api-cherrypick-js.yml b/.github/workflows/api-cherrypick-js.yml index 39bd0ad311..ac97dd43ec 100644 --- a/.github/workflows/api-cherrypick-js.yml +++ b/.github/workflows/api-cherrypick-js.yml @@ -1,6 +1,12 @@ name: API report (cherrypick.js) -on: [push, pull_request] +on: + push: + paths: + - packages/cherrypick-js/** + pull_request: + paths: + - packages/cherrypick-js/** jobs: report: @@ -14,7 +20,7 @@ jobs: - run: corepack enable - name: Setup Node.js - uses: actions/setup-node@v4.0.1 + uses: actions/setup-node@v4.0.2 with: node-version-file: '.node-version' cache: 'pnpm' diff --git a/.github/workflows/changelog-check.yml b/.github/workflows/changelog-check.yml new file mode 100644 index 0000000000..f254af0d1f --- /dev/null +++ b/.github/workflows/changelog-check.yml @@ -0,0 +1,43 @@ +name: Check the description in CHANGELOG.md + +on: + pull_request: + branches: + - master + - develop + +jobs: + check-changelog: + runs-on: ubuntu-latest + + steps: + - name: Checkout head + uses: actions/checkout@v4.1.1 + - name: Setup Node.js + uses: actions/setup-node@v4.0.2 + with: + node-version-file: '.node-version' + + - name: Checkout base + run: | + mkdir _base + cp -r .git _base/.git + cd _base + git fetch --depth 1 origin ${{ github.base_ref }} + git checkout origin/${{ github.base_ref }} CHANGELOG.md + + - name: Copy to Checker directory for CHANGELOG-base.md + run: cp _base/CHANGELOG.md scripts/changelog-checker/CHANGELOG-base.md + - name: Copy to Checker directory for CHANGELOG-head.md + run: cp CHANGELOG.md scripts/changelog-checker/CHANGELOG-head.md + - name: diff + continue-on-error: true + run: diff -u CHANGELOG-base.md CHANGELOG-head.md + working-directory: scripts/changelog-checker + + - name: Setup Checker + run: npm install + working-directory: scripts/changelog-checker + - name: Run Checker + run: npm run run + working-directory: scripts/changelog-checker diff --git a/.github/workflows/check-cherrypick-js-autogen.yml b/.github/workflows/check-cherrypick-js-autogen.yml new file mode 100644 index 0000000000..285eb1ea28 --- /dev/null +++ b/.github/workflows/check-cherrypick-js-autogen.yml @@ -0,0 +1,134 @@ +name: Check CherryPick JS autogen + +on: + pull_request_target: + branches: + - master + - develop + paths: + - packages/backend/** + +jobs: + check-cherrypick-js-autogen: + runs-on: ubuntu-latest + permissions: + pull-requests: write + + env: + api_json_name: "api-head.json" + + steps: + - name: checkout + uses: actions/checkout@v4.1.1 + with: + submodules: true + ref: ${{ github.event.pull_request.head.sha }} + + - name: setup pnpm + uses: pnpm/action-setup@v3 + with: + version: 8 + + - name: setup node + id: setup-node + uses: actions/setup-node@v4.0.2 + with: + node-version-file: '.node-version' + cache: pnpm + + - name: install dependencies + run: pnpm i --frozen-lockfile + + - name: wait get-api-diff + uses: lewagon/wait-on-check-action@v1.3.3 + with: + ref: ${{ github.event.pull_request.head.sha }} + check-regexp: get-from-cherrypick .+ + repo-token: ${{ secrets.GITHUB_TOKEN }} + wait-interval: 30 + + - name: Download artifact + uses: actions/github-script@v7.0.1 + with: + script: | + const fs = require('fs'); + + const workflows = await github.rest.actions.listWorkflowRunsForRepo({ + owner: context.repo.owner, + repo: context.repo.repo, + head_sha: `${{ github.event.pull_request.head.sha }}` + }).then(x => x.data.workflow_runs); + + console.log(workflows.map(x => ({name: x.name, title: x.display_title}))); + + const run_id = workflows.find(x => x.name.includes("Get api.json from CherryPick")).id; + + let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({ + owner: context.repo.owner, + repo: context.repo.repo, + run_id: run_id, + }); + + let matchArtifacts = allArtifacts.data.artifacts.filter((artifact) => { + return artifact.name.startsWith("api-artifact-") || artifact.name == "api-artifact" + }); + + await Promise.all(matchArtifacts.map(async (artifact) => { + let download = await github.rest.actions.downloadArtifact({ + owner: context.repo.owner, + repo: context.repo.repo, + artifact_id: artifact.id, + archive_format: 'zip', + }); + await fs.promises.writeFile(`${process.env.GITHUB_WORKSPACE}/${artifact.name}.zip`, Buffer.from(download.data)); + })); + + - name: unzip artifacts + run: |- + 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/cherrypick-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: |- + checksum=$(realpath ${api_json_name}_checksum) + mv $api_json_name packages/cherrypick-js/generator/api.json + + cd packages/cherrypick-js/generator + pnpm run generate + 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 head_checksum ${api_json_name}_checksum + + - name: send message + if: failure() + uses: thollander/actions-comment-pull-request@v2 + with: + comment_tag: check-cherrypick-js-autogen + message: |- + Thank you for sending us a great Pull Request! 👍 + Please regenerate cherrypick-js type definitions! 🙏 + + example: + ```sh + pnpm run build-cherrypick-js-with-types + ``` + + - name: send message + if: success() + uses: thollander/actions-comment-pull-request@v2 + with: + comment_tag: check-cherrypick-js-autogen + mode: delete + message: "Thank you!" + create_if_not_exists: false diff --git a/.github/workflows/check-misskey-js-version.yml b/.github/workflows/check-misskey-js-version.yml new file mode 100644 index 0000000000..1d74845e47 --- /dev/null +++ b/.github/workflows/check-misskey-js-version.yml @@ -0,0 +1,28 @@ +name: Check CherryPick JS version + +on: + push: + branches: [ develop ] + paths: + - packages/cherrypick-js/package.json + - package.json + pull_request: + branches: [ develop ] + paths: + - packages/cherrypick-js/package.json + - package.json + +jobs: + check-version: + # ルートの package.json と packages/cherrypick-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/cherrypick-js/package.json)" ]; then + echo "Version mismatch!" + exit 1 + fi diff --git a/.github/workflows/deploy-test-environment.yml b/.github/workflows/deploy-test-environment.yml new file mode 100644 index 0000000000..77cdcfaf88 --- /dev/null +++ b/.github/workflows/deploy-test-environment.yml @@ -0,0 +1,87 @@ +name: deploy-test-environment + +on: + issue_comment: + types: [created] + workflow_dispatch: + inputs: + repository: + 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, 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: + 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: + is-allowed-user: ${{ steps.check-allowed-users.outputs.is-allowed-user }} + pr-ref: ${{ steps.get-ref.outputs.pr-ref }} + wait_time: ${{ steps.get-wait-time.outputs.wait_time }} + steps: + - name: Checkout + uses: actions/checkout@v4.1.1 + + - name: Check allowed users + id: check-allowed-users + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + ORG_ID: ${{ github.repository_owner_id }} + COMMENT_AUTHOR: ${{ github.event.comment.user.login }} + run: | + MEMBERSHIP_STATUS=$(curl -s -H "Authorization: Bearer $GITHUB_TOKEN" \ + -H "Accept: application/vnd.github+json" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/organizations/$ORG_ID/public_members/$COMMENT_AUTHOR" \ + -o /dev/null -w '%{http_code}\n' -s) + if [ "$MEMBERSHIP_STATUS" -eq 204 ]; then + echo "is-allowed-user=true" > $GITHUB_OUTPUT + else + echo "is-allowed-user=false" > $GITHUB_OUTPUT + fi + + - name: Get PR ref + id: get-ref + env: + GH_TOKEN: ${{ secrets.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 + env: + COMMENT_BODY: ${{ github.event.comment.body }} + run: | + 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 + if: needs.get-pr-ref.outputs.is-allowed-user == 'true' + 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: ${{ 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 }} diff --git a/.github/workflows/docker-develop.yml b/.github/workflows/docker-develop.yml index 860100d277..ba537eadc7 100644 --- a/.github/workflows/docker-develop.yml +++ b/.github/workflows/docker-develop.yml @@ -6,10 +6,20 @@ on: - develop workflow_dispatch: +env: + REGISTRY_IMAGE: noridev/cherrypick + jobs: - push_to_registry: - name: Push Docker image to Docker Hub + # see https://docs.docker.com/build/ci/github-actions/multi-platform/#distribute-build-across-multiple-runners + build: + name: Build runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + platform: + - linux/amd64 + - linux/arm64 if: github.repository == 'kokonect-link/cherrypick' steps: - name: Free Disk Space @@ -23,32 +33,67 @@ jobs: haskell: true large-packages: true swap-storage: true + - name: Prepare + run: | + platform=${{ matrix.platform }} + echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV - name: Check out the repo uses: actions/checkout@v4.1.1 - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v3.0.0 - with: - platforms: linux/amd64,linux/arm64 - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: noridev/cherrypick + uses: docker/setup-buildx-action@v3 - name: Log in to Docker Hub uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - - name: Build and Push to Docker Hub + - name: Build and push by digest + id: build uses: docker/build-push-action@v5 with: - builder: ${{ steps.buildx.outputs.name }} context: . push: true - platforms: ${{ steps.buildx.outputs.platforms }} + platforms: ${{ matrix.platform }} provenance: false - tags: noridev/cherrypick:develop labels: develop cache-from: type=gha cache-to: type=gha,mode=max + outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true + - name: Export digest + run: | + mkdir -p /tmp/digests + digest="${{ steps.build.outputs.digest }}" + touch "/tmp/digests/${digest#sha256:}" + - name: Upload digest + uses: actions/upload-artifact@v4 + with: + name: digests-${{ env.PLATFORM_PAIR }} + path: /tmp/digests/* + if-no-files-found: error + retention-days: 1 + + merge: + runs-on: ubuntu-latest + needs: + - build + steps: + - name: Download digests + uses: actions/download-artifact@v4 + with: + path: /tmp/digests + pattern: digests-* + merge-multiple: true + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Create manifest list and push + working-directory: /tmp/digests + run: | + docker buildx imagetools create --tag ${{ env.REGISTRY_IMAGE }}:develop \ + $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *) + - name: Inspect image + run: | + docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:develop diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 0bd12cb2c5..c2f1901c98 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -5,11 +5,27 @@ on: types: [published] workflow_dispatch: -jobs: - push_to_registry: - name: Push Docker image to Docker Hub - runs-on: ubuntu-latest +env: + REGISTRY_IMAGE: noridev/cherrypick + TAGS: | + type=edge + type=ref,event=pr + type=ref,event=branch + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} +jobs: + # see https://docs.docker.com/build/ci/github-actions/multi-platform/#distribute-build-across-multiple-runners + build: + name: Build + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + platform: + - linux/amd64 + - linux/arm64 steps: - name: Free Disk Space uses: jlumbroso/free-disk-space@main @@ -22,39 +38,79 @@ jobs: haskell: true large-packages: true swap-storage: true + - name: Prepare + run: | + platform=${{ matrix.platform }} + echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV - name: Check out the repo uses: actions/checkout@v4.1.1 - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v3.0.0 - with: - platforms: linux/amd64,linux/arm64 + uses: docker/setup-buildx-action@v3 - name: Docker meta id: meta uses: docker/metadata-action@v5 with: - images: noridev/cherrypick - tags: | - type=edge - type=ref,event=pr - type=ref,event=branch - type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} - type=semver,pattern={{major}} + images: ${{ env.REGISTRY_IMAGE }} + tags: ${{ env.TAGS }} - name: Log in to Docker Hub uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Build and Push to Docker Hub + id: build uses: docker/build-push-action@v5 with: - builder: ${{ steps.buildx.outputs.name }} context: . push: true - platforms: ${{ steps.buildx.outputs.platforms }} + platforms: ${{ matrix.platform }} provenance: false - tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max + outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true + - name: Export digest + run: | + mkdir -p /tmp/digests + digest="${{ steps.build.outputs.digest }}" + touch "/tmp/digests/${digest#sha256:}" + - name: Upload digest + uses: actions/upload-artifact@v4 + with: + name: digests-${{ env.PLATFORM_PAIR }} + path: /tmp/digests/* + if-no-files-found: error + retention-days: 1 + + merge: + runs-on: ubuntu-latest + needs: + - build + steps: + - name: Download digests + uses: actions/download-artifact@v4 + with: + path: /tmp/digests + pattern: digests-* + merge-multiple: true + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY_IMAGE }} + tags: ${{ env.TAGS }} + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Create manifest list and push + working-directory: /tmp/digests + run: | + docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ + $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *) + - name: Inspect image + run: | + docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }} diff --git a/.github/workflows/get-api-diff.yml b/.github/workflows/get-api-diff.yml index f16123ad79..4d83d269e1 100644 --- a/.github/workflows/get-api-diff.yml +++ b/.github/workflows/get-api-diff.yml @@ -32,12 +32,12 @@ 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 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4.0.1 + uses: actions/setup-node@v4.0.2 with: node-version: ${{ matrix.node-version }} cache: 'pnpm' diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 00fb665278..fc51a8d5f7 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -5,7 +5,19 @@ on: branches: - master - develop + paths: + - packages/backend/** + - packages/frontend/** + - packages/sw/** + - packages/cherrypick-js/** + - packages/shared/.eslintrc.js pull_request: + paths: + - packages/backend/** + - packages/frontend/** + - packages/sw/** + - packages/cherrypick-js/** + - packages/shared/.eslintrc.js jobs: pnpm_install: @@ -15,11 +27,11 @@ jobs: with: fetch-depth: 0 submodules: true - - uses: pnpm/action-setup@v2 + - uses: pnpm/action-setup@v3 with: version: 8 run_install: false - - uses: actions/setup-node@v4.0.1 + - uses: actions/setup-node@v4.0.2 with: node-version-file: '.node-version' cache: 'pnpm' @@ -42,11 +54,11 @@ jobs: with: fetch-depth: 0 submodules: true - - uses: pnpm/action-setup@v2 + - uses: pnpm/action-setup@v3 with: version: 7 run_install: false - - uses: actions/setup-node@v4.0.1 + - uses: actions/setup-node@v4.0.2 with: node-version-file: '.node-version' cache: 'pnpm' @@ -68,11 +80,11 @@ jobs: with: fetch-depth: 0 submodules: true - - uses: pnpm/action-setup@v2 + - uses: pnpm/action-setup@v3 with: version: 7 run_install: false - - uses: actions/setup-node@v4.0.1 + - uses: actions/setup-node@v4.0.2 with: node-version-file: '.node-version' cache: 'pnpm' @@ -80,4 +92,6 @@ jobs: - run: pnpm i --frozen-lockfile - run: pnpm --filter cherrypick-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 diff --git a/.github/workflows/ok-to-test.yml b/.github/workflows/ok-to-test.yml index c02b980e4d..8362c006eb 100644 --- a/.github/workflows/ok-to-test.yml +++ b/.github/workflows/ok-to-test.yml @@ -23,7 +23,7 @@ jobs: private_key: ${{ secrets.DEPLOYBOT_PRIVATE_KEY }} - name: Slash Command Dispatch - uses: peter-evans/slash-command-dispatch@v3 + uses: peter-evans/slash-command-dispatch@v4 env: TOKEN: ${{ steps.generate_token.outputs.token }} with: diff --git a/.github/workflows/on-release-created.yml b/.github/workflows/on-release-created.yml new file mode 100644 index 0000000000..e95cb0169d --- /dev/null +++ b/.github/workflows/on-release-created.yml @@ -0,0 +1,45 @@ +name: On Release Created (Publish cherrypick-js) + +on: + release: + types: [created] + + workflow_dispatch: + +jobs: + publish-cherrypick-js: + name: Publish cherrypick-js + runs-on: ubuntu-latest + + permissions: + contents: read + id-token: write + + strategy: + matrix: + node-version: [20.10.0] + + steps: + - uses: actions/checkout@v4.1.1 + with: + submodules: true + - name: Install pnpm + uses: pnpm/action-setup@v3 + with: + version: 8 + run_install: false + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4.0.2 + 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 cherrypick-js publish --access public --no-git-checks --provenance + env: + NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} + NPM_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} diff --git a/.github/workflows/pr-preview-deploy.yml b/.github/workflows/pr-preview-deploy.yml index bb503055e9..28fcb87063 100644 --- a/.github/workflows/pr-preview-deploy.yml +++ b/.github/workflows/pr-preview-deploy.yml @@ -13,7 +13,7 @@ jobs: github.event.client_payload.slash_command.sha != '' && contains(github.event.client_payload.pull_request.head.sha, github.event.client_payload.slash_command.sha) steps: - - uses: actions/github-script@v7 + - uses: actions/github-script@v7.0.1 id: check-id env: number: ${{ github.event.client_payload.pull_request.number }} @@ -37,7 +37,7 @@ jobs: return check[0].id; - - uses: actions/github-script@v7 + - uses: actions/github-script@v7.0.1 env: check_id: ${{ steps.check-id.outputs.result }} details_url: ${{ github.server_url }}/${{ github.repository }}/runs/${{ github.run_id }} @@ -72,7 +72,7 @@ jobs: timeout: 15m # Update check run called "integration-fork" - - uses: actions/github-script@v7 + - uses: actions/github-script@v7.0.1 id: update-check-run if: ${{ always() }} env: diff --git a/.github/workflows/pr-preview-destroy.yml b/.github/workflows/pr-preview-destroy.yml index 45a1b88bbe..d2ad02b9ef 100644 --- a/.github/workflows/pr-preview-destroy.yml +++ b/.github/workflows/pr-preview-destroy.yml @@ -10,7 +10,7 @@ jobs: destroy-preview-environment: runs-on: ubuntu-latest steps: - - uses: actions/github-script@v7 + - uses: actions/github-script@v7.0.1 id: check-conclusion env: number: ${{ github.event.number }} diff --git a/.github/workflows/report-api-diff.yml b/.github/workflows/report-api-diff.yml index 2c7df3fc7b..7ec2aae3ce 100644 --- a/.github/workflows/report-api-diff.yml +++ b/.github/workflows/report-api-diff.yml @@ -16,7 +16,7 @@ jobs: # api-artifact steps: - name: Download artifact - uses: actions/github-script@v7 + uses: actions/github-script@v7.0.1 with: script: | const fs = require('fs'); diff --git a/.github/workflows/storybook.yml b/.github/workflows/storybook.yml new file mode 100644 index 0000000000..245a9495da --- /dev/null +++ b/.github/workflows/storybook.yml @@ -0,0 +1,113 @@ +name: Storybook + +on: + push: + branches: + - master + - develop + - dev/storybook8 # for testing + pull_request_target: + +jobs: + build: + runs-on: ubuntu-latest + + env: + NODE_OPTIONS: "--max_old_space_size=7168" + + steps: + - uses: actions/checkout@v4.1.1 + if: github.event_name != 'pull_request_target' + with: + fetch-depth: 0 + submodules: true + - uses: actions/checkout@v4.1.1 + if: github.event_name == 'pull_request_target' + with: + fetch-depth: 0 + submodules: true + ref: "refs/pull/${{ github.event.number }}/merge" + - name: Checkout actual HEAD + if: github.event_name == 'pull_request_target' + id: rev + run: | + echo "base=$(git rev-list --parents -n1 HEAD | cut -d" " -f2)" >> $GITHUB_OUTPUT + git checkout $(git rev-list --parents -n1 HEAD | cut -d" " -f3) + - name: Install pnpm + uses: pnpm/action-setup@v3 + with: + version: 8 + run_install: false + - name: Use Node.js 20.x + uses: actions/setup-node@v4.0.2 + with: + node-version-file: '.node-version' + cache: 'pnpm' + - run: corepack enable + - run: pnpm i --frozen-lockfile + - name: Check pnpm-lock.yaml + run: git diff --exit-code pnpm-lock.yaml + - name: Build cherrypick-js + run: pnpm --filter cherrypick-js build + - name: Build storybook + run: pnpm --filter frontend build-storybook + - name: Publish to Chromatic + if: github.event_name != 'pull_request_target' && github.ref == 'refs/heads/master' + run: pnpm --filter frontend chromatic --exit-once-uploaded -d storybook-static + env: + CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} + - name: Publish to Chromatic + if: github.event_name != 'pull_request_target' && github.ref != 'refs/heads/master' + id: chromatic_push + run: | + DIFF="${{ github.event.before }} HEAD" + if [ "$DIFF" = "0000000000000000000000000000000000000000 HEAD" ]; then + DIFF="HEAD" + fi + CHROMATIC_PARAMETER="$(node packages/frontend/.storybook/changes.js $(git diff-tree --no-commit-id --name-only -r $(echo "$DIFF") | xargs))" + if [ "$CHROMATIC_PARAMETER" = " --skip" ]; then + echo "skip=true" >> $GITHUB_OUTPUT + fi + if pnpm --filter frontend chromatic -d storybook-static $(echo "$CHROMATIC_PARAMETER"); then + echo "success=true" >> $GITHUB_OUTPUT + else + echo "success=false" >> $GITHUB_OUTPUT + fi + env: + CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} + - name: Publish to Chromatic + if: github.event_name == 'pull_request_target' + id: chromatic_pull_request + run: | + DIFF="${{ steps.rev.outputs.base }} HEAD" + if [ "$DIFF" = "0000000000000000000000000000000000000000 HEAD" ]; then + DIFF="HEAD" + fi + CHROMATIC_PARAMETER="$(node packages/frontend/.storybook/changes.js $(git diff-tree --no-commit-id --name-only -r $(echo "$DIFF") | xargs))" + if [ "$CHROMATIC_PARAMETER" = " --skip" ]; then + echo "skip=true" >> $GITHUB_OUTPUT + fi + BRANCH="${{ github.event.pull_request.head.user.login }}:${{ github.event.pull_request.head.ref }}" + if [ "$BRANCH" = "kokonect-link:${{ github.event.pull_request.head.ref }}" ]; then + BRANCH="${{ github.event.pull_request.head.ref }}" + fi + pnpm --filter frontend chromatic --exit-once-uploaded -d storybook-static --branch-name $BRANCH $(echo "$CHROMATIC_PARAMETER") + env: + CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} + - name: Notify that Chromatic detects changes + uses: actions/github-script@v7.0.1 + if: github.event_name != 'pull_request_target' && steps.chromatic_push.outputs.success == 'false' + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + github.rest.repos.createCommitComment({ + owner: context.repo.owner, + repo: context.repo.repo, + commit_sha: context.sha, + body: 'Chromatic detects changes. Please [review the changes on Chromatic](https://www.chromatic.com/builds?appId=6428f7d7b962f0b79f97d6e4).' + }) + - name: Upload Artifacts + uses: actions/upload-artifact@v4 + with: + name: storybook + path: packages/frontend/storybook-static diff --git a/.github/workflows/test-backend.yml b/.github/workflows/test-backend.yml index a465883a0d..faea72cef1 100644 --- a/.github/workflows/test-backend.yml +++ b/.github/workflows/test-backend.yml @@ -5,10 +5,18 @@ on: branches: - master - develop + paths: + - packages/backend/** + # for permissions + - packages/cherrypick-js/** pull_request: + paths: + - packages/backend/** + # for permissions + - packages/cherrypick-js/** jobs: - jest: + unit: runs-on: ubuntu-latest strategy: @@ -33,12 +41,12 @@ jobs: with: submodules: true - name: Install pnpm - uses: pnpm/action-setup@v2 + uses: pnpm/action-setup@v3 with: version: 8 run_install: false - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4.0.1 + uses: actions/setup-node@v4.0.2 with: node-version: ${{ matrix.node-version }} cache: 'pnpm' @@ -51,9 +59,59 @@ jobs: - name: Build run: pnpm build - name: Test - run: pnpm jest-and-coverage - - name: Upload Coverage - uses: codecov/codecov-action@v3 + run: pnpm --filter backend test-and-coverage + - name: Upload to Codecov + uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} files: ./packages/backend/coverage/coverage-final.json + + e2e: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [20.10.0] + + services: + postgres: + image: postgres:15 + ports: + - 54312:5432 + env: + POSTGRES_DB: test-cherrypick + POSTGRES_HOST_AUTH_METHOD: trust + redis: + image: redis:7 + ports: + - 56312:6379 + + steps: + - uses: actions/checkout@v4.1.1 + with: + submodules: true + - name: Install pnpm + uses: pnpm/action-setup@v3 + with: + version: 8 + run_install: false + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ matrix.node-version }} + cache: 'pnpm' + - run: corepack enable + - run: pnpm i --frozen-lockfile + - name: Check pnpm-lock.yaml + run: git diff --exit-code pnpm-lock.yaml + - name: Copy Configure + run: cp .github/cherrypick/test.yml .config + - name: Build + run: pnpm build + - name: Test + run: pnpm --filter backend test-and-coverage:e2e + - name: Upload to Codecov + uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: ./packages/backend/coverage/coverage-final.json diff --git a/.github/workflows/test-cherrypick-js.yml b/.github/workflows/test-cherrypick-js.yml index f693f0355d..6bbbd83890 100644 --- a/.github/workflows/test-cherrypick-js.yml +++ b/.github/workflows/test-cherrypick-js.yml @@ -6,8 +6,12 @@ name: Test (cherrypick.js) on: push: branches: [ develop ] + paths: + - packages/cherrypick-js/** pull_request: branches: [ develop ] + paths: + - packages/cherrypick-js/** jobs: test: @@ -26,7 +30,7 @@ jobs: - run: corepack enable - name: Setup Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4.0.1 + uses: actions/setup-node@v4.0.2 with: node-version: ${{ matrix.node-version }} cache: 'pnpm' @@ -46,7 +50,7 @@ jobs: CI: true - name: Upload Coverage - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} files: ./packages/cherrypick-js/coverage/coverage-final.json diff --git a/.github/workflows/test-frontend.yml b/.github/workflows/test-frontend.yml index ab96fb5c28..38cf3b8606 100644 --- a/.github/workflows/test-frontend.yml +++ b/.github/workflows/test-frontend.yml @@ -5,7 +5,20 @@ on: branches: - master - develop + paths: + - packages/frontend/** + # for permissions + - packages/cherrypick-js/** + # for e2e + - packages/backend/** + pull_request: + paths: + - packages/frontend/** + # for permissions + - packages/cherrypick-js/** + # for e2e + - packages/backend/** jobs: vitest: @@ -20,12 +33,12 @@ jobs: with: submodules: true - name: Install pnpm - uses: pnpm/action-setup@v2 + uses: pnpm/action-setup@v3 with: version: 8 run_install: false - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4.0.1 + uses: actions/setup-node@v4.0.2 with: node-version: ${{ matrix.node-version }} cache: 'pnpm' @@ -40,7 +53,7 @@ jobs: - name: Test run: pnpm --filter frontend test-and-coverage - name: Upload Coverage - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} files: ./packages/frontend/coverage/coverage-final.json @@ -78,12 +91,12 @@ 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 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4.0.1 + uses: actions/setup-node@v4.0.2 with: node-version: ${{ matrix.node-version }} cache: 'pnpm' @@ -102,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 diff --git a/.github/workflows/test-production.yml b/.github/workflows/test-production.yml index 91f348600b..92bd28633e 100644 --- a/.github/workflows/test-production.yml +++ b/.github/workflows/test-production.yml @@ -23,12 +23,12 @@ jobs: with: submodules: true - name: Install pnpm - uses: pnpm/action-setup@v2 + uses: pnpm/action-setup@v3 with: version: 8 run_install: false - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4.0.1 + uses: actions/setup-node@v4.0.2 with: node-version: ${{ matrix.node-version }} cache: 'pnpm' diff --git a/.github/workflows/validate-api-json.yml b/.github/workflows/validate-api-json.yml new file mode 100644 index 0000000000..36ed8d273f --- /dev/null +++ b/.github/workflows/validate-api-json.yml @@ -0,0 +1,47 @@ +name: Test (backend) + +on: + push: + branches: + - master + - develop + paths: + - packages/backend/** + pull_request: + paths: + - packages/backend/** + +jobs: + validate-api-json: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [20.10.0] + + steps: + - uses: actions/checkout@v4.1.1 + with: + submodules: true + - name: Install pnpm + uses: pnpm/action-setup@v3 + with: + version: 8 + run_install: false + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ matrix.node-version }} + cache: 'pnpm' + - name: Install Redocly CLI + run: npm i -g @redocly/cli + - run: corepack enable + - run: pnpm i --frozen-lockfile + - name: Check pnpm-lock.yaml + run: git diff --exit-code pnpm-lock.yaml + - name: Copy Configure + run: cp .config/example.yml .config/default.yml + - name: Build and generate + run: pnpm build && pnpm --filter backend generate-api-json + - name: Validation + run: npx @redocly/cli lint --extends=minimal ./packages/backend/built/api.json diff --git a/.gitignore b/.gitignore index 74a0bb3c04..dec419f229 100644 --- a/.gitignore +++ b/.gitignore @@ -41,6 +41,7 @@ docker-compose.yml # cherrypick /build built +built-test /data /.cache-loader /db @@ -57,6 +58,7 @@ api-docs.json ormconfig.json temp /packages/frontend/src/**/*.stories.ts +tsdoc-metadata.json # blender backups *.blend1 diff --git a/CHANGELOG.md b/CHANGELOG.md index 87b25078c5..6bd93080f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ +## 202x.x.x (unreleased) + +### General + +### Client +- Enhance: ノート作成画面のファイル添付メニューの区切り線の位置を調整 +- Fix: syuilo/misskeyの時代からあるインスタンスが改変されたバージョンであると誤認識される問題 +- Fix: MFMのオートコンプリートが出るべき状況で出ないことがある問題を修正 +- Fix: チャートのラベルが消えている問題を修正 +- Fix: 画面表示後最初の音声再生が爆音になることがある問題を修正 + +### Server +- Fix: nodeinfoにenableMcaptchaとenableTurnstileが無いのを修正 + +## 2024.2.0 + +### Note +- 外部サイトからプラグインをインストールする場合のパスが`/install-extentions`から`/install-extensions`に変わります。以前のパスからは自動でリダイレクトされるようになっていますが、新しいパスに変更することをお勧めします。 + +### General +- Feat: [mCaptcha](https://github.com/mCaptcha/mCaptcha)のサポートを追加 +- Feat: Add support for TrueMail +- Feat: AGPLv3ライセンスに誤って違反するのを防止する機能を追加 + - 管理者がrepositoryUrlを変更したり、またはソースコードを直接頒布することを選択できるようになります + - 本体のソースコードに改変を加えた際に、ライセンスに基づく適切な案内を表示します +- Enhance: モデレーターはすべてのユーザーのリアクション一覧を見られるように +- Fix: リストライムラインの「リノートを表示」が正しく機能しない問題を修正 +- Fix: リモートユーザーのリアクション一覧がすべて見えてしまうのを修正 + * すべてのリモートユーザーのリアクション一覧を見えないようにします +- Fix: 特定のキーワード及び正規表現にマッチする文字列を含むノートが投稿された際、エラーに出来るような設定項目を追加 #13207 + * デフォルトは空欄なので適用前と同等の動作になります + +### Client +- Feat: 新しいゲームを追加 +- Feat: 音声・映像プレイヤーを追加 +- Feat: 絵文字の詳細ダイアログを追加 +- Feat: 枠線をつけるMFM`$[border.width=1,style=solid,color=fff,radius=0 ...]`を追加 + - デフォルトで枠線からはみ出る部分が隠されるようにしました。初期と同じ挙動にするには`$[border.noclip`が必要です +- Feat: スワイプでタブを切り替えられるように +- Enhance: MFM等のコードブロックに全文コピー用のボタンを追加 +- Enhance: ハッシュタグ入力時に、本文の末尾の行に何も書かれていない場合は新たにスペースを追加しないように +- Enhance: チャンネルノートのピン留めをノートのメニューからできるように +- Enhance: 管理者の場合はAPI tokenの発行画面で管理機能に関する権限を付与できるように +- Enhance: AiScriptを0.17.0に更新 [CHANGELOG](https://github.com/aiscript-dev/aiscript/blob/bb89d132b633a622d3cb0eff0d0cc7e476c0cfdd/CHANGELOG.md) + - 配列の範囲外・非整数のインデックスへの代入が完全禁止になるので注意 +- Enhance: 絵文字ピッカー・オートコンプリートで、完全一致した絵文字を優先的に表示するように +- Enhance: Playの説明欄にMFMを使えるように +- Enhance: チャンネルノートの場合は詳細ページからその前後のノートを見れるように +- Enhance: 季節に応じた画面の演出を南半球でも利用できるように +- Enhance: タイムラインフィルターの設定をすべて保持できるように + - 今までの「TLに他の人への返信を含める」設定は一旦リセットされます +- Enhance: タイムラインフィルターに「センシティブなファイルを含むノートを表示」を追加 +- Enhance: ノート作成画面のファイル添付メニューから直接ファイルを削除できるように +- Enhance: MFMの属性でオートコンプリートが使用できるように #12735 +- Enhance: 絵文字編集ダイアログをモーダルではなくウィンドウで表示するように +- Enhance: リモートのユーザーはメニューから直接リモートで表示できるように +- Enhance: リモートへの引用リノートと同一のリンクにはリンクプレビューを表示しないように +- Enhance: コードのシンタックスハイライトにテーマを適用できるように +- Enhance: リアクション権限がない場合、ハートにフォールバックするのではなくリアクションピッカーなどから打てないように + - リモートのユーザーにローカルのみのカスタム絵文字をリアクションしようとした場合 + - センシティブなリアクションを認めていないユーザーにセンシティブなカスタム絵文字をリアクションしようとした場合 + - ロールが必要な絵文字をリアクションしようとした場合 +- Enhance: ページ遷移時にPlayerを閉じるように +- Enhance: 通報ページのユーザをクリックした際にユーザをウィンドウで開くように +- Enhance: ノートの通報時にリモートのノートであっても自インスタンスにおけるノートのリンクを含むように +- Enhance: オフライン表示のデザインを改善・多言語対応 +- Fix: ネイティブモードの絵文字がモノクロにならないように +- Fix: v2023.12.0で追加された「モデレーターがユーザーのアイコンもしくはバナー画像を未設定状態にできる機能」が管理画面上で正しく表示されていない問題を修正 +- Fix: AiScriptの`readline`関数が不正な値を返すことがある問題のv2023.12.0時点での修正がPlay以外に適用されていないのを修正 +- Fix: v2023.12.1で追加された`$[clickable ...]`および`onClickEv`が正しく機能していないのを修正 +- Fix: Renoteのキーボードショートカットが機能していなかった問題を修正 +- Fix: 投稿フォームでアンケートの日時指定をした状態で再読み込みをすると期日が復元されない問題を修正 +- Fix: アンケートを設定したノートを「削除して編集」をするとアンケートの期日が引き継がれず、リセットされてしまう問題を修正 +- Fix: デッキのプロファイル作成時に名前を空にできる問題を修正 +- Fix: テーマ作成時に名称が空欄でも作成できてしまう問題を修正 +- Fix: プラグインで`Plugin:register_note_post_interruptor`を使用すると、ノートが投稿できなくなる問題を修正 +- Fix: iOSで大きな画像を変換してアップロードできない問題を修正 +- Fix: 「アニメーション画像を再生しない」もしくは「データセーバー(アイコン)」を有効にしていても、アイコンデコレーションのアニメーションが停止されない問題を修正 +- Fix: 画像をクロップするとクロップ後の解像度が異様に低くなる問題の修正 +- Fix: 画像をクロップ時、正常に完了できない問題の修正 +- Fix: キャプションが空の画像をクロップするとキャプションにnullという文字列が入ってしまう問題の修正 +- Fix: プロフィールを編集してもリロードするまで反映されない問題を修正 +- Fix: エラー画像URLを設定した後解除すると,デフォルトの画像が表示されない問題の修正 +- Fix: MkCodeEditorで行がずれていってしまう問題の修正 +- Fix: Summaly proxy利用時にプレイヤーが動作しないことがあるのを修正 #13196 + +### Server +- Enhance: 連合先のレートリミットを超過した際にリトライするようになりました +- Enhance: ActivityPub Deliver queueでBodyを事前処理するように (#12916) +- Enhance: クリップをエクスポートできるように +- Enhance: `/files`のファイルに対してHTTP Rangeリクエストを行えるように +- Enhance: `api.json`のOpenAPI Specificationを3.1.0に更新 +- Enhance: 連合向けのノート配信を軽量化 #13192 +- Fix: `drive/files/update`でファイル名のバリデーションが機能していない問題を修正 +- Fix: `notes/create`で、`text`が空白文字のみで構成されているか`null`であって、かつ`text`だけであるリクエストに対するレスポンスが400になるように変更 +- Fix: `notes/create`で、`text`が空白文字のみで構成されていてかつリノート、ファイルまたは投票を含んでいるリクエストに対するレスポンスの`text`が`""`から`null`になるように変更 +- Fix: ipv4とipv6の両方が利用可能な環境でallowedPrivateNetworksが設定されていた場合プライベートipの検証ができていなかった問題を修正 +- Fix: properly handle cc followers +- Fix: ジョブに関する設定の名前を修正 relashionshipJobPerSec -> relationshipJobPerSec +- Fix: コントロールパネル->モデレーション->「誰でも新規登録できるようにする」の初期値をONからOFFに変更 #13122 +- Fix: リモートユーザーが復活してもキャッシュにより該当ユーザーのActivityが受け入れられないのを修正 #13273 ## 2023.12.2 ### General - v2023.12.1でDockerを利用してサーバーを起動できない問題を修正 +### Client +- Enhance: 検索画面においてEnterキー押下で検索できるように + ## 2023.12.1 ### Note @@ -124,7 +228,6 @@ - Fix: WebKitブラウザー上でも「デバイスの画面を常にオンにする」機能が効くように - Fix: ページ一覧ページの表示がモバイル環境において崩れているのを修正 - Fix: MFMでルビの中のテキストがnyaizeされない問題を修正 -- Enhance: 検索画面においてEnterキー押下で検索できるように ### Server - Enhance: MFM `$[ruby ]` が他ソフトウェアと連合されるように diff --git a/CHANGELOG_CHERRYPICK.md b/CHANGELOG_CHERRYPICK.md index 15f28deb5d..d7b4e58856 100644 --- a/CHANGELOG_CHERRYPICK.md +++ b/CHANGELOG_CHERRYPICK.md @@ -1,8 +1,8 @@ diff --git a/packages/frontend/src/components/MkFileCaptionEditWindow.vue b/packages/frontend/src/components/MkFileCaptionEditWindow.vue index e1fb94a41a..9956ff0408 100644 --- a/packages/frontend/src/components/MkFileCaptionEditWindow.vue +++ b/packages/frontend/src/components/MkFileCaptionEditWindow.vue @@ -1,5 +1,5 @@ @@ -11,7 +11,7 @@ SPDX-License-Identifier: AGPL-3.0-only :withOkButton="true" :okButtonDisabled="false" @ok="ok()" - @close="dialog.close()" + @close="dialog?.close()" @closed="emit('closed')" > @@ -48,6 +48,6 @@ const caption = ref(props.default); async function ok() { emit('done', caption.value); - dialog.value.close(); + dialog.value?.close(); } diff --git a/packages/frontend/src/components/MkFileListForAdmin.vue b/packages/frontend/src/components/MkFileListForAdmin.vue index 9171cddbf6..f938203fc0 100644 --- a/packages/frontend/src/components/MkFileListForAdmin.vue +++ b/packages/frontend/src/components/MkFileListForAdmin.vue @@ -1,5 +1,5 @@ @@ -7,7 +7,7 @@ SPDX-License-Identifier: AGPL-3.0-only
@@ -9,7 +9,9 @@ SPDX-License-Identifier: AGPL-3.0-only

{{ flash.title }}

-

{{ flash.summary.length > 85 ? flash.summary.slice(0, 85) + '…' : flash.summary }}

+

+ +