diff --git a/.rubocop/metrics.yml b/.rubocop/metrics.yml index 89532af42ab..bb15e6ff313 100644 --- a/.rubocop/metrics.yml +++ b/.rubocop/metrics.yml @@ -1,17 +1,21 @@ --- Metrics/AbcSize: - Exclude: - - lib/mastodon/cli/*.rb + Enabled: false Metrics/BlockLength: Enabled: false +Metrics/BlockNesting: + Enabled: false + Metrics/ClassLength: Enabled: false +Metrics/CollectionLiteralLength: + Enabled: false + Metrics/CyclomaticComplexity: - Exclude: - - lib/mastodon/cli/*.rb + Enabled: false Metrics/MethodLength: Enabled: false @@ -20,4 +24,7 @@ Metrics/ModuleLength: Enabled: false Metrics/ParameterLists: - CountKeywordArgs: false + Enabled: false + +Metrics/PerceivedComplexity: + Enabled: false diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 625fbf17ab4..68ed0ac6c8a 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -6,23 +6,6 @@ # Note that changes in the inspected code, or installation of new # versions of RuboCop, may require this file to be generated again. -# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes. -Metrics/AbcSize: - Max: 82 - -# Configuration parameters: CountBlocks, CountModifierForms, Max. -Metrics/BlockNesting: - Exclude: - - 'lib/tasks/mastodon.rake' - -# Configuration parameters: AllowedMethods, AllowedPatterns. -Metrics/CyclomaticComplexity: - Max: 25 - -# Configuration parameters: AllowedMethods, AllowedPatterns. -Metrics/PerceivedComplexity: - Max: 27 - # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: AllowedVars, DefaultToNil. Style/FetchEnvVar: diff --git a/Dockerfile b/Dockerfile index 23214c2483c..38723228547 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,11 +17,11 @@ ARG RUBY_VERSION="3.4.5" # # Node.js version to use in base image, change with [--build-arg NODE_MAJOR_VERSION="20"] # renovate: datasource=node-version depName=node ARG NODE_MAJOR_VERSION="22" -# Debian image to use for base image, change with [--build-arg DEBIAN_VERSION="bookworm"] -ARG DEBIAN_VERSION="bookworm" -# Node.js image to use for base image based on combined variables (ex: 20-bookworm-slim) +# Debian image to use for base image, change with [--build-arg DEBIAN_VERSION="trixie"] +ARG DEBIAN_VERSION="trixie" +# Node.js image to use for base image based on combined variables (ex: 20-trixie-slim) FROM ${BASE_REGISTRY}/node:${NODE_MAJOR_VERSION}-${DEBIAN_VERSION}-slim AS node -# Ruby image to use for base image based on combined variables (ex: 3.4.x-slim-bookworm) +# Ruby image to use for base image based on combined variables (ex: 3.4.x-slim-trixie) FROM ${BASE_REGISTRY}/ruby:${RUBY_VERSION}-slim-${DEBIAN_VERSION} AS ruby # Resulting version string is vX.X.X-MASTODON_VERSION_PRERELEASE+MASTODON_VERSION_METADATA @@ -96,9 +96,6 @@ RUN \ # Set /opt/mastodon as working directory WORKDIR /opt/mastodon -# Add backport repository for some specific packages where we need the latest version -RUN echo 'deb http://deb.debian.org/debian bookworm-backports main' >> /etc/apt/sources.list - # hadolint ignore=DL3008,DL3005 RUN \ # Mount Apt cache and lib directories from Docker buildx caches @@ -161,11 +158,11 @@ RUN \ libexif-dev \ libexpat1-dev \ libgirepository1.0-dev \ - libheif-dev/bookworm-backports \ + libheif-dev \ + libhwy-dev \ libimagequant-dev \ libjpeg62-turbo-dev \ liblcms2-dev \ - liborc-dev \ libspng-dev \ libtiff-dev \ libwebp-dev \ @@ -209,7 +206,7 @@ FROM build AS ffmpeg # ffmpeg version to compile, change with [--build-arg FFMPEG_VERSION="7.0.x"] # renovate: datasource=repology depName=ffmpeg packageName=openpkg_current/ffmpeg -ARG FFMPEG_VERSION=7.1 +ARG FFMPEG_VERSION=7.1.1 # ffmpeg download URL, change with [--build-arg FFMPEG_URL="https://ffmpeg.org/releases"] ARG FFMPEG_URL=https://ffmpeg.org/releases @@ -327,28 +324,28 @@ RUN \ # Apt update install non-dev versions of necessary components apt-get install -y --no-install-recommends \ libexpat1 \ - libglib2.0-0 \ - libicu72 \ + libglib2.0-0t64 \ + libicu76 \ libidn12 \ libpq5 \ - libreadline8 \ - libssl3 \ + libreadline8t64 \ + libssl3t64 \ libyaml-0-2 \ # libvips components libcgif0 \ libexif12 \ - libheif1/bookworm-backports \ + libheif1 \ + libhwy1t64 \ libimagequant0 \ libjpeg62-turbo \ liblcms2-2 \ - liborc-0.4-0 \ libspng0 \ libtiff6 \ libwebp7 \ libwebpdemux2 \ libwebpmux3 \ # ffmpeg components - libdav1d6 \ + libdav1d7 \ libmp3lame0 \ libopencore-amrnb0 \ libopencore-amrwb0 \ @@ -358,9 +355,9 @@ RUN \ libvorbis0a \ libvorbisenc2 \ libvorbisfile3 \ - libvpx7 \ + libvpx9 \ libx264-164 \ - libx265-199 \ + libx265-215 \ ; # Copy Mastodon sources into final layer diff --git a/Gemfile b/Gemfile index 7af47881b75..b6ecb0126d8 100644 --- a/Gemfile +++ b/Gemfile @@ -102,7 +102,7 @@ gem 'rdf-normalize', '~> 0.5' gem 'prometheus_exporter', '~> 2.2', require: false -gem 'opentelemetry-api', '~> 1.5.0' +gem 'opentelemetry-api', '~> 1.6.0' group :opentelemetry do gem 'opentelemetry-exporter-otlp', '~> 0.30.0', require: false diff --git a/Gemfile.lock b/Gemfile.lock index b0bf819481f..547eed1d7db 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -497,7 +497,7 @@ GEM openssl (3.3.0) openssl-signature_algorithm (1.3.0) openssl (> 2.0) - opentelemetry-api (1.5.0) + opentelemetry-api (1.6.0) opentelemetry-common (0.22.0) opentelemetry-api (~> 1.0) opentelemetry-exporter-otlp (0.30.0) @@ -589,7 +589,7 @@ GEM opentelemetry-instrumentation-base (~> 0.23.0) opentelemetry-registry (0.4.0) opentelemetry-api (~> 1.1) - opentelemetry-sdk (1.8.0) + opentelemetry-sdk (1.8.1) opentelemetry-api (~> 1.1) opentelemetry-common (~> 0.20) opentelemetry-registry (~> 0.2) @@ -625,7 +625,7 @@ GEM premailer (~> 1.7, >= 1.7.9) prettyprint (0.2.0) prism (1.4.0) - prometheus_exporter (2.2.0) + prometheus_exporter (2.3.0) webrick propshaft (1.2.1) actionpack (>= 7.0.0) @@ -688,7 +688,7 @@ GEM rails-html-sanitizer (1.6.2) loofah (~> 2.21) nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) - rails-i18n (8.0.1) + rails-i18n (8.0.2) i18n (>= 0.7, < 2) railties (>= 8.0.0, < 9) railties (8.0.2.1) @@ -806,7 +806,7 @@ GEM ruby-saml (1.18.1) nokogiri (>= 1.13.10) rexml - ruby-vips (2.2.4) + ruby-vips (2.2.5) ffi (~> 1.12) logger rubyzip (3.0.1) @@ -1025,7 +1025,7 @@ DEPENDENCIES omniauth-rails_csrf_protection (~> 1.0) omniauth-saml (~> 2.0) omniauth_openid_connect (~> 0.8.0) - opentelemetry-api (~> 1.5.0) + opentelemetry-api (~> 1.6.0) opentelemetry-exporter-otlp (~> 0.30.0) opentelemetry-instrumentation-active_job (~> 0.8.0) opentelemetry-instrumentation-active_model_serializers (~> 0.22.0) diff --git a/app/controllers/api/v1/statuses/interaction_policies_controller.rb b/app/controllers/api/v1/statuses/interaction_policies_controller.rb index 8b822185f69..b8ec4fe1400 100644 --- a/app/controllers/api/v1/statuses/interaction_policies_controller.rb +++ b/app/controllers/api/v1/statuses/interaction_policies_controller.rb @@ -28,6 +28,6 @@ class Api::V1::Statuses::InteractionPoliciesController < Api::V1::Statuses::Base def broadcast_updates! DistributionWorker.perform_async(@status.id, { 'update' => true }) - ActivityPub::StatusUpdateDistributionWorker.perform_async(@status.id) + ActivityPub::StatusUpdateDistributionWorker.perform_async(@status.id, { 'updated_at' => Time.now.utc.iso8601 }) end end diff --git a/app/javascript/mastodon/api_types/quotes.ts b/app/javascript/mastodon/api_types/quotes.ts index 981c047c136..58cce1e257a 100644 --- a/app/javascript/mastodon/api_types/quotes.ts +++ b/app/javascript/mastodon/api_types/quotes.ts @@ -2,6 +2,7 @@ import type { ApiStatusJSON } from './statuses'; export type ApiQuoteState = 'accepted' | 'pending' | 'revoked' | 'unauthorized'; export type ApiQuotePolicy = 'public' | 'followers' | 'nobody' | 'unknown'; +export type ApiUserQuotePolicy = 'automatic' | 'manual' | 'denied' | 'unknown'; interface ApiQuoteEmptyJSON { state: Exclude; @@ -25,7 +26,7 @@ export type ApiQuoteJSON = ApiQuoteAcceptedJSON | ApiQuoteEmptyJSON; export interface ApiQuotePolicyJSON { automatic: ApiQuotePolicy[]; manual: ApiQuotePolicy[]; - current_user: ApiQuotePolicy; + current_user: ApiUserQuotePolicy; } export function isQuotePolicy(policy: string): policy is ApiQuotePolicy { diff --git a/app/javascript/mastodon/components/autosuggest_textarea.jsx b/app/javascript/mastodon/components/autosuggest_textarea.jsx index c7ec3779f3f..de5accc4b28 100644 --- a/app/javascript/mastodon/components/autosuggest_textarea.jsx +++ b/app/javascript/mastodon/components/autosuggest_textarea.jsx @@ -53,6 +53,7 @@ const AutosuggestTextarea = forwardRef(({ onFocus, autoFocus = true, lang, + className, }, textareaRef) => { const [suggestionsHidden, setSuggestionsHidden] = useState(true); @@ -192,7 +193,7 @@ const AutosuggestTextarea = forwardRef(({ }; return ( -
+