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 20231102 #216

Merged
merged 39 commits into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
fa7e64d
Fix various icon styles in web UI (#27579)
Gargron Oct 26, 2023
8f998cd
Handle featured collections without items (#27581)
tribela Oct 27, 2023
bbf46cc
Fix error and incorrect URLs in `/api/v1/accounts/:id/featured_tags` …
ClearlyClaire Oct 27, 2023
8ca16f0
New Crowdin Translations (automated) (#27583)
github-actions[bot] Oct 27, 2023
37929b9
Update libretranslate/libretranslate Docker tag to v1.4.0 (#27504)
renovate[bot] Oct 27, 2023
1f5187e
Misc spec/refactor to user mailer and user mailer spec (#27486)
mjankowski Oct 27, 2023
13d310e
Simplify column headers (#27557)
renchap Oct 27, 2023
15ef654
Update dependency pundit to v2.3.1 (#27585)
renovate[bot] Oct 27, 2023
08bdd57
Fix account click on detailed status (#27587)
SouthFox-D Oct 27, 2023
93e4cdc
Fix hashtag matching pattern matching some URLs (#27584)
ClearlyClaire Oct 27, 2023
1cc5129
Have `Follow` activities bypass availability (#27586)
ShadowJonathan Oct 27, 2023
2e6bf60
Use `deliveries.size` in mailer-related examples in controller specs …
mjankowski Oct 27, 2023
eae5c73
Extract class from CSP configuration/initialization (#26905)
mjankowski Oct 27, 2023
33f8c1c
Remove version check from update cache_concern.rb (#27592)
RicardoTrindade Oct 30, 2023
bf1d452
Update libretranslate/libretranslate Docker tag to v1.4.1 (#27616)
renovate[bot] Oct 30, 2023
a918208
New Crowdin Translations (automated) (#27596)
github-actions[bot] Oct 30, 2023
c2cc1df
Update dependency @types/react to v18.2.33 (#27615)
renovate[bot] Oct 30, 2023
547d3c1
Update dependency core-js to v3.33.2 (#27624)
renovate[bot] Oct 30, 2023
372494e
Update dependency punycode to v2.3.1 (#27625)
renovate[bot] Oct 30, 2023
b8adb08
Update dependency axios to v1.6.0 (#27580)
renovate[bot] Oct 30, 2023
6c52f82
Fix posts from force-sensitized accounts being able to trend (#27620)
ClearlyClaire Oct 30, 2023
beee9ea
Fix `RSpec/LetSetup` cop in spec/controllers/admin area (#27619)
mjankowski Oct 31, 2023
204c00b
Update dependency bootsnap to '~> 1.17.0' (#27617)
renovate[bot] Oct 31, 2023
147417a
Update dependency rspec-sidekiq to v4.1.0 (#27593)
renovate[bot] Oct 31, 2023
e5b7ae9
New Crowdin Translations (automated) (#27630)
github-actions[bot] Oct 31, 2023
d649bbf
Add some more tests and clean up domain block controller (#27469)
ClearlyClaire Oct 31, 2023
a916251
Update haml-lint line length configuration to match rubocop value (#2…
mjankowski Oct 31, 2023
9c8891b
Rewrite `AutosuggestTextarea` as Functional Component (#27618)
ClearlyClaire Oct 31, 2023
0e3401b
Improve Babel configuration and automatically load polyfills (#27333)
renchap Oct 31, 2023
b264318
Update strong_migrations to version 1.3.0 (#25991)
mjankowski Oct 31, 2023
3107a94
Silence deprecation warning about secrets/credentials with Devise pat…
mjankowski Oct 31, 2023
7ef56d6
Move json_ld context loaders to `config/initializers` (#27590)
mjankowski Oct 31, 2023
277e696
Use helpers to check environment in frontend (#27633)
renchap Oct 31, 2023
ac8e4ed
Fix inserting emojis from emoji picker fails with TypeError (#27647)
mgmn Nov 1, 2023
2aa28e0
Mark version 4.0 as no longer supported (#27627)
renchap Nov 1, 2023
991c0df
Merge remote-tracking branch 'parent/main' into kb_development
kmycode Nov 2, 2023
f33dd97
Merge commit '45cc8fff7a5d6db3348c17cb50f6e0df36cab409' into upstream…
kmycode Nov 2, 2023
eba304a
Fix test
kmycode Nov 2, 2023
27ece69
Fix test
kmycode Nov 2, 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.0
image: libretranslate/libretranslate:v1.4.1
restart: unless-stopped
volumes:
- lt-data:/home/libretranslate/.local
Expand Down
4 changes: 2 additions & 2 deletions .env.test
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Node.js
NODE_ENV=tests
# In test, compile the NodeJS code as if we are in production
NODE_ENV=production
# Federation
LOCAL_DOMAIN=cb6e6126.ngrok.io
LOCAL_HTTPS=true
Expand Down
2 changes: 2 additions & 0 deletions .haml-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ linters:
enabled: true
MiddleDot:
enabled: true
LineLength:
max: 320
24 changes: 20 additions & 4 deletions .haml-lint_todo.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,33 @@
# This configuration was generated by
# `haml-lint --auto-gen-config`
# on 2023-10-25 08:29:48 -0400 using Haml-Lint version 0.51.0.
# on 2023-10-26 09:32:34 -0400 using Haml-Lint version 0.51.0.
# The point is for the user to remove these configuration records
# one by one as the lints are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of Haml-Lint, may require this file to be generated again.

linters:
# Offense count: 945
# Offense count: 16
LineLength:
enabled: false
exclude:
- 'app/views/admin/account_actions/new.html.haml'
- 'app/views/admin/accounts/index.html.haml'
- 'app/views/admin/ip_blocks/new.html.haml'
- 'app/views/admin/roles/_form.html.haml'
- 'app/views/admin/settings/discovery/show.html.haml'
- 'app/views/auth/registrations/edit.html.haml'
- 'app/views/auth/registrations/new.html.haml'
- 'app/views/filters/_filter_fields.html.haml'
- 'app/views/media/player.html.haml'
- 'app/views/settings/applications/_fields.html.haml'
- 'app/views/settings/imports/index.html.haml'
- 'app/views/settings/preferences/appearance/show.html.haml'
- 'app/views/settings/preferences/notifications/show.html.haml'
- 'app/views/settings/preferences/other/show.html.haml'
- 'app/views/settings/preferences/reaching/show.html.haml'
- 'app/views/settings/profiles/show.html.haml'

# Offense count: 10
# Offense count: 9
RuboCop:
exclude:
- 'app/views/admin/accounts/_buttons.html.haml'
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ AllCops:
- 'node_modules/**/*'
- 'Vagrantfile'
- 'vendor/**/*'
- 'lib/json_ld/*' # Generated files
- 'config/initializers/json_ld*' # Generated files
- 'lib/mastodon/migration_helpers.rb' # Vendored from GitLab
- 'lib/templates/**/*'

Expand Down
5 changes: 0 additions & 5 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,6 @@ RSpec/InstanceVariable:

RSpec/LetSetup:
Exclude:
- 'spec/controllers/admin/accounts_controller_spec.rb'
- 'spec/controllers/admin/action_logs_controller_spec.rb'
- 'spec/controllers/admin/instances_controller_spec.rb'
- 'spec/controllers/admin/reports/actions_controller_spec.rb'
- 'spec/controllers/admin/statuses_controller_spec.rb'
- 'spec/controllers/api/v1/accounts/statuses_controller_spec.rb'
- 'spec/controllers/api/v1/filters_controller_spec.rb'
- 'spec/controllers/api/v2/admin/accounts_controller_spec.rb'
Expand Down
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ gem 'blurhash', '~> 0.1'

gem 'active_model_serializers', '~> 0.10'
gem 'addressable', '~> 2.8'
gem 'bootsnap', '~> 1.16.0', require: false
gem 'bootsnap', '~> 1.17.0', require: false
gem 'browser'
gem 'charlock_holmes', '~> 0.7.7'
gem 'chewy', '~> 7.3'
Expand Down Expand Up @@ -88,7 +88,7 @@ gem 'simple-navigation', '~> 4.4'
gem 'simple_form', '~> 5.2'
gem 'sprockets-rails', '~> 3.4', require: 'sprockets/railtie'
gem 'stoplight', '~> 3.0.1'
gem 'strong_migrations', '~> 0.8'
gem 'strong_migrations', '1.3.0'
gem 'tty-prompt', '~> 0.23', require: false
gem 'twitter-text', '~> 3.1.0'
gem 'tzinfo-data', '~> 1.2023'
Expand Down
14 changes: 7 additions & 7 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ GEM
binding_of_caller (1.0.0)
debug_inspector (>= 0.0.1)
blurhash (0.1.7)
bootsnap (1.16.0)
bootsnap (1.17.0)
msgpack (~> 1.2)
brakeman (6.0.1)
browser (5.3.1)
Expand Down Expand Up @@ -455,7 +455,7 @@ GEM
mini_mime (1.1.5)
mini_portile2 (2.8.4)
minitest (5.20.0)
msgpack (1.7.1)
msgpack (1.7.2)
multi_json (1.15.0)
multipart-post (2.3.0)
mutex_m (0.1.2)
Expand Down Expand Up @@ -631,7 +631,7 @@ GEM
rspec-support (~> 3.12.0)
rspec-github (2.4.0)
rspec-core (~> 3.0)
rspec-mocks (3.12.5)
rspec-mocks (3.12.6)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-rails (6.0.3)
Expand All @@ -644,7 +644,7 @@ GEM
rspec-support (~> 3.12)
rspec-retry (0.6.2)
rspec-core (> 3.3)
rspec-sidekiq (4.0.1)
rspec-sidekiq (4.1.0)
rspec-core (~> 3.0)
rspec-expectations (~> 3.0)
rspec-mocks (~> 3.0)
Expand Down Expand Up @@ -742,7 +742,7 @@ GEM
stoplight (3.0.2)
redlock (~> 1.0)
stringio (3.0.8)
strong_migrations (0.8.0)
strong_migrations (1.3.0)
activerecord (>= 5.2)
swd (1.3.0)
activesupport (>= 3)
Expand Down Expand Up @@ -835,7 +835,7 @@ DEPENDENCIES
better_errors (~> 2.9)
binding_of_caller (~> 1.0)
blurhash (~> 0.1)
bootsnap (~> 1.16.0)
bootsnap (~> 1.17.0)
brakeman (~> 6.0)
browser
bundler-audit (~> 0.9)
Expand Down Expand Up @@ -945,7 +945,7 @@ DEPENDENCIES
sprockets-rails (~> 3.4)
stackprof
stoplight (~> 3.0.1)
strong_migrations (~> 0.8)
strong_migrations (= 1.3.0)
test-prof
thor (~> 1.2)
tty-prompt (~> 0.23)
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/admin/domain_blocks_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def create

# Disallow accidentally downgrading a domain block
if existing_domain_block.present? && !@domain_block.stricter_than?(existing_domain_block)
@domain_block.save
@domain_block.validate
flash.now[:alert] = I18n.t('admin.domain_blocks.existing_domain_block_html', name: existing_domain_block.domain, unblock_url: admin_domain_block_path(existing_domain_block)).html_safe
@domain_block.errors.delete(:domain)
return render :new
Expand Down
16 changes: 4 additions & 12 deletions app/controllers/concerns/cache_concern.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,18 +92,10 @@ def serialize_record(record)
arguments
end

if Rails.gem_version >= Gem::Version.new('7.0')
def attributes_for_database(record)
attributes = record.attributes_for_database
attributes.transform_values! { |attr| attr.is_a?(::ActiveModel::Type::Binary::Data) ? attr.to_s : attr }
attributes
end
else
def attributes_for_database(record)
attributes = record.instance_variable_get(:@attributes).send(:attributes).transform_values(&:value_for_database)
attributes.transform_values! { |attr| attr.is_a?(::ActiveModel::Type::Binary::Data) ? attr.to_s : attr }
attributes
end
def attributes_for_database(record)
attributes = record.attributes_for_database
attributes.transform_values! { |attr| attr.is_a?(::ActiveModel::Type::Binary::Data) ? attr.to_s : attr }
attributes
end

def deserialize_record(class_name, attributes_from_database, new_record = false) # rubocop:disable Style/OptionalBooleanParameter
Expand Down
Loading
Loading