Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upstream 20231116 #291

Merged
merged 55 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
0d14fce
Change link previews to keep original URL from the status (#27312)
Gargron Nov 13, 2023
da4f370
Fix Jest config (#27834)
renchap Nov 13, 2023
3b989e4
Update dependency rails to v7.1.2 (#27812)
renovate[bot] Nov 13, 2023
a7117bb
Update dependency @rails/ujs to v7.1.2 (#27811)
renovate[bot] Nov 13, 2023
e5a7b73
New Crowdin Translations (automated) (#27815)
github-actions[bot] Nov 13, 2023
5bca5c4
Update formatjs monorepo (#27823)
renovate[bot] Nov 13, 2023
07a4059
Add support for invite codes in the registration API (#27805)
ClearlyClaire Nov 13, 2023
ed79713
Fix modal content not being selectable (#27813)
pajowu Nov 13, 2023
0c98a9d
Update devDependencies (non-major) (#25612)
renovate[bot] Nov 13, 2023
a36b59b
Spec coverage for `api/v1/trends` controllers (#27837)
mjankowski Nov 13, 2023
7e3c10d
Add icons for private and disabled boost in web UI (#27817)
Gargron Nov 13, 2023
a1b4846
Update DefinitelyTyped types (non-major) (#27830)
renovate[bot] Nov 13, 2023
da59407
Update eslint (non-major) (#27831)
renovate[bot] Nov 13, 2023
0945e25
Add `Api::V1::Statuses::BaseController` base controller class (#27794)
mjankowski Nov 13, 2023
49ba5a9
Use `hash_including` to check `AccountFilter` setup in `admin/account…
mjankowski Nov 13, 2023
bac9e0b
Add variable delay before link verification of remote account links (…
ClearlyClaire Nov 13, 2023
b7807f3
Use `normalizes` to prepare `Webhook#events` value (#27605)
mjankowski Nov 13, 2023
0704829
Merge remote-tracking branch 'parent/main' into upstream-20231116
kmycode Nov 14, 2023
4aa06cb
Fix "Hide these posts from home" list setting not refreshing when swi…
brianholley Nov 14, 2023
f5d0190
Fix schema
kmycode Nov 14, 2023
5e2ecc7
Remove double `subject` in api/v1/accounts/relationships spec (#27839)
mjankowski Nov 14, 2023
373aa95
Update formatjs monorepo (#27849)
renovate[bot] Nov 14, 2023
1f8173a
Extract private methods in api/v1/instances/domain_blocks (#27844)
mjankowski Nov 14, 2023
c1e071f
New Crowdin Translations (automated) (#27848)
github-actions[bot] Nov 14, 2023
4eb4e8b
Update Yarn to v4.0.2 (#27851)
renovate[bot] Nov 14, 2023
d562fb8
Specs for minimal CSP policy in `Api::` controllers (#27845)
mjankowski Nov 14, 2023
b2c5b20
Fix `RSpec/AnyInstance` cop (#27810)
mjankowski Nov 14, 2023
7e1a77e
Add base class for `api/v1/timelines/*` controllers (#27840)
mjankowski Nov 14, 2023
2b038b4
Added Thai diacritics and tone marks in HASHTAG_INVALID_CHARS_RE (#26…
ppnplus Nov 14, 2023
35b9749
Update dependency webpack-bundle-analyzer to v4.10.0 (#27852)
renovate[bot] Nov 14, 2023
36d7d17
Add CodeCov for Ruby coverage reports (#23868)
nschonni Nov 14, 2023
15b2d7e
Split streaming server from web server (#24702)
ThisIsMissEm Nov 14, 2023
998f068
Update Yarn to v4.0.2 (#27857)
renovate[bot] Nov 14, 2023
24371d6
Merge remote-tracking branch 'parent/main' into upstream-20231116
kmycode Nov 15, 2023
9ba8d8f
Follow parent change
kmycode Nov 15, 2023
7c72944
Use `Lcov` simplecov formatter on CI and `HTML` elsewhere (#27859)
mjankowski Nov 15, 2023
b6f2910
Improve codecov config (#27860)
renchap Nov 15, 2023
5d75799
Update dependency axios to v1.6.2 (#27861)
renovate[bot] Nov 15, 2023
922f086
Fix open status on media modal (#27867)
tribela Nov 15, 2023
d807412
New Crowdin Translations (automated) (#27866)
github-actions[bot] Nov 15, 2023
d67bd44
Add profile setup to onboarding in web UI (#27829)
Gargron Nov 15, 2023
fe58ac8
Improve spec coverage for `api/web/push_subscriptions` controller (#2…
mjankowski Nov 15, 2023
12a5b73
Add spec for well known change password endpoint (#27856)
mjankowski Nov 15, 2023
bd575a1
Add banner for forwarded reports made by remote users about remote co…
ClearlyClaire Nov 15, 2023
3de9145
Move controller specs for `well-known` endpoints to request specs (#2…
mjankowski Nov 15, 2023
04121bd
Disable simplecov `enable_coverage_for_eval` option, move to standalo…
mjankowski Nov 15, 2023
91a05f3
Update libretranslate/libretranslate Docker tag to v1.5.2 (#27716)
renovate[bot] Nov 16, 2023
669a715
Update dependency webpack-bundle-analyzer to v4.10.1 (#27885)
renovate[bot] Nov 16, 2023
c1f93de
Reduce expectations for `RSpec/MultipleExpectations` cop in `controll…
mjankowski Nov 16, 2023
3f0c156
Reduce expectations for `RSpec/MultipleExpectations` cop in `api/v1/a…
mjankowski Nov 16, 2023
8a28541
Reduce expectations for `RSpec/MultipleExpectations` cop in `MoveWork…
mjankowski Nov 16, 2023
7232d47
New Crowdin Translations (automated) (#27884)
github-actions[bot] Nov 16, 2023
87696ea
Add prominent share/copy button on profiles in web UI (#27865)
Gargron Nov 16, 2023
c94bedf
Use container queries to hide profile share button (#27889)
ClearlyClaire Nov 16, 2023
236fc2a
Merge remote-tracking branch 'parent/main' into upstream-20231116
kmycode Nov 16, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ services:
hard: -1

libretranslate:
image: libretranslate/libretranslate:v1.4.1
image: libretranslate/libretranslate:v1.5.2
restart: unless-stopped
volumes:
- lt-data:/home/libretranslate/.local
Expand Down
13 changes: 13 additions & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
coverage:
status:
project:
default:
# Github status check is not blocking
informational: true
patch:
default:
# Github status check is not blocking
informational: true
comment:
# Only write a comment in PR if there are changes
require_changes: true
8 changes: 7 additions & 1 deletion .github/workflows/test-ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
DB_HOST: localhost
DB_USER: postgres
DB_PASS: postgres
DISABLE_SIMPLECOV: true
DISABLE_SIMPLECOV: ${{ matrix.ruby-version != '.ruby-version' }}
RAILS_ENV: test
ALLOW_NOPAM: true
PAM_ENABLED: true
Expand Down Expand Up @@ -138,6 +138,12 @@ jobs:

- run: bin/rspec

- name: Upload coverage reports to Codecov
if: matrix.ruby-version == '.ruby-version'
uses: codecov/codecov-action@v3
with:
files: coverage/lcov/mastodon.lcov

test-e2e:
name: End to End testing
runs-on: ubuntu-latest
Expand Down
17 changes: 0 additions & 17 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,23 +41,6 @@ Metrics/CyclomaticComplexity:
Metrics/PerceivedComplexity:
Max: 27

RSpec/AnyInstance:
Exclude:
- 'spec/controllers/activitypub/inboxes_controller_spec.rb'
- 'spec/controllers/admin/accounts_controller_spec.rb'
- 'spec/controllers/admin/resets_controller_spec.rb'
- 'spec/controllers/auth/sessions_controller_spec.rb'
- 'spec/controllers/settings/two_factor_authentication/confirmations_controller_spec.rb'
- 'spec/controllers/settings/two_factor_authentication/recovery_codes_controller_spec.rb'
- 'spec/lib/request_spec.rb'
- 'spec/lib/status_filter_spec.rb'
- 'spec/models/account_spec.rb'
- 'spec/models/setting_spec.rb'
- 'spec/services/activitypub/process_collection_service_spec.rb'
- 'spec/validators/follow_limit_validator_spec.rb'
- 'spec/workers/activitypub/delivery_worker_spec.rb'
- 'spec/workers/web/push_notification_worker_spec.rb'

# Configuration parameters: CountAsOne.
RSpec/ExampleLength:
Max: 22
Expand Down
22 changes: 22 additions & 0 deletions .simplecov
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# frozen_string_literal: true

if ENV['CI']
require 'simplecov-lcov'
SimpleCov::Formatter::LcovFormatter.config.report_with_single_file = true
SimpleCov.formatter = SimpleCov::Formatter::LcovFormatter
else
SimpleCov.formatter = SimpleCov::Formatter::HTMLFormatter
end

SimpleCov.start 'rails' do
enable_coverage :branch

add_filter 'lib/linter'

add_group 'Libraries', 'lib'
add_group 'Policies', 'app/policies'
add_group 'Presenters', 'app/presenters'
add_group 'Serializers', 'app/serializers'
add_group 'Services', 'app/services'
add_group 'Validators', 'app/validators'
end
3 changes: 3 additions & 0 deletions .watchmanconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"ignore_dirs": ["node_modules/", "public/"]
}
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ group :test do

# Coverage formatter for RSpec test if DISABLE_SIMPLECOV is false
gem 'simplecov', '~> 0.22', require: false
gem 'simplecov-lcov', '~> 0.8', require: false

# Stub web requests for specs
gem 'webmock', '~> 3.18'
Expand Down
123 changes: 63 additions & 60 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -39,50 +39,51 @@ GIT
GEM
remote: https://rubygems.org/
specs:
actioncable (7.1.1)
actionpack (= 7.1.1)
activesupport (= 7.1.1)
actioncable (7.1.2)
actionpack (= 7.1.2)
activesupport (= 7.1.2)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
zeitwerk (~> 2.6)
actionmailbox (7.1.1)
actionpack (= 7.1.1)
activejob (= 7.1.1)
activerecord (= 7.1.1)
activestorage (= 7.1.1)
activesupport (= 7.1.1)
actionmailbox (7.1.2)
actionpack (= 7.1.2)
activejob (= 7.1.2)
activerecord (= 7.1.2)
activestorage (= 7.1.2)
activesupport (= 7.1.2)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.1.1)
actionpack (= 7.1.1)
actionview (= 7.1.1)
activejob (= 7.1.1)
activesupport (= 7.1.1)
actionmailer (7.1.2)
actionpack (= 7.1.2)
actionview (= 7.1.2)
activejob (= 7.1.2)
activesupport (= 7.1.2)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.2)
actionpack (7.1.1)
actionview (= 7.1.1)
activesupport (= 7.1.1)
actionpack (7.1.2)
actionview (= 7.1.2)
activesupport (= 7.1.2)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
actiontext (7.1.1)
actionpack (= 7.1.1)
activerecord (= 7.1.1)
activestorage (= 7.1.1)
activesupport (= 7.1.1)
actiontext (7.1.2)
actionpack (= 7.1.2)
activerecord (= 7.1.2)
activestorage (= 7.1.2)
activesupport (= 7.1.2)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.1.1)
activesupport (= 7.1.1)
actionview (7.1.2)
activesupport (= 7.1.2)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
Expand All @@ -92,22 +93,22 @@ GEM
activemodel (>= 4.1)
case_transform (>= 0.2)
jsonapi-renderer (>= 0.1.1.beta1, < 0.3)
activejob (7.1.1)
activesupport (= 7.1.1)
activejob (7.1.2)
activesupport (= 7.1.2)
globalid (>= 0.3.6)
activemodel (7.1.1)
activesupport (= 7.1.1)
activerecord (7.1.1)
activemodel (= 7.1.1)
activesupport (= 7.1.1)
activemodel (7.1.2)
activesupport (= 7.1.2)
activerecord (7.1.2)
activemodel (= 7.1.2)
activesupport (= 7.1.2)
timeout (>= 0.4.0)
activestorage (7.1.1)
actionpack (= 7.1.1)
activejob (= 7.1.1)
activerecord (= 7.1.1)
activesupport (= 7.1.1)
activestorage (7.1.2)
actionpack (= 7.1.2)
activejob (= 7.1.2)
activerecord (= 7.1.2)
activesupport (= 7.1.2)
marcel (~> 1.0)
activesupport (7.1.1)
activesupport (7.1.2)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
Expand Down Expand Up @@ -218,7 +219,7 @@ GEM
activerecord (>= 5.a)
database_cleaner-core (~> 2.0.0)
database_cleaner-core (2.0.1)
date (3.3.3)
date (3.3.4)
debug_inspector (1.1.0)
devise (4.9.3)
bcrypt (~> 3.0)
Expand Down Expand Up @@ -369,7 +370,7 @@ GEM
terminal-table (>= 1.5.1)
idn-ruby (0.1.5)
io-console (0.6.0)
irb (1.8.1)
irb (1.8.3)
rdoc
reline (>= 0.3.8)
jmespath (1.6.2)
Expand Down Expand Up @@ -462,13 +463,13 @@ GEM
uri
net-http-persistent (4.0.2)
connection_pool (~> 2.2)
net-imap (0.4.1)
net-imap (0.4.4)
date
net-protocol
net-ldap (0.18.0)
net-pop (0.1.2)
net-protocol
net-protocol (0.2.1)
net-protocol (0.2.2)
timeout
net-smtp (0.4.0)
net-protocol
Expand Down Expand Up @@ -526,7 +527,7 @@ GEM
net-smtp
premailer (~> 1.7, >= 1.7.9)
private_address_check (0.5.0)
psych (5.1.1)
psych (5.1.1.1)
stringio
public_suffix (5.0.3)
puma (6.4.0)
Expand Down Expand Up @@ -557,20 +558,20 @@ GEM
rackup (1.0.0)
rack (< 3)
webrick
rails (7.1.1)
actioncable (= 7.1.1)
actionmailbox (= 7.1.1)
actionmailer (= 7.1.1)
actionpack (= 7.1.1)
actiontext (= 7.1.1)
actionview (= 7.1.1)
activejob (= 7.1.1)
activemodel (= 7.1.1)
activerecord (= 7.1.1)
activestorage (= 7.1.1)
activesupport (= 7.1.1)
rails (7.1.2)
actioncable (= 7.1.2)
actionmailbox (= 7.1.2)
actionmailer (= 7.1.2)
actionpack (= 7.1.2)
actiontext (= 7.1.2)
actionview (= 7.1.2)
activejob (= 7.1.2)
activemodel (= 7.1.2)
activerecord (= 7.1.2)
activestorage (= 7.1.2)
activesupport (= 7.1.2)
bundler (>= 1.15.0)
railties (= 7.1.1)
railties (= 7.1.2)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
actionview (>= 5.0.1.rc1)
Expand All @@ -585,9 +586,9 @@ GEM
rails-i18n (7.0.8)
i18n (>= 0.7, < 2)
railties (>= 6.0.0, < 8)
railties (7.1.1)
actionpack (= 7.1.1)
activesupport (= 7.1.1)
railties (7.1.2)
actionpack (= 7.1.2)
activesupport (= 7.1.2)
irb
rackup (>= 1.0.0)
rake (>= 12.2)
Expand Down Expand Up @@ -726,6 +727,7 @@ GEM
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov-lcov (0.8.0)
simplecov_json_formatter (0.1.4)
smart_properties (1.17.0)
sprockets (3.7.2)
Expand All @@ -739,7 +741,7 @@ GEM
statsd-ruby (1.5.0)
stoplight (3.0.2)
redlock (~> 1.0)
stringio (3.0.8)
stringio (3.0.9)
strong_migrations (1.6.4)
activerecord (>= 5.2)
swd (1.3.0)
Expand All @@ -755,7 +757,7 @@ GEM
test-prof (1.2.3)
thor (1.3.0)
tilt (2.3.0)
timeout (0.4.0)
timeout (0.4.1)
tpm-key_attestation (0.12.0)
bindata (~> 2.4)
openssl (> 2.0)
Expand Down Expand Up @@ -938,6 +940,7 @@ DEPENDENCIES
simple-navigation (~> 4.4)
simple_form (~> 5.2)
simplecov (~> 0.22)
simplecov-lcov (~> 0.8)
sprockets (~> 3.7.2)
sprockets-rails (~> 3.4)
stackprof
Expand Down
2 changes: 1 addition & 1 deletion Procfile.dev
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
web: env PORT=3000 RAILS_ENV=development bundle exec puma -C config/puma.rb
sidekiq: env PORT=3000 RAILS_ENV=development bundle exec sidekiq
stream: env PORT=4000 yarn run start
stream: env PORT=4000 yarn workspace @mastodon/streaming start
webpack: bin/webpack-dev-server
2 changes: 1 addition & 1 deletion app/chewy/public_statuses_index.rb
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class PublicStatusesIndex < Chewy::Index
index_scope ::Status.unscoped
.kept
.indexable
.includes(:media_attachments, :preloadable_poll, :preview_cards, :tags, :account)
.includes(:media_attachments, :preloadable_poll, :tags, :account, preview_cards_status: :preview_card)

root date_detection: false do
field(:id, type: 'long')
Expand Down
2 changes: 1 addition & 1 deletion app/chewy/statuses_index.rb
Original file line number Diff line number Diff line change
Expand Up @@ -147,14 +147,14 @@ class StatusesIndex < Chewy::Index
index_scope ::Status.unscoped.kept.without_reblogs.includes(
:account,
:media_attachments,
:preview_cards,
:local_mentioned,
:local_favorited,
:local_reblogged,
:local_bookmarked,
:local_emoji_reacted,
:tags,
:local_referenced,
preview_cards_status: :preview_card,
preloadable_poll: :local_voters
),
delete_if: lambda { |status|
Expand Down
Loading
Loading