From 0290a9dd1fee2de7fd9e0abe41179261443051d2 Mon Sep 17 00:00:00 2001 From: lindwurm Date: Sat, 4 May 2024 01:03:10 +0900 Subject: [PATCH] fix2 Signed-off-by: lindwurm --- .github/actions/setup-javascript/action.yml | 42 ----- .github/actions/setup-ruby/action.yml | 23 --- .github/codecov.yml | 11 -- .github/renovate.json5 | 150 ------------------ .github/workflows/format-check.yml | 18 --- .../mastodon/components/account.jsx | 1 + 6 files changed, 1 insertion(+), 244 deletions(-) delete mode 100644 .github/actions/setup-javascript/action.yml delete mode 100644 .github/actions/setup-ruby/action.yml delete mode 100644 .github/codecov.yml delete mode 100644 .github/renovate.json5 delete mode 100644 .github/workflows/format-check.yml diff --git a/.github/actions/setup-javascript/action.yml b/.github/actions/setup-javascript/action.yml deleted file mode 100644 index 808adc7de64f96..00000000000000 --- a/.github/actions/setup-javascript/action.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: 'Setup Javascript' -description: 'Setup a Javascript environment ready to run the Mastodon code' -inputs: - onlyProduction: - description: Only install production dependencies - default: 'false' - -runs: - using: 'composite' - steps: - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version-file: '.nvmrc' - - # The following is needed because we can not use `cache: true` for `setup-node`, as it does not support Corepack yet and mess up with the cache location if ran after Node is installed - - name: Enable corepack - shell: bash - run: corepack enable - - - name: Get yarn cache directory path - id: yarn-cache-dir-path - shell: bash - run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT - - - uses: actions/cache@v4 - id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) - with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - - - name: Install all yarn packages - shell: bash - run: yarn install --immutable - if: inputs.onlyProduction == 'false' - - - name: Install all production yarn packages - shell: bash - run: yarn workspaces focus --production - if: inputs.onlyProduction != 'false' diff --git a/.github/actions/setup-ruby/action.yml b/.github/actions/setup-ruby/action.yml deleted file mode 100644 index 3a6fba940201a7..00000000000000 --- a/.github/actions/setup-ruby/action.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: 'Setup RUby' -description: 'Setup a Ruby environment ready to run the Mastodon code' -inputs: - ruby-version: - description: The Ruby version to install - default: '.ruby-version' - additional-system-dependencies: - description: 'Additional packages to install' - -runs: - using: 'composite' - steps: - - name: Install system dependencies - shell: bash - run: | - sudo apt-get update - sudo apt-get install -y libicu-dev libidn11-dev ${{ inputs.additional-system-dependencies }} - - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ inputs.ruby-version }} - bundler-cache: true diff --git a/.github/codecov.yml b/.github/codecov.yml deleted file mode 100644 index 9d6413a10617e2..00000000000000 --- a/.github/codecov.yml +++ /dev/null @@ -1,11 +0,0 @@ -comment: false # Do not leave PR comments -coverage: - status: - project: - default: - # Github status check is not blocking - informational: true - patch: - default: - # Github status check is not blocking - informational: true diff --git a/.github/renovate.json5 b/.github/renovate.json5 deleted file mode 100644 index e92608a43711ed..00000000000000 --- a/.github/renovate.json5 +++ /dev/null @@ -1,150 +0,0 @@ -{ - $schema: 'https://docs.renovatebot.com/renovate-schema.json', - extends: [ - 'config:recommended', - ':labels(dependencies)', - ':prConcurrentLimitNone', // Remove limit for open PRs at any time. - ':prHourlyLimit2', // Rate limit PR creation to a maximum of two per hour. - ], - minimumReleaseAge: '3', // Wait 3 days after the package has been published before upgrading it - // packageRules order is important, they are applied from top to bottom and are merged, - // meaning the most important ones must be at the bottom, for example grouping rules - // If we do not want a package to be grouped with others, we need to set its groupName - // to `null` after any other rule set it to something. - dependencyDashboardHeader: 'This issue lists Renovate updates and detected dependencies. Read the [Dependency Dashboard](https://docs.renovatebot.com/key-concepts/dashboard/) docs to learn more. Before approving any upgrade: read the description and comments in the [`renovate.json5` file](https://github.com/mastodon/mastodon/blob/main/.github/renovate.json5).', - postUpdateOptions: ['yarnDedupeHighest'], - packageRules: [ - { - // Require Dependency Dashboard Approval for major version bumps of these node packages - matchManagers: ['npm'], - matchPackageNames: [ - 'tesseract.js', // Requires code changes - 'react-hotkeys', // Requires code changes - - // Requires Webpacker upgrade or replacement - '@svgr/webpack', - '@types/webpack', - 'babel-loader', - 'compression-webpack-plugin', - 'css-loader', - 'imports-loader', - 'mini-css-extract-plugin', - 'postcss-loader', - 'sass-loader', - 'terser-webpack-plugin', - 'webpack', - 'webpack-assets-manifest', - 'webpack-bundle-analyzer', - 'webpack-dev-server', - 'webpack-cli', - - // react-router: Requires manual upgrade - 'history', - 'react-router-dom', - ], - matchUpdateTypes: ['major'], - dependencyDashboardApproval: true, - }, - { - // Require Dependency Dashboard Approval for major version bumps of these Ruby packages - matchManagers: ['bundler'], - matchPackageNames: [ - 'rack', // Needs to be synced with Rails version - 'strong_migrations', // Requires manual upgrade - 'sidekiq', // Requires manual upgrade - 'sidekiq-unique-jobs', // Requires manual upgrades and sync with Sidekiq version - 'redis', // Requires manual upgrade and sync with Sidekiq version - ], - matchUpdateTypes: ['major'], - dependencyDashboardApproval: true, - }, - { - // Update Github Actions and Docker images weekly - matchManagers: ['github-actions', 'dockerfile', 'docker-compose'], - extends: ['schedule:weekly'], - }, - { - // Require Dependency Dashboard Approval for major & minor bumps for the ruby image, this needs to be synced with .ruby-version - matchManagers: ['dockerfile'], - matchPackageNames: ['moritzheiber/ruby-jemalloc'], - matchUpdateTypes: ['minor', 'major'], - dependencyDashboardApproval: true, - }, - { - // Require Dependency Dashboard Approval for major bumps for the node image, this needs to be synced with .nvmrc - matchManagers: ['dockerfile'], - matchPackageNames: ['node'], - matchUpdateTypes: ['major'], - dependencyDashboardApproval: true, - }, - { - // Require Dependency Dashboard Approval for major postgres bumps in the docker-compose file, as those break dev environments - matchManagers: ['docker-compose'], - matchPackageNames: ['postgres'], - matchUpdateTypes: ['major'], - dependencyDashboardApproval: true, - }, - { - // Update devDependencies every week, with one grouped PR - matchDepTypes: 'devDependencies', - matchUpdateTypes: ['patch', 'minor'], - groupName: 'devDependencies (non-major)', - extends: ['schedule:weekly'], - }, - { - // Group all eslint-related packages with `eslint` in the same PR - matchManagers: ['npm'], - matchPackageNames: ['eslint'], - matchPackagePrefixes: ['eslint-', '@typescript-eslint/'], - matchUpdateTypes: ['patch', 'minor'], - groupName: 'eslint (non-major)', - }, - { - // Group actions/*-artifact in the same PR - matchManagers: ['github-actions'], - matchPackageNames: [ - 'actions/download-artifact', - 'actions/upload-artifact', - ], - matchUpdateTypes: ['major'], - groupName: 'artifact actions (major)', - }, - { - // Update @types/* packages every week, with one grouped PR - matchPackagePrefixes: '@types/', - matchUpdateTypes: ['patch', 'minor'], - groupName: 'DefinitelyTyped types (non-major)', - extends: ['schedule:weekly'], - addLabels: ['typescript'], - }, - { - // We want those packages to always have their own PR - matchManagers: ['npm'], - matchPackageNames: [ - 'typescript', // Typescript has code-impacting changes in minor versions - ], - groupName: null, // We dont want them to belong to any group - }, - { - // Group all RuboCop packages with `rubocop` in the same PR - matchManagers: ['bundler'], - matchPackageNames: ['rubocop'], - matchPackagePrefixes: ['rubocop-'], - matchUpdateTypes: ['patch', 'minor'], - groupName: 'RuboCop (non-major)', - }, - { - // Group all RSpec packages with `rspec` in the same PR - matchManagers: ['bundler'], - matchPackageNames: ['rspec'], - matchPackagePrefixes: ['rspec-'], - matchUpdateTypes: ['patch', 'minor'], - groupName: 'RSpec (non-major)', - }, - // Add labels depending on package manager - { matchManagers: ['npm', 'nvm'], addLabels: ['javascript'] }, - { matchManagers: ['bundler', 'ruby-version'], addLabels: ['ruby'] }, - { matchManagers: ['docker-compose', 'dockerfile'], addLabels: ['docker'] }, - { matchManagers: ['github-actions'], addLabels: ['github_actions'] }, - ], -} diff --git a/.github/workflows/format-check.yml b/.github/workflows/format-check.yml deleted file mode 100644 index 2d483b50229626..00000000000000 --- a/.github/workflows/format-check.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Check formatting -on: - push: - pull_request: - -jobs: - lint: - runs-on: ubuntu-latest - - steps: - - name: Clone repository - uses: actions/checkout@v4 - - - name: Set up Javascript environment - uses: ./.github/actions/setup-javascript - - - name: Check formatting with Prettier - run: yarn format:check diff --git a/app/javascript/mastodon/components/account.jsx b/app/javascript/mastodon/components/account.jsx index d6c499ba74f6d5..0bd7fa0a7512ab 100644 --- a/app/javascript/mastodon/components/account.jsx +++ b/app/javascript/mastodon/components/account.jsx @@ -5,6 +5,7 @@ import { defineMessages, useIntl, FormattedMessage } from 'react-intl'; import classNames from 'classnames'; import Permalink from './permalink'; +import { Link } from 'react-router-dom'; import ImmutablePropTypes from 'react-immutable-proptypes';