Skip to content

Commit

Permalink
Merge remote-tracking branch 'mastodon/main' into merge/mastodon-main…
Browse files Browse the repository at this point in the history
…-branch
  • Loading branch information
S-H-GAMELINKS committed Oct 21, 2024
2 parents b46c9b8 + bb05325 commit 16f1b8d
Show file tree
Hide file tree
Showing 15 changed files with 225 additions and 427 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-i18n.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ permissions:

jobs:
check-i18n:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ FROM build AS libvips

# libvips version to compile, change with [--build-arg VIPS_VERSION="8.15.2"]
# renovate: datasource=github-releases depName=libvips packageName=libvips/libvips
ARG VIPS_VERSION=8.15.3
ARG VIPS_VERSION=8.15.5
# libvips download URL, change with [--build-arg VIPS_URL="https://github.com/libvips/libvips/releases/download"]
ARG VIPS_URL=https://github.com/libvips/libvips/releases/download

Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ gem 'irb', '~> 1.8'
gem 'kaminari', '~> 1.2'
gem 'link_header', '~> 0.0'
gem 'mario-redis-lock', '~> 1.2', require: 'redis_lock'
gem 'mime-types', '~> 3.5.0', require: 'mime/types/columnar'
gem 'mime-types', '~> 3.6.0', require: 'mime/types/columnar'
gem 'nokogiri', '~> 1.15'
gem 'oj', '~> 3.15'
gem 'ox', '~> 2.14'
Expand Down
27 changes: 14 additions & 13 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -124,17 +124,17 @@ GEM
attr_required (1.0.2)
awrence (1.2.1)
aws-eventstream (1.3.0)
aws-partitions (1.983.0)
aws-sdk-core (3.209.1)
aws-partitions (1.992.0)
aws-sdk-core (3.210.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
aws-partitions (~> 1, >= 1.992.0)
aws-sigv4 (~> 1.9)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.94.0)
aws-sdk-core (~> 3, >= 3.207.0)
aws-sdk-kms (1.95.0)
aws-sdk-core (~> 3, >= 3.210.0)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.167.0)
aws-sdk-core (~> 3, >= 3.207.0)
aws-sdk-s3 (1.169.0)
aws-sdk-core (~> 3, >= 3.210.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.5)
aws-sigv4 (1.10.0)
Expand All @@ -161,7 +161,7 @@ GEM
blurhash (0.1.8)
bootsnap (1.18.4)
msgpack (~> 1.2)
brakeman (6.2.1)
brakeman (6.2.2)
racc
browser (5.3.1)
builder (3.3.0)
Expand Down Expand Up @@ -257,7 +257,7 @@ GEM
tzinfo
excon (0.111.0)
fabrication (2.31.0)
faker (3.4.2)
faker (3.5.1)
i18n (>= 1.8.11, < 2)
faraday (1.10.3)
faraday-em_http (~> 1.0)
Expand Down Expand Up @@ -459,9 +459,10 @@ GEM
azure-storage-blob (~> 2.0.1)
hashie (~> 5.0)
memory_profiler (1.1.0)
mime-types (3.5.2)
mime-types (3.6.0)
logger
mime-types-data (~> 3.2015)
mime-types-data (3.2024.0820)
mime-types-data (3.2024.1001)
mini_magick (4.13.2)
mini_mime (1.1.5)
mini_portile2 (2.8.7)
Expand Down Expand Up @@ -804,7 +805,7 @@ GEM
rubocop-rspec_rails (2.30.0)
rubocop (~> 1.61)
rubocop-rspec (~> 3, >= 3.0.1)
ruby-prof (1.7.0)
ruby-prof (1.7.1)
ruby-progressbar (1.13.0)
ruby-saml (1.17.0)
nokogiri (>= 1.13.10)
Expand Down Expand Up @@ -1038,7 +1039,7 @@ DEPENDENCIES
mastodon-spam-activity-rejecter!
md-paperclip-azure (~> 2.2)
memory_profiler
mime-types (~> 3.5.0)
mime-types (~> 3.6.0)
net-http (~> 0.4.0)
net-ldap (~> 0.18)
nokogiri (~> 1.15)
Expand Down
35 changes: 14 additions & 21 deletions app/javascript/entrypoints/public.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -327,31 +327,24 @@ Rails.delegate(document, '.input-copy button', 'click', ({ target }) => {

if (!input) return;

const oldReadOnly = input.readOnly;

input.readOnly = false;
input.focus();
input.select();
input.setSelectionRange(0, input.value.length);

try {
if (document.execCommand('copy')) {
input.blur();

navigator.clipboard
.writeText(input.value)
.then(() => {
const parent = target.parentElement;

if (!parent) return;
parent.classList.add('copied');
if (parent) {
parent.classList.add('copied');

setTimeout(() => {
parent.classList.remove('copied');
}, 700);
}
} catch (err) {
console.error(err);
}
setTimeout(() => {
parent.classList.remove('copied');
}, 700);
}

input.readOnly = oldReadOnly;
return true;
})
.catch((error: unknown) => {
console.error(error);
});
});

const toggleSidebar = () => {
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/mastodon/components/button.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { PropsWithChildren } from 'react';
import type { PropsWithChildren, JSX } from 'react';
import { useCallback } from 'react';

import classNames from 'classnames';
Expand Down
1 change: 1 addition & 0 deletions app/javascript/mastodon/components/short_number.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { memo } from 'react';
import type { JSX } from 'react';

import { FormattedMessage, FormattedNumber } from 'react-intl';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import type { JSX } from 'react';

import { FormattedMessage } from 'react-intl';

import { Link } from 'react-router-dom';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useMemo } from 'react';
import type { JSX } from 'react';

import classNames from 'classnames';

Expand Down
7 changes: 2 additions & 5 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# Show full error reports.
config.consider_all_requests_local = true

# Enable server timing
# Enable server timing.
config.server_timing = true

# Enable/disable caching. By default caching is disabled.
Expand Down Expand Up @@ -77,9 +77,6 @@
# Annotate rendered view with file names.
# config.action_view.annotate_rendered_view_with_filenames = true

# Uncomment if you wish to allow Action Cable access from any origin.
# config.action_cable.disable_request_forgery_protection = true

config.action_mailer.default_options = { from: 'notifications@localhost' }

# If using a Heroku, Vagrant or generic remote development environment,
Expand All @@ -90,7 +87,7 @@
# TODO: Remove once devise-two-factor data migration complete
config.x.otp_secret = ENV.fetch('OTP_SECRET', '1fc2b87989afa6351912abeebe31ffc5c476ead9bf8b3d74cbc4a302c7b69a45b40b1bbef3506ddad73e942e15ed5ca4b402bf9a66423626051104f4b5f05109')

# Raise error when a before_action's only/except options reference missing actions
# Raise error when a before_action's only/except options reference missing actions.
config.action_controller.raise_on_missing_callback_actions = true
end

Expand Down
12 changes: 5 additions & 7 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,14 @@
config.eager_load = true

# Full error reports are disabled and caching is turned on.
config.consider_all_requests_local = false
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
config.action_controller.asset_host = ENV['CDN_HOST'] if ENV['CDN_HOST'].present?
config.action_controller.asset_host = ENV['CDN_HOST'] if ENV['CDN_HOST'].present?

# Ensures that a master key has been made available in ENV["RAILS_MASTER_KEY"], config/master.key, or an environment
# key such as config/credentials/production.key. This key is used to decrypt credentials (and other encrypted files).
# config.require_master_key = true

# Compress CSS using a preprocessor.
# config.assets.css_compressor = :sass

# Do not fallback to assets pipeline if a precompiled asset is missed.
config.assets.compile = false

Expand All @@ -42,6 +39,7 @@

# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
config.force_ssl = true
# Skip http-to-https redirect for the default health check endpoint.
config.ssl_options = {
redirect: {
exclude: ->(request) { request.path.start_with?('/health') || request.headers['Host'].end_with?('.onion') || request.headers['Host'].end_with?('.i2p') },
Expand All @@ -60,7 +58,7 @@
config.cache_store = :redis_cache_store, REDIS_CONFIGURATION.cache

# Use a real queuing backend for Active Job (and separate queues per environment).
# config.active_job.queue_adapter = :resque
# config.active_job.queue_adapter = :resque
# config.active_job.queue_name_prefix = "mastodon_production"

config.action_mailer.perform_caching = false
Expand All @@ -70,7 +68,7 @@
# config.action_mailer.raise_delivery_errors = false

# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
# English when a translation cannot be found).
# the I18n.default_locale when a translation cannot be found).
# This setting would typically be `true` to use the `I18n.default_locale`.
# Some locales are missing translation entries and would have errors:
# https://github.com/mastodon/mastodon/pull/24727
Expand Down
6 changes: 3 additions & 3 deletions config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
config.public_file_server.enabled = true

# Show full error reports and disable caching.
config.consider_all_requests_local = true
config.consider_all_requests_local = true
config.action_controller.perform_caching = false
config.cache_store = :memory_store

# Raise exceptions instead of rendering exception templates.
# Render exception templates for rescuable exceptions and raise for other exceptions.
config.action_dispatch.show_exceptions = :rescuable

# Disable request forgery protection in test environment.
Expand Down Expand Up @@ -72,7 +72,7 @@
# Annotate rendered view with file names.
# config.action_view.annotate_rendered_view_with_filenames = true

# Raise error when a before_action's only/except options reference missing actions
# Raise error when a before_action's only/except options reference missing actions.
config.action_controller.raise_on_missing_callback_actions = true
end

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@mastodon/mastodon",
"license": "AGPL-3.0-or-later",
"packageManager": "[email protected].0",
"packageManager": "[email protected].1",
"engines": {
"node": ">=18"
},
Expand Down Expand Up @@ -183,13 +183,13 @@
"eslint-config-prettier": "^9.0.0",
"eslint-define-config": "^2.0.0",
"eslint-import-resolver-typescript": "^3.5.5",
"eslint-plugin-formatjs": "^4.10.1",
"eslint-plugin-formatjs": "^5.0.0",
"eslint-plugin-import": "~2.30.0",
"eslint-plugin-jsdoc": "^50.0.0",
"eslint-plugin-jsx-a11y": "~6.10.0",
"eslint-plugin-promise": "~7.1.0",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-hooks": "^5.0.0",
"husky": "^9.0.11",
"jest": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
Expand Down
2 changes: 1 addition & 1 deletion streaming/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@mastodon/streaming",
"license": "AGPL-3.0-or-later",
"packageManager": "[email protected].0",
"packageManager": "[email protected].1",
"engines": {
"node": ">=18"
},
Expand Down
Loading

0 comments on commit 16f1b8d

Please sign in to comment.