diff --git a/.rubocop.yml b/.rubocop.yml index aa503162db..a897c85621 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -121,16 +121,11 @@ Rails/Exit: # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecfilepath RSpec/FilePath: CustomTransform: - ActivityPub: activitypub # Ignore the snake_case due to the amount of files to rename + ActivityPub: activitypub DeepL: deepl FetchOEmbedService: fetch_oembed_service - JsonLdHelper: jsonld_helper OEmbedController: oembed_controller OStatus: ostatus - NodeInfoController: nodeinfo_controller # NodeInfo isn't snake_cased for any of the instances - Exclude: - - 'spec/config/initializers/rack_attack_spec.rb' # namespaces usually have separate folder - - 'spec/lib/sanitize_config_spec.rb' # namespaces usually have separate folder # Reason: # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecnamedsubject @@ -147,6 +142,16 @@ RSpec/NotToNot: RSpec/Rails/HttpStatus: EnforcedStyle: numeric +# Reason: Match overrides from Rspec/FilePath rule above +# https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecspecfilepathformat +RSpec/SpecFilePathFormat: + CustomTransform: + ActivityPub: activitypub + DeepL: deepl + FetchOEmbedService: fetch_oembed_service + OEmbedController: oembed_controller + OStatus: ostatus + # Reason: # https://docs.rubocop.org/rubocop/cops_style.html#styleclassandmodulechildren Style/ClassAndModuleChildren: diff --git a/Dockerfile b/Dockerfile index 600336de92..6065e10d91 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1.4 # This needs to be bookworm-slim because the Ruby image is built on bookworm-slim -ARG NODE_VERSION="20.8-bookworm-slim" +ARG NODE_VERSION="20.9-bookworm-slim" FROM ghcr.io/moritzheiber/ruby-jemalloc:3.2.2-slim as ruby FROM node:${NODE_VERSION} as build diff --git a/Gemfile.lock b/Gemfile.lock index a660764385..3fb5e30c32 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -235,7 +235,7 @@ GEM devise (>= 4.0.0) rpam2 (~> 4.0) diff-lcs (1.5.0) - discard (1.2.1) + discard (1.3.0) activerecord (>= 4.2, < 8) docile (1.4.0) domain_name (0.5.20190701) @@ -264,7 +264,7 @@ GEM tzinfo excon (0.100.0) fabrication (2.30.0) - faker (3.2.1) + faker (3.2.2) i18n (>= 1.8.11, < 2) faraday (1.10.3) faraday-em_http (~> 1.0) @@ -535,7 +535,7 @@ GEM pundit (2.3.1) activesupport (>= 3.0.0) raabro (1.4.0) - racc (1.7.1) + racc (1.7.3) rack (2.2.8) rack-attack (6.7.0) rack (>= 1.0, < 4) @@ -650,8 +650,7 @@ GEM rspec-mocks (~> 3.0) sidekiq (>= 5, < 8) rspec-support (3.12.1) - rubocop (1.57.1) - base64 (~> 0.1.1) + rubocop (1.57.2) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) @@ -662,11 +661,11 @@ GEM rubocop-ast (>= 1.28.1, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.29.0) + rubocop-ast (1.30.0) parser (>= 3.2.1.0) rubocop-capybara (2.19.0) rubocop (~> 1.41) - rubocop-factory_bot (2.23.1) + rubocop-factory_bot (2.24.0) rubocop (~> 1.33) rubocop-performance (1.19.1) rubocop (>= 1.7.0, < 2.0) @@ -675,8 +674,8 @@ GEM activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.33.0, < 2.0) - rubocop-rspec (2.23.2) - rubocop (~> 1.33) + rubocop-rspec (2.25.0) + rubocop (~> 1.40) rubocop-capybara (~> 2.17) rubocop-factory_bot (~> 2.22) ruby-prof (1.6.3) diff --git a/app/controllers/well_known/nodeinfo_controller.rb b/app/controllers/well_known/node_info_controller.rb similarity index 100% rename from app/controllers/well_known/nodeinfo_controller.rb rename to app/controllers/well_known/node_info_controller.rb diff --git a/app/javascript/mastodon/reducers/accounts.ts b/app/javascript/mastodon/reducers/accounts.ts index 4a00f21f31..f7270eb60a 100644 --- a/app/javascript/mastodon/reducers/accounts.ts +++ b/app/javascript/mastodon/reducers/accounts.ts @@ -41,32 +41,34 @@ const normalizeAccounts = ( return state; }; -export const accountsReducer: Reducer = ( - state = initialState, - action, -) => { - const currentUserId = me; - - if (!currentUserId) +function getCurrentUser() { + if (!me) throw new Error( 'No current user (me) defined when calling `accountsReducer`', ); + return me; +} + +export const accountsReducer: Reducer = ( + state = initialState, + action, +) => { if (revealAccount.match(action)) return state.setIn([action.payload.id, 'hidden'], false); else if (importAccounts.match(action)) return normalizeAccounts(state, action.payload.accounts); - else if (followAccountSuccess.match(action)) + else if (followAccountSuccess.match(action)) { return state .update( action.payload.relationship.id, (account) => account?.update('followers_count', (n) => n + 1), ) .update( - currentUserId, + getCurrentUser(), (account) => account?.update('following_count', (n) => n + 1), ); - else if (unfollowAccountSuccess.match(action)) + } else if (unfollowAccountSuccess.match(action)) return state .update( action.payload.relationship.id, @@ -74,7 +76,7 @@ export const accountsReducer: Reducer = ( account?.update('followers_count', (n) => Math.max(0, n - 1)), ) .update( - currentUserId, + getCurrentUser(), (account) => account?.update('following_count', (n) => Math.max(0, n - 1)), ); diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss index c6bc6123f7..e0f273269b 100644 --- a/app/javascript/styles/mastodon/components.scss +++ b/app/javascript/styles/mastodon/components.scss @@ -1886,12 +1886,14 @@ a.account__display-name { &.activate { & > .icon { animation: spring-rotate-in 1s linear; + transform-origin: 50% 55%; } } &.deactivate { & > .icon { animation: spring-rotate-out 1s linear; + transform-origin: 50% 55%; } } } diff --git a/app/lib/activitypub/parser/status_parser.rb b/app/lib/activitypub/parser/status_parser.rb index af2033cf12..4cd48d03f6 100644 --- a/app/lib/activitypub/parser/status_parser.rb +++ b/app/lib/activitypub/parser/status_parser.rb @@ -55,7 +55,8 @@ class ActivityPub::Parser::StatusParser end def created_at - @object['published']&.to_datetime + datetime = @object['published']&.to_datetime + datetime if datetime.present? && (0..9999).cover?(datetime.year) rescue ArgumentError nil end diff --git a/app/lib/delivery_failure_tracker.rb b/app/lib/delivery_failure_tracker.rb index c907166329..d938269829 100644 --- a/app/lib/delivery_failure_tracker.rb +++ b/app/lib/delivery_failure_tracker.rb @@ -62,7 +62,7 @@ class DeliveryFailureTracker key.delete_prefix(exhausted_deliveries_key_by('')) end - domains - UnavailableDomain.all.pluck(:domain) + domains - UnavailableDomain.pluck(:domain) end def warning_domains_map(domains = nil) diff --git a/app/lib/feed_manager.rb b/app/lib/feed_manager.rb index 13b33bcbbf..76e2b117db 100644 --- a/app/lib/feed_manager.rb +++ b/app/lib/feed_manager.rb @@ -261,7 +261,7 @@ class FeedManager # @param [Account] target_account # @return [void] def clear_from_lists(account, target_account) - List.where(account: account).each do |list| + List.where(account: account).find_each do |list| clear_from_list(list, target_account) end end diff --git a/app/lib/nodeinfo/adapter.rb b/app/lib/node_info/adapter.rb similarity index 100% rename from app/lib/nodeinfo/adapter.rb rename to app/lib/node_info/adapter.rb diff --git a/app/serializers/nodeinfo/discovery_serializer.rb b/app/serializers/node_info/discovery_serializer.rb similarity index 100% rename from app/serializers/nodeinfo/discovery_serializer.rb rename to app/serializers/node_info/discovery_serializer.rb diff --git a/app/serializers/nodeinfo/serializer.rb b/app/serializers/node_info/serializer.rb similarity index 100% rename from app/serializers/nodeinfo/serializer.rb rename to app/serializers/node_info/serializer.rb diff --git a/app/services/activitypub/fetch_featured_tags_collection_service.rb b/app/services/activitypub/fetch_featured_tags_collection_service.rb index cb71b37e75..a0b3c6036b 100644 --- a/app/services/activitypub/fetch_featured_tags_collection_service.rb +++ b/app/services/activitypub/fetch_featured_tags_collection_service.rb @@ -55,7 +55,7 @@ class ActivityPub::FetchFeaturedTagsCollectionService < BaseService FeaturedTag.includes(:tag).references(:tag).where(account: @account).where.not(tag: { name: normalized_names }).delete_all - FeaturedTag.includes(:tag).references(:tag).where(account: @account, tag: { name: normalized_names }).each do |featured_tag| + FeaturedTag.includes(:tag).references(:tag).where(account: @account, tag: { name: normalized_names }).find_each do |featured_tag| featured_tag.update(name: tags.delete(featured_tag.tag.name)) end diff --git a/app/services/activitypub/synchronize_followers_service.rb b/app/services/activitypub/synchronize_followers_service.rb index 9bd6034a57..7ccc917309 100644 --- a/app/services/activitypub/synchronize_followers_service.rb +++ b/app/services/activitypub/synchronize_followers_service.rb @@ -23,7 +23,7 @@ class ActivityPub::SynchronizeFollowersService < BaseService private def remove_unexpected_local_followers! - @account.followers.local.where.not(id: @expected_followers.map(&:id)).each do |unexpected_follower| + @account.followers.local.where.not(id: @expected_followers.map(&:id)).reorder(nil).find_each do |unexpected_follower| UnfollowService.new.call(unexpected_follower, @account) end end diff --git a/app/services/appeal_service.rb b/app/services/appeal_service.rb index ef052e3547..a7fb61195b 100644 --- a/app/services/appeal_service.rb +++ b/app/services/appeal_service.rb @@ -22,7 +22,7 @@ class AppealService < BaseService end def notify_staff! - User.those_who_can(:manage_appeals).includes(:account).each do |u| + User.those_who_can(:manage_appeals).includes(:account).find_each do |u| AdminMailer.with(recipient: u.account).new_appeal(@appeal).deliver_later if u.allows_appeal_emails? end end diff --git a/app/services/approve_appeal_service.rb b/app/services/approve_appeal_service.rb index bae70fc1cd..59b41495cd 100644 --- a/app/services/approve_appeal_service.rb +++ b/app/services/approve_appeal_service.rb @@ -55,7 +55,7 @@ class ApproveAppealService < BaseService def undo_mark_statuses_as_sensitive! representative_account = Account.representative - @strike.statuses.includes(:media_attachments).each do |status| + @strike.statuses.includes(:media_attachments).find_each do |status| UpdateStatusService.new.call(status, representative_account.id, sensitive: false) if status.with_media? end end diff --git a/app/services/process_hashtags_service.rb b/app/services/process_hashtags_service.rb index 43d7bcca6f..17c347b088 100644 --- a/app/services/process_hashtags_service.rb +++ b/app/services/process_hashtags_service.rb @@ -24,7 +24,7 @@ class ProcessHashtagsService < BaseService added_tags = @current_tags - @previous_tags unless added_tags.empty? - @account.featured_tags.where(tag_id: added_tags.map(&:id)).each do |featured_tag| + @account.featured_tags.where(tag_id: added_tags.map(&:id)).find_each do |featured_tag| featured_tag.increment(@status.created_at) end end @@ -32,7 +32,7 @@ class ProcessHashtagsService < BaseService removed_tags = @previous_tags - @current_tags unless removed_tags.empty? - @account.featured_tags.where(tag_id: removed_tags.map(&:id)).each do |featured_tag| + @account.featured_tags.where(tag_id: removed_tags.map(&:id)).find_each do |featured_tag| featured_tag.decrement(@status.id) end end diff --git a/app/services/remove_status_service.rb b/app/services/remove_status_service.rb index 2c80300298..38dcbbcf4d 100644 --- a/app/services/remove_status_service.rb +++ b/app/services/remove_status_service.rb @@ -134,7 +134,7 @@ class RemoveStatusService < BaseService end def remove_from_hashtags - @account.featured_tags.where(tag_id: @status.tags.map(&:id)).each do |featured_tag| + @account.featured_tags.where(tag_id: @status.tags.map(&:id)).find_each do |featured_tag| featured_tag.decrement(@status.id) end diff --git a/app/services/report_service.rb b/app/services/report_service.rb index 5987d10caf..53420bea23 100644 --- a/app/services/report_service.rb +++ b/app/services/report_service.rb @@ -42,7 +42,7 @@ class ReportService < BaseService def notify_staff! return if @report.unresolved_siblings? - User.those_who_can(:manage_reports).includes(:account).each do |u| + User.those_who_can(:manage_reports).includes(:account).find_each do |u| LocalNotificationWorker.perform_async(u.account_id, @report.id, 'Report', 'admin.report') AdminMailer.with(recipient: u.account).new_report(@report).deliver_later if u.allows_report_emails? end diff --git a/babel.config.js b/babel.config.js index 71e72d7138..9ced748a96 100644 --- a/babel.config.js +++ b/babel.config.js @@ -52,6 +52,10 @@ module.exports = (api) => { case 'development': reactOptions.development = true; envOptions.debug = true; + + // We need Babel to not inject polyfills in dev, as this breaks `preval` files + envOptions.useBuiltIns = false; + envOptions.corejs = undefined; break; } diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb index 727a1350d0..3d17509456 100644 --- a/config/initializers/inflections.rb +++ b/config/initializers/inflections.rb @@ -20,7 +20,6 @@ ActiveSupport::Inflector.inflections(:en) do |inflect| inflect.acronym 'PubSubHubbub' inflect.acronym 'ActivityStreams' inflect.acronym 'JsonLd' - inflect.acronym 'NodeInfo' inflect.acronym 'Ed25519' inflect.acronym 'TOC' inflect.acronym 'RSS' diff --git a/config/routes.rb b/config/routes.rb index 557564c793..b95841f8af 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -58,12 +58,12 @@ Rails.application.routes.draw do end get '.well-known/host-meta', to: 'well_known/host_meta#show', as: :host_meta, defaults: { format: 'xml' } - get '.well-known/nodeinfo', to: 'well_known/nodeinfo#index', as: :nodeinfo, defaults: { format: 'json' } + get '.well-known/nodeinfo', to: 'well_known/node_info#index', as: :nodeinfo, defaults: { format: 'json' } get '.well-known/webfinger', to: 'well_known/webfinger#show', as: :webfinger get '.well-known/change-password', to: redirect('/auth/edit') get '.well-known/proxy', to: redirect { |_, request| "/authorize_interaction?#{request.params.to_query}" } - get '/nodeinfo/2.0', to: 'well_known/nodeinfo#show', as: :nodeinfo_schema + get '/nodeinfo/2.0', to: 'well_known/node_info#show', as: :nodeinfo_schema get 'manifest', to: 'manifests#show', defaults: { format: 'json' } get 'intent', to: 'intents#show' diff --git a/db/migrate/20160222143943_add_profile_fields_to_accounts.rb b/db/migrate/20160222143943_add_profile_fields_to_accounts.rb index 058eb702c3..960ae0ddcd 100644 --- a/db/migrate/20160222143943_add_profile_fields_to_accounts.rb +++ b/db/migrate/20160222143943_add_profile_fields_to_accounts.rb @@ -2,8 +2,10 @@ class AddProfileFieldsToAccounts < ActiveRecord::Migration[4.2] def change - add_column :accounts, :note, :text, null: false, default: '' - add_column :accounts, :display_name, :string, null: false, default: '' - add_column :accounts, :uri, :string, null: false, default: '' + change_table :accounts, bulk: true do |t| + t.column :note, :text, null: false, default: '' + t.column :display_name, :string, null: false, default: '' + t.column :uri, :string, null: false, default: '' + end end end diff --git a/db/migrate/20160223162837_add_metadata_to_statuses.rb b/db/migrate/20160223162837_add_metadata_to_statuses.rb index c564d69422..b344800d1e 100644 --- a/db/migrate/20160223162837_add_metadata_to_statuses.rb +++ b/db/migrate/20160223162837_add_metadata_to_statuses.rb @@ -2,7 +2,9 @@ class AddMetadataToStatuses < ActiveRecord::Migration[4.2] def change - add_column :statuses, :in_reply_to_id, :integer, null: true - add_column :statuses, :reblog_of_id, :integer, null: true + change_table(:statuses, bulk: true) do |t| + t.column :in_reply_to_id, :integer, null: true + t.column :reblog_of_id, :integer, null: true + end end end diff --git a/db/migrate/20160305115639_add_devise_to_users.rb b/db/migrate/20160305115639_add_devise_to_users.rb index 5b9a817c60..64ad78dbc6 100644 --- a/db/migrate/20160305115639_add_devise_to_users.rb +++ b/db/migrate/20160305115639_add_devise_to_users.rb @@ -2,7 +2,7 @@ class AddDeviseToUsers < ActiveRecord::Migration[4.2] def self.up - change_table(:users) do |t| + change_table(:users, bulk: true) do |t| ## Database authenticatable t.string :encrypted_password, null: false, default: '' diff --git a/db/migrate/20160314164231_add_owner_to_application.rb b/db/migrate/20160314164231_add_owner_to_application.rb index d4eda38df0..633c467900 100644 --- a/db/migrate/20160314164231_add_owner_to_application.rb +++ b/db/migrate/20160314164231_add_owner_to_application.rb @@ -2,8 +2,10 @@ class AddOwnerToApplication < ActiveRecord::Migration[4.2] def change - add_column :oauth_applications, :owner_id, :integer, null: true - add_column :oauth_applications, :owner_type, :string, null: true + change_table(:oauth_applications, bulk: true) do |t| + t.column :owner_id, :integer, null: true + t.column :owner_type, :string, null: true + end add_index :oauth_applications, [:owner_id, :owner_type] end end diff --git a/db/migrate/20160926213048_remove_owner_from_application.rb b/db/migrate/20160926213048_remove_owner_from_application.rb index 0be01dc4cb..d08ebd7b35 100644 --- a/db/migrate/20160926213048_remove_owner_from_application.rb +++ b/db/migrate/20160926213048_remove_owner_from_application.rb @@ -2,8 +2,10 @@ class RemoveOwnerFromApplication < ActiveRecord::Migration[5.0] def change - remove_index :oauth_applications, [:owner_id, :owner_type] - remove_column :oauth_applications, :owner_id, :integer, null: true - remove_column :oauth_applications, :owner_type, :string, null: true + change_table(:oauth_applications, bulk: true) do |t| + t.remove_index [:owner_id, :owner_type] + t.remove :owner_id, type: :integer, options: { null: true } + t.remove :owner_type, type: :string, options: { null: true } + end end end diff --git a/db/migrate/20161003142332_add_confirmable_to_users.rb b/db/migrate/20161003142332_add_confirmable_to_users.rb index b33c9eadad..4472e5cd80 100644 --- a/db/migrate/20161003142332_add_confirmable_to_users.rb +++ b/db/migrate/20161003142332_add_confirmable_to_users.rb @@ -2,10 +2,12 @@ class AddConfirmableToUsers < ActiveRecord::Migration[5.0] def change - add_column :users, :confirmation_token, :string - add_column :users, :confirmed_at, :datetime - add_column :users, :confirmation_sent_at, :datetime - add_column :users, :unconfirmed_email, :string + change_table(:users, bulk: true) do |t| + t.column :confirmation_token, :string + t.column :confirmed_at, :datetime + t.column :confirmation_sent_at, :datetime + t.column :unconfirmed_email, :string + end add_index :users, :confirmation_token, unique: true end end diff --git a/db/migrate/20170112154826_migrate_settings.rb b/db/migrate/20170112154826_migrate_settings.rb index a1dc0fe4e4..d1faa81f5d 100644 --- a/db/migrate/20170112154826_migrate_settings.rb +++ b/db/migrate/20170112154826_migrate_settings.rb @@ -2,20 +2,24 @@ class MigrateSettings < ActiveRecord::Migration[4.2] def up - remove_index :settings, [:target_type, :target_id, :var] - rename_column :settings, :target_id, :thing_id - rename_column :settings, :target_type, :thing_type - change_column :settings, :thing_id, :integer, null: true, default: nil - change_column :settings, :thing_type, :string, null: true, default: nil - add_index :settings, [:thing_type, :thing_id, :var], unique: true + change_table(:settings, bulk: true) do |t| + t.remove_index [:target_type, :target_id, :var] + t.rename :target_id, :thing_id + t.rename :target_type, :thing_type + t.change :thing_id, :integer, null: true, default: nil + t.change :thing_type, :string, null: true, default: nil + t.index [:thing_type, :thing_id, :var], unique: true + end end def down - remove_index :settings, [:thing_type, :thing_id, :var] - rename_column :settings, :thing_id, :target_id - rename_column :settings, :thing_type, :target_type - change_column :settings, :target_id, :integer, null: false - change_column :settings, :target_type, :string, null: false, default: '' - add_index :settings, [:target_type, :target_id, :var], unique: true + change_table(:settings, bulk: true) do |t| + t.remove_index [:thing_type, :thing_id, :var] + t.rename :thing_id, :target_id + t.rename :thing_type, :target_type + t.column :target_id, :integer, null: false + t.column :target_type, :string, null: false, default: '' + t.index [:target_type, :target_id, :var], unique: true + end end end diff --git a/db/migrate/20170127165745_add_devise_two_factor_to_users.rb b/db/migrate/20170127165745_add_devise_two_factor_to_users.rb index f4eb72a6b7..0f60758d3b 100644 --- a/db/migrate/20170127165745_add_devise_two_factor_to_users.rb +++ b/db/migrate/20170127165745_add_devise_two_factor_to_users.rb @@ -2,10 +2,12 @@ class AddDeviseTwoFactorToUsers < ActiveRecord::Migration[5.0] def change - add_column :users, :encrypted_otp_secret, :string - add_column :users, :encrypted_otp_secret_iv, :string - add_column :users, :encrypted_otp_secret_salt, :string - add_column :users, :consumed_timestep, :integer - add_column :users, :otp_required_for_login, :boolean + change_table(:users, bulk: true) do |t| + t.column :encrypted_otp_secret, :string + t.column :encrypted_otp_secret_iv, :string + t.column :encrypted_otp_secret_salt, :string + t.column :consumed_timestep, :integer + t.column :otp_required_for_login, :boolean + end end end diff --git a/db/migrate/20170322143850_change_primary_key_to_bigint_on_statuses.rb b/db/migrate/20170322143850_change_primary_key_to_bigint_on_statuses.rb index 09959100ac..b98fffab83 100644 --- a/db/migrate/20170322143850_change_primary_key_to_bigint_on_statuses.rb +++ b/db/migrate/20170322143850_change_primary_key_to_bigint_on_statuses.rb @@ -2,9 +2,11 @@ class ChangePrimaryKeyToBigintOnStatuses < ActiveRecord::Migration[5.0] def change - change_column :statuses, :id, :bigint - change_column :statuses, :reblog_of_id, :bigint - change_column :statuses, :in_reply_to_id, :bigint + change_table(:statuses, bulk: true) do |t| + t.change :id, :bigint + t.change :reblog_of_id, :bigint + t.change :in_reply_to_id, :bigint + end change_column :media_attachments, :status_id, :bigint change_column :mentions, :status_id, :bigint diff --git a/db/migrate/20170330021336_add_counter_caches.rb b/db/migrate/20170330021336_add_counter_caches.rb index a9e496ad2f..941823cc21 100644 --- a/db/migrate/20170330021336_add_counter_caches.rb +++ b/db/migrate/20170330021336_add_counter_caches.rb @@ -2,11 +2,15 @@ class AddCounterCaches < ActiveRecord::Migration[5.0] def change - add_column :statuses, :favourites_count, :integer, null: false, default: 0 - add_column :statuses, :reblogs_count, :integer, null: false, default: 0 - add_column :accounts, :statuses_count, :integer, null: false, default: 0 - add_column :accounts, :followers_count, :integer, null: false, default: 0 - add_column :accounts, :following_count, :integer, null: false, default: 0 + change_table(:statuses, bulk: true) do |t| + t.column :favourites_count, :integer, null: false, default: 0 + t.column :reblogs_count, :integer, null: false, default: 0 + end + change_table(:accounts, bulk: true) do |t| + t.column :statuses_count, :integer, null: false, default: 0 + t.column :followers_count, :integer, null: false, default: 0 + t.column :following_count, :integer, null: false, default: 0 + end end end diff --git a/db/migrate/20170425202925_add_oembed_to_preview_cards.rb b/db/migrate/20170425202925_add_oembed_to_preview_cards.rb index f71d2c27ec..e0fd1919a3 100644 --- a/db/migrate/20170425202925_add_oembed_to_preview_cards.rb +++ b/db/migrate/20170425202925_add_oembed_to_preview_cards.rb @@ -2,13 +2,15 @@ class AddOEmbedToPreviewCards < ActiveRecord::Migration[5.0] def change - add_column :preview_cards, :type, :integer, default: 0, null: false - add_column :preview_cards, :html, :text, null: false, default: '' - add_column :preview_cards, :author_name, :string, null: false, default: '' - add_column :preview_cards, :author_url, :string, null: false, default: '' - add_column :preview_cards, :provider_name, :string, null: false, default: '' - add_column :preview_cards, :provider_url, :string, null: false, default: '' - add_column :preview_cards, :width, :integer, default: 0, null: false - add_column :preview_cards, :height, :integer, default: 0, null: false + change_table(:preview_cards, bulk: true) do |t| + t.column :type, :integer, default: 0, null: false + t.column :html, :text, null: false, default: '' + t.column :author_name, :string, null: false, default: '' + t.column :author_url, :string, null: false, default: '' + t.column :provider_name, :string, null: false, default: '' + t.column :provider_url, :string, null: false, default: '' + t.column :width, :integer, default: 0, null: false + t.column :height, :integer, default: 0, null: false + end end end diff --git a/db/migrate/20170427011934_re_add_owner_to_application.rb b/db/migrate/20170427011934_re_add_owner_to_application.rb index 182ce36d2a..1fd913e3b0 100644 --- a/db/migrate/20170427011934_re_add_owner_to_application.rb +++ b/db/migrate/20170427011934_re_add_owner_to_application.rb @@ -2,8 +2,10 @@ class ReAddOwnerToApplication < ActiveRecord::Migration[5.0] def change - add_column :oauth_applications, :owner_id, :integer, null: true - add_column :oauth_applications, :owner_type, :string, null: true + change_table(:oauth_applications, bulk: true) do |t| + t.column :owner_id, :integer, null: true + t.column :owner_type, :string, null: true + end add_index :oauth_applications, [:owner_id, :owner_type] add_foreign_key :oauth_applications, :users, column: :owner_id, on_delete: :cascade end diff --git a/db/migrate/20170520145338_change_language_filter_to_opt_out.rb b/db/migrate/20170520145338_change_language_filter_to_opt_out.rb index 12e045480a..f0a95819c3 100644 --- a/db/migrate/20170520145338_change_language_filter_to_opt_out.rb +++ b/db/migrate/20170520145338_change_language_filter_to_opt_out.rb @@ -3,9 +3,12 @@ class ChangeLanguageFilterToOptOut < ActiveRecord::Migration[5.0] def change remove_index :users, :allowed_languages - remove_column :users, :allowed_languages - add_column :users, :filtered_languages, :string, array: true, default: [], null: false + change_table(:users, bulk: true) do |t| + t.remove :allowed_languages + t.column :filtered_languages, :string, array: true, default: [], null: false + end + add_index :users, :filtered_languages, using: :gin end end diff --git a/db/migrate/20170624134742_add_description_to_session_activations.rb b/db/migrate/20170624134742_add_description_to_session_activations.rb index 78f9e7a8d9..08b28247ae 100644 --- a/db/migrate/20170624134742_add_description_to_session_activations.rb +++ b/db/migrate/20170624134742_add_description_to_session_activations.rb @@ -2,8 +2,10 @@ class AddDescriptionToSessionActivations < ActiveRecord::Migration[5.1] def change - add_column :session_activations, :user_agent, :string, null: false, default: '' - add_column :session_activations, :ip, :inet + change_table(:session_activations, bulk: true) do |t| + t.column :user_agent, :string, null: false, default: '' + t.column :ip, :inet + end add_foreign_key :session_activations, :users, on_delete: :cascade end end diff --git a/db/migrate/20170718211102_add_activitypub_to_accounts.rb b/db/migrate/20170718211102_add_activitypub_to_accounts.rb index 83a45f13a9..4d10b02159 100644 --- a/db/migrate/20170718211102_add_activitypub_to_accounts.rb +++ b/db/migrate/20170718211102_add_activitypub_to_accounts.rb @@ -2,10 +2,12 @@ class AddActivityPubToAccounts < ActiveRecord::Migration[5.1] def change - add_column :accounts, :inbox_url, :string, null: false, default: '' - add_column :accounts, :outbox_url, :string, null: false, default: '' - add_column :accounts, :shared_inbox_url, :string, null: false, default: '' - add_column :accounts, :followers_url, :string, null: false, default: '' - add_column :accounts, :protocol, :integer, null: false, default: 0 + change_table(:accounts, bulk: true) do |t| + t.column :inbox_url, :string, null: false, default: '' + t.column :outbox_url, :string, null: false, default: '' + t.column :shared_inbox_url, :string, null: false, default: '' + t.column :followers_url, :string, null: false, default: '' + t.column :protocol, :integer, null: false, default: 0 + end end end diff --git a/db/migrate/20171006142024_add_uri_to_custom_emojis.rb b/db/migrate/20171006142024_add_uri_to_custom_emojis.rb index a9d760d04b..d7b87b8342 100644 --- a/db/migrate/20171006142024_add_uri_to_custom_emojis.rb +++ b/db/migrate/20171006142024_add_uri_to_custom_emojis.rb @@ -2,7 +2,11 @@ class AddUriToCustomEmojis < ActiveRecord::Migration[5.2] def change - add_column :custom_emojis, :uri, :string - add_column :custom_emojis, :image_remote_url, :string + safety_assured do + change_table(:custom_emojis, bulk: true) do |t| + t.column :uri, :string + t.column :image_remote_url, :string + end + end end end diff --git a/db/migrate/20180812123222_change_relays_enabled.rb b/db/migrate/20180812123222_change_relays_enabled.rb index 7424b91c7e..274d936f8c 100644 --- a/db/migrate/20180812123222_change_relays_enabled.rb +++ b/db/migrate/20180812123222_change_relays_enabled.rb @@ -15,7 +15,9 @@ class ChangeRelaysEnabled < ActiveRecord::Migration[5.2] end def down - remove_column :relays, :state - add_column :relays, :enabled, :boolean, default: false, null: false + change_table(:relays, bulk: true) do |t| + t.remove :state + t.column :enabled, :boolean, default: false, null: false + end end end diff --git a/db/migrate/20190511134027_add_silenced_at_suspended_at_to_accounts.rb b/db/migrate/20190511134027_add_silenced_at_suspended_at_to_accounts.rb index c9f0849557..cbb5fc67b4 100644 --- a/db/migrate/20190511134027_add_silenced_at_suspended_at_to_accounts.rb +++ b/db/migrate/20190511134027_add_silenced_at_suspended_at_to_accounts.rb @@ -13,8 +13,12 @@ class AddSilencedAtSuspendedAtToAccounts < ActiveRecord::Migration[5.2] end def up - add_column :accounts, :silenced_at, :datetime - add_column :accounts, :suspended_at, :datetime + safety_assured do + change_table(:accounts, bulk: true) do |t| + t.column :silenced_at, :datetime + t.column :suspended_at, :datetime + end + end # Record suspend date of blocks and silences for users whose limitations match # a domain block @@ -36,7 +40,9 @@ class AddSilencedAtSuspendedAtToAccounts < ActiveRecord::Migration[5.2] Account.where(suspended: false).where.not(suspended_at: nil).in_batches.update_all(suspended: true) Account.where(silenced: false).where.not(silenced_at: nil).in_batches.update_all(silenced: true) - remove_column :accounts, :silenced_at - remove_column :accounts, :suspended_at + change_table(:accounts, bulk: true) do |t| + t.column :silenced_at, :datetime + t.column :suspended_at, :datetime + end end end diff --git a/db/migrate/20190805123746_add_capabilities_to_tags.rb b/db/migrate/20190805123746_add_capabilities_to_tags.rb index 623b56a831..949938bb1e 100644 --- a/db/migrate/20190805123746_add_capabilities_to_tags.rb +++ b/db/migrate/20190805123746_add_capabilities_to_tags.rb @@ -2,10 +2,14 @@ class AddCapabilitiesToTags < ActiveRecord::Migration[5.2] def change - add_column :tags, :usable, :boolean - add_column :tags, :trendable, :boolean - add_column :tags, :listable, :boolean - add_column :tags, :reviewed_at, :datetime - add_column :tags, :requested_review_at, :datetime + safety_assured do + change_table(:tags, bulk: true) do |t| + t.column :usable, :boolean + t.column :trendable, :boolean + t.column :listable, :boolean + t.column :reviewed_at, :datetime + t.column :requested_review_at, :datetime + end + end end end diff --git a/db/migrate/20190807135426_add_comments_to_domain_blocks.rb b/db/migrate/20190807135426_add_comments_to_domain_blocks.rb index 7cca3229c9..2f5b561e16 100644 --- a/db/migrate/20190807135426_add_comments_to_domain_blocks.rb +++ b/db/migrate/20190807135426_add_comments_to_domain_blocks.rb @@ -2,7 +2,11 @@ class AddCommentsToDomainBlocks < ActiveRecord::Migration[5.2] def change - add_column :domain_blocks, :private_comment, :text - add_column :domain_blocks, :public_comment, :text + safety_assured do + change_table(:domain_blocks, bulk: true) do |t| + t.column :private_comment, :text + t.column :public_comment, :text + end + end end end diff --git a/db/migrate/20190815225426_add_last_status_at_to_tags.rb b/db/migrate/20190815225426_add_last_status_at_to_tags.rb index 03181988c6..b53821368f 100644 --- a/db/migrate/20190815225426_add_last_status_at_to_tags.rb +++ b/db/migrate/20190815225426_add_last_status_at_to_tags.rb @@ -2,7 +2,11 @@ class AddLastStatusAtToTags < ActiveRecord::Migration[5.2] def change - add_column :tags, :last_status_at, :datetime - add_column :tags, :last_trend_at, :datetime + safety_assured do + change_table(:tags, bulk: true) do |t| + t.column :last_status_at, :datetime + t.column :last_trend_at, :datetime + end + end end end diff --git a/db/migrate/20190901035623_add_max_score_to_tags.rb b/db/migrate/20190901035623_add_max_score_to_tags.rb index 42a5796949..0686db15b3 100644 --- a/db/migrate/20190901035623_add_max_score_to_tags.rb +++ b/db/migrate/20190901035623_add_max_score_to_tags.rb @@ -2,7 +2,11 @@ class AddMaxScoreToTags < ActiveRecord::Migration[5.2] def change - add_column :tags, :max_score, :float - add_column :tags, :max_score_at, :datetime + safety_assured do + change_table(:tags, bulk: true) do |t| + t.column :max_score, :float + t.column :max_score_at, :datetime + end + end end end diff --git a/db/migrate/20200417125749_add_storage_schema_version.rb b/db/migrate/20200417125749_add_storage_schema_version.rb index b504537311..193861d016 100644 --- a/db/migrate/20200417125749_add_storage_schema_version.rb +++ b/db/migrate/20200417125749_add_storage_schema_version.rb @@ -3,8 +3,12 @@ class AddStorageSchemaVersion < ActiveRecord::Migration[5.2] def change add_column :preview_cards, :image_storage_schema_version, :integer - add_column :accounts, :avatar_storage_schema_version, :integer - add_column :accounts, :header_storage_schema_version, :integer + safety_assured do + change_table(:accounts, bulk: true) do |t| + t.column :avatar_storage_schema_version, :integer + t.column :header_storage_schema_version, :integer + end + end add_column :media_attachments, :file_storage_schema_version, :integer add_column :custom_emojis, :image_storage_schema_version, :integer end diff --git a/db/migrate/20200608113046_add_sign_in_token_to_users.rb b/db/migrate/20200608113046_add_sign_in_token_to_users.rb index 5b71276a24..6866f197a0 100644 --- a/db/migrate/20200608113046_add_sign_in_token_to_users.rb +++ b/db/migrate/20200608113046_add_sign_in_token_to_users.rb @@ -2,7 +2,11 @@ class AddSignInTokenToUsers < ActiveRecord::Migration[5.2] def change - add_column :users, :sign_in_token, :string - add_column :users, :sign_in_token_sent_at, :datetime + safety_assured do + change_table(:users, bulk: true) do |t| + t.column :sign_in_token, :string + t.column :sign_in_token_sent_at, :datetime + end + end end end diff --git a/db/migrate/20211112011713_add_language_to_preview_cards.rb b/db/migrate/20211112011713_add_language_to_preview_cards.rb index b9049e9795..6d32980915 100644 --- a/db/migrate/20211112011713_add_language_to_preview_cards.rb +++ b/db/migrate/20211112011713_add_language_to_preview_cards.rb @@ -2,8 +2,12 @@ class AddLanguageToPreviewCards < ActiveRecord::Migration[6.1] def change - add_column :preview_cards, :language, :string - add_column :preview_cards, :max_score, :float - add_column :preview_cards, :max_score_at, :datetime + safety_assured do + change_table(:preview_cards, bulk: true) do |t| + t.column :language, :string + t.column :max_score, :float + t.column :max_score_at, :datetime + end + end end end diff --git a/db/migrate/20211231080958_add_category_to_reports.rb b/db/migrate/20211231080958_add_category_to_reports.rb index 97a59f8c23..f114cda615 100644 --- a/db/migrate/20211231080958_add_category_to_reports.rb +++ b/db/migrate/20211231080958_add_category_to_reports.rb @@ -8,16 +8,24 @@ class AddCategoryToReports < ActiveRecord::Migration[6.1] disable_ddl_transaction! def up - safety_assured { add_column_with_default :reports, :category, :int, default: 0, allow_null: false } - add_column :reports, :action_taken_at, :datetime - add_column :reports, :rule_ids, :bigint, array: true - safety_assured { execute 'UPDATE reports SET action_taken_at = updated_at WHERE action_taken = TRUE' } + safety_assured do + add_column_with_default :reports, :category, :int, default: 0, allow_null: false + change_table(:reports, bulk: true) do |t| + t.column :action_taken_at, :datetime + t.column :rule_ids, :bigint, array: true + end + execute 'UPDATE reports SET action_taken_at = updated_at WHERE action_taken = TRUE' + end end def down - safety_assured { execute 'UPDATE reports SET action_taken = TRUE WHERE action_taken_at IS NOT NULL' } - remove_column :reports, :category - remove_column :reports, :action_taken_at - remove_column :reports, :rule_ids + safety_assured do + execute 'UPDATE reports SET action_taken = TRUE WHERE action_taken_at IS NOT NULL' + remove_column :reports, :category + change_table(:reports, bulk: true) do |t| + t.column :action_taken_at, :datetime + t.column :rule_ids, :bigint, array: true + end + end end end diff --git a/db/migrate/20220202200743_add_trendable_to_accounts.rb b/db/migrate/20220202200743_add_trendable_to_accounts.rb index 20de235c2d..539717b751 100644 --- a/db/migrate/20220202200743_add_trendable_to_accounts.rb +++ b/db/migrate/20220202200743_add_trendable_to_accounts.rb @@ -2,8 +2,12 @@ class AddTrendableToAccounts < ActiveRecord::Migration[6.1] def change - add_column :accounts, :trendable, :boolean - add_column :accounts, :reviewed_at, :datetime - add_column :accounts, :requested_review_at, :datetime + safety_assured do + change_table(:accounts, bulk: true) do |t| + t.column :trendable, :boolean + t.column :reviewed_at, :datetime + t.column :requested_review_at, :datetime + end + end end end diff --git a/db/migrate/20220224010024_add_ips_to_email_domain_blocks.rb b/db/migrate/20220224010024_add_ips_to_email_domain_blocks.rb index f70dbe5e32..86a1c420f4 100644 --- a/db/migrate/20220224010024_add_ips_to_email_domain_blocks.rb +++ b/db/migrate/20220224010024_add_ips_to_email_domain_blocks.rb @@ -2,7 +2,11 @@ class AddIpsToEmailDomainBlocks < ActiveRecord::Migration[6.1] def change - add_column :email_domain_blocks, :ips, :inet, array: true - add_column :email_domain_blocks, :last_refresh_at, :datetime + safety_assured do + change_table(:email_domain_blocks, bulk: true) do |t| + t.column :ips, :inet, array: true + t.column :last_refresh_at, :datetime + end + end end end diff --git a/db/migrate/20220227041951_add_last_used_at_to_oauth_access_tokens.rb b/db/migrate/20220227041951_add_last_used_at_to_oauth_access_tokens.rb index a733fa1c4b..a5eb732720 100644 --- a/db/migrate/20220227041951_add_last_used_at_to_oauth_access_tokens.rb +++ b/db/migrate/20220227041951_add_last_used_at_to_oauth_access_tokens.rb @@ -2,7 +2,11 @@ class AddLastUsedAtToOauthAccessTokens < ActiveRecord::Migration[6.1] def change - add_column :oauth_access_tokens, :last_used_at, :datetime - add_column :oauth_access_tokens, :last_used_ip, :inet + safety_assured do + change_table(:oauth_access_tokens, bulk: true) do |t| + t.column :last_used_at, :datetime + t.column :last_used_ip, :inet + end + end end end diff --git a/db/migrate/20220303000827_add_ordered_media_attachment_ids_to_status_edits.rb b/db/migrate/20220303000827_add_ordered_media_attachment_ids_to_status_edits.rb index b8ebee6f07..55567d62e1 100644 --- a/db/migrate/20220303000827_add_ordered_media_attachment_ids_to_status_edits.rb +++ b/db/migrate/20220303000827_add_ordered_media_attachment_ids_to_status_edits.rb @@ -2,9 +2,13 @@ class AddOrderedMediaAttachmentIdsToStatusEdits < ActiveRecord::Migration[6.1] def change - add_column :status_edits, :ordered_media_attachment_ids, :bigint, array: true - add_column :status_edits, :media_descriptions, :text, array: true - add_column :status_edits, :poll_options, :string, array: true - add_column :status_edits, :sensitive, :boolean + safety_assured do + change_table(:status_edits, bulk: true) do |t| + t.column :ordered_media_attachment_ids, :bigint, array: true + t.column :media_descriptions, :text, array: true + t.column :poll_options, :string, array: true + t.column :sensitive, :boolean + end + end end end diff --git a/db/migrate/20220824164433_add_human_identifier_to_admin_action_logs.rb b/db/migrate/20220824164433_add_human_identifier_to_admin_action_logs.rb index 90bc767288..4719ac4822 100644 --- a/db/migrate/20220824164433_add_human_identifier_to_admin_action_logs.rb +++ b/db/migrate/20220824164433_add_human_identifier_to_admin_action_logs.rb @@ -2,8 +2,12 @@ class AddHumanIdentifierToAdminActionLogs < ActiveRecord::Migration[6.1] def change - add_column :admin_action_logs, :human_identifier, :string - add_column :admin_action_logs, :route_param, :string - add_column :admin_action_logs, :permalink, :string + safety_assured do + change_table(:admin_action_logs, bulk: true) do |t| + t.column :human_identifier, :string + t.column :route_param, :string + t.column :permalink, :string + end + end end end diff --git a/spec/config/initializers/rack_attack_spec.rb b/spec/config/initializers/rack/attack_spec.rb similarity index 100% rename from spec/config/initializers/rack_attack_spec.rb rename to spec/config/initializers/rack/attack_spec.rb diff --git a/spec/controllers/well_known/nodeinfo_controller_spec.rb b/spec/controllers/well_known/node_info_controller_spec.rb similarity index 100% rename from spec/controllers/well_known/nodeinfo_controller_spec.rb rename to spec/controllers/well_known/node_info_controller_spec.rb diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb index b87d06359e..3f3638e462 100644 --- a/spec/helpers/application_helper_spec.rb +++ b/spec/helpers/application_helper_spec.rb @@ -89,7 +89,7 @@ describe ApplicationHelper do end end - describe 'show_landing_strip?', without_verify_partial_doubles: true do + describe 'show_landing_strip?', :without_verify_partial_doubles do describe 'when signed in' do before do allow(helper).to receive(:user_signed_in?).and_return(true) diff --git a/spec/helpers/jsonld_helper_spec.rb b/spec/helpers/json_ld_helper_spec.rb similarity index 100% rename from spec/helpers/jsonld_helper_spec.rb rename to spec/helpers/json_ld_helper_spec.rb diff --git a/spec/lib/activitypub/activity/create_spec.rb b/spec/lib/activitypub/activity/create_spec.rb index 121bdb1a58..62e9831893 100644 --- a/spec/lib/activitypub/activity/create_spec.rb +++ b/spec/lib/activitypub/activity/create_spec.rb @@ -141,6 +141,46 @@ RSpec.describe ActivityPub::Activity::Create do subject.perform unless custom_before end + context 'when object publication date is below ISO8601 range' do + let(:object_json) do + { + id: [ActivityPub::TagManager.instance.uri_for(sender), '#bar'].join, + type: 'Note', + content: 'Lorem ipsum', + published: '-0977-11-03T08:31:22Z', + } + end + + it 'creates status with a valid creation date', :aggregate_failures do + status = sender.statuses.first + + expect(status).to_not be_nil + expect(status.text).to eq 'Lorem ipsum' + + expect(status.created_at).to be_within(30).of(Time.now.utc) + end + end + + context 'when object publication date is above ISO8601 range' do + let(:object_json) do + { + id: [ActivityPub::TagManager.instance.uri_for(sender), '#bar'].join, + type: 'Note', + content: 'Lorem ipsum', + published: '10000-11-03T08:31:22Z', + } + end + + it 'creates status with a valid creation date', :aggregate_failures do + status = sender.statuses.first + + expect(status).to_not be_nil + expect(status.text).to eq 'Lorem ipsum' + + expect(status.created_at).to be_within(30).of(Time.now.utc) + end + end + context 'when object has been edited' do let(:object_json) do { @@ -152,18 +192,16 @@ RSpec.describe ActivityPub::Activity::Create do } end - it 'creates status' do + it 'creates status with appropriate creation and edition dates', :aggregate_failures do status = sender.statuses.first expect(status).to_not be_nil expect(status.text).to eq 'Lorem ipsum' - end - it 'marks status as edited' do - status = sender.statuses.first + expect(status.created_at).to eq '2022-01-22T15:00:00Z'.to_datetime - expect(status).to_not be_nil expect(status.edited?).to be true + expect(status.edited_at).to eq '2022-01-22T16:00:00Z'.to_datetime end end diff --git a/spec/lib/feed_manager_spec.rb b/spec/lib/feed_manager_spec.rb index f5a3367b2b..51635b5ebe 100644 --- a/spec/lib/feed_manager_spec.rb +++ b/spec/lib/feed_manager_spec.rb @@ -10,7 +10,7 @@ RSpec.describe FeedManager do end end - it 'tracks at least as many statuses as reblogs', skip_stub: true do + it 'tracks at least as many statuses as reblogs', :skip_stub do expect(FeedManager::REBLOG_FALLOFF).to be <= FeedManager::MAX_ITEMS end diff --git a/spec/lib/sanitize_config_spec.rb b/spec/lib/sanitize/config_spec.rb similarity index 100% rename from spec/lib/sanitize_config_spec.rb rename to spec/lib/sanitize/config_spec.rb diff --git a/spec/lib/vacuum/imports_vacuum_spec.rb b/spec/lib/vacuum/imports_vacuum_spec.rb index 1e0abc5e01..c712b7b9b2 100644 --- a/spec/lib/vacuum/imports_vacuum_spec.rb +++ b/spec/lib/vacuum/imports_vacuum_spec.rb @@ -13,7 +13,7 @@ RSpec.describe Vacuum::ImportsVacuum do describe '#perform' do it 'cleans up the expected imports' do - expect { subject.perform }.to change { BulkImport.all.pluck(:id) }.from([old_unconfirmed, new_unconfirmed, recent_ongoing, recent_finished, old_finished].map(&:id)).to([new_unconfirmed, recent_ongoing, recent_finished].map(&:id)) + expect { subject.perform }.to change { BulkImport.pluck(:id) }.from([old_unconfirmed, new_unconfirmed, recent_ongoing, recent_finished, old_finished].map(&:id)).to([new_unconfirmed, recent_ongoing, recent_finished].map(&:id)) end end end diff --git a/spec/models/media_attachment_spec.rb b/spec/models/media_attachment_spec.rb index 6a82c8135a..89916f9f50 100644 --- a/spec/models/media_attachment_spec.rb +++ b/spec/models/media_attachment_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -RSpec.describe MediaAttachment, paperclip_processing: true do +RSpec.describe MediaAttachment, :paperclip_processing do describe 'local?' do subject { media_attachment.local? } diff --git a/spec/requests/api/v1/media_spec.rb b/spec/requests/api/v1/media_spec.rb index 7253a9f1e8..2c29328087 100644 --- a/spec/requests/api/v1/media_spec.rb +++ b/spec/requests/api/v1/media_spec.rb @@ -127,19 +127,19 @@ RSpec.describe 'Media' do end end - context 'with image/jpeg', paperclip_processing: true do + context 'with image/jpeg', :paperclip_processing do let(:params) { { file: fixture_file_upload('attachment.jpg', 'image/jpeg'), description: 'jpeg image' } } it_behaves_like 'a successful media upload', 'image' end - context 'with image/gif', paperclip_processing: true do + context 'with image/gif', :paperclip_processing do let(:params) { { file: fixture_file_upload('attachment.gif', 'image/gif') } } it_behaves_like 'a successful media upload', 'image' end - context 'with video/webm', paperclip_processing: true do + context 'with video/webm', :paperclip_processing do let(:params) { { file: fixture_file_upload('attachment.webm', 'video/webm') } } it_behaves_like 'a successful media upload', 'gifv' diff --git a/spec/requests/api/v2/media_spec.rb b/spec/requests/api/v2/media_spec.rb index 89384d0ca3..fc6946be53 100644 --- a/spec/requests/api/v2/media_spec.rb +++ b/spec/requests/api/v2/media_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -RSpec.describe 'Media API', paperclip_processing: true do +RSpec.describe 'Media API', :paperclip_processing do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'write' } diff --git a/spec/support/examples/models/concerns/account_avatar.rb b/spec/support/examples/models/concerns/account_avatar.rb index 16ebda5641..2c9b5514aa 100644 --- a/spec/support/examples/models/concerns/account_avatar.rb +++ b/spec/support/examples/models/concerns/account_avatar.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true shared_examples 'AccountAvatar' do |fabricator| - describe 'static avatars', paperclip_processing: true do + describe 'static avatars', :paperclip_processing do describe 'when GIF' do it 'creates a png static style' do account = Fabricate(fabricator, avatar: attachment_fixture('avatar.gif')) @@ -17,7 +17,7 @@ shared_examples 'AccountAvatar' do |fabricator| end end - describe 'base64-encoded files', paperclip_processing: true do + describe 'base64-encoded files', :paperclip_processing do let(:base64_attachment) { "data:image/jpeg;base64,#{Base64.encode64(attachment_fixture('attachment.jpg').read)}" } let(:account) { Fabricate(fabricator, avatar: base64_attachment) } diff --git a/spec/support/examples/models/concerns/account_header.rb b/spec/support/examples/models/concerns/account_header.rb index d65f54f00f..ce09eb006b 100644 --- a/spec/support/examples/models/concerns/account_header.rb +++ b/spec/support/examples/models/concerns/account_header.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true shared_examples 'AccountHeader' do |fabricator| - describe 'base64-encoded files', paperclip_processing: true do + describe 'base64-encoded files', :paperclip_processing do let(:base64_attachment) { "data:image/jpeg;base64,#{Base64.encode64(attachment_fixture('attachment.jpg').read)}" } let(:account) { Fabricate(fabricator, header: base64_attachment) } diff --git a/spec/system/unlogged_spec.rb b/spec/system/unlogged_spec.rb new file mode 100644 index 0000000000..c3ebf51d7f --- /dev/null +++ b/spec/system/unlogged_spec.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +require 'rails_helper' + +describe 'UnloggedBrowsing' do + subject { page } + + before do + visit root_path + end + + it 'loads the home page' do + expect(subject).to have_css('div.app-holder') + + expect(subject).to have_css('div.columns-area__panels__main') + end +end diff --git a/spec/views/statuses/show.html.haml_spec.rb b/spec/views/statuses/show.html.haml_spec.rb index a9d3edf7a1..233965883a 100644 --- a/spec/views/statuses/show.html.haml_spec.rb +++ b/spec/views/statuses/show.html.haml_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'statuses/show.html.haml', without_verify_partial_doubles: true do +describe 'statuses/show.html.haml', :without_verify_partial_doubles do before do allow(view).to receive_messages(api_oembed_url: '', show_landing_strip?: true, site_title: 'example site', site_hostname: 'example.com', full_asset_url: '//asset.host/image.svg', current_account: nil, single_user_mode?: false) allow(view).to receive(:local_time) diff --git a/yarn.lock b/yarn.lock index 750a4fb7eb..3cce7f61cf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1310,14 +1310,14 @@ eslint-visitor-keys "^3.3.0" "@eslint-community/regexpp@^4.5.1", "@eslint-community/regexpp@^4.6.1": - version "4.9.1" - resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.9.1.tgz#449dfa81a57a1d755b09aa58d826c1262e4283b4" - integrity sha512-Y27x+MBLjXa+0JWDhykM3+JE+il3kHKAEqabfEWq3SDhZjLYb6/BHL/JKFnH3fe207JaXkyDo685Oc2Glt6ifA== + version "4.10.0" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.0.tgz#548f6de556857c8bb73bbee70c35dc82a2e74d63" + integrity sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA== -"@eslint/eslintrc@^2.1.2": - version "2.1.2" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.2.tgz#c6936b4b328c64496692f76944e755738be62396" - integrity sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g== +"@eslint/eslintrc@^2.1.3": + version "2.1.3" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.3.tgz#797470a75fe0fbd5a53350ee715e85e87baff22d" + integrity sha512-yZzuIG+jnVu6hNSzFEN07e8BxF3uAzYtQb6uDkaYZLo6oYZDCq454c5kB8zxnzfCYyP4MIuyBn10L0DqwujTmA== dependencies: ajv "^6.12.4" debug "^4.3.2" @@ -1329,10 +1329,10 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@8.52.0": - version "8.52.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.52.0.tgz#78fe5f117840f69dc4a353adf9b9cd926353378c" - integrity sha512-mjZVbpaeMZludF2fsWLD0Z9gCref1Tk4i9+wddjRvpUNqqcndPkBD09N/Mapey0b3jaXbLm2kICwFv2E64QinA== +"@eslint/js@8.53.0": + version "8.53.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.53.0.tgz#bea56f2ed2b5baea164348ff4d5a879f6f81f20d" + integrity sha512-Kn7K8dx/5U6+cT1yEhpX1w4PCSg0M+XyRILPgvwcEBjerFWCwQj5sbr3/VmxqV0JGHCBCzyd6LxypEuehypY1w== "@floating-ui/core@^1.4.2": version "1.5.0" @@ -2283,9 +2283,9 @@ "@types/istanbul-lib-report" "*" "@types/jest@^29.5.2": - version "29.5.6" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.6.tgz#f4cf7ef1b5b0bfc1aa744e41b24d9cc52533130b" - integrity sha512-/t9NnzkOpXb4Nfvg17ieHE6EeSjDS2SGSpNYfoLbUAeL/EOueU/RSdOWFpfQTXBEM7BguYW1XQ0EbM+6RlIh6w== + version "29.5.7" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.7.tgz#2c0dafe2715dd958a455bc10e2ec3e1ec47b5036" + integrity sha512-HLyetab6KVPSiF+7pFcUyMeLsx25LDNDemw9mGsJBkai/oouwrjTycocSDYopMEwFhN2Y4s9oPyOCZNofgSt2g== dependencies: expect "^29.0.0" pretty-format "^29.0.0" @@ -2350,11 +2350,11 @@ integrity sha512-Kfe/D3hxHTusnPNRbycJE1N77WHDsdS4AjUYIzlDzhDrS47NrwuL3YW4VITxwR7KCVpzwgy4Rbj829KSSQmwXQ== "@types/node@*": - version "20.8.7" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.7.tgz#ad23827850843de973096edfc5abc9e922492a25" - integrity sha512-21TKHHh3eUHIi2MloeptJWALuCu5H7HQTdTrWIFReA8ad+aggoX+lRes3ex7/FtpC+sVUpFMQ+QTfYr74mruiQ== + version "20.8.10" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.10.tgz#a5448b895c753ae929c26ce85cab557c6d4a365e" + integrity sha512-TlgT8JntpcbmKUFzjhsyhGfP2fsiz1Mv56im6enJ905xG1DAYesxJaeSbGqQmAw8OWPdhyJGhGSQGKRNJ45u9w== dependencies: - undici-types "~5.25.1" + undici-types "~5.26.4" "@types/node@14 || 16 || 17": version "17.0.45" @@ -2525,9 +2525,9 @@ "@types/react" "*" "@types/react@*", "@types/react@16 || 17 || 18", "@types/react@>=16.9.11", "@types/react@^18.0.26", "@types/react@^18.2.7": - version "18.2.33" - resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.33.tgz#055356243dc4350a9ee6c6a2c07c5cae12e38877" - integrity sha512-v+I7S+hu3PIBoVkKGpSYYpiBT1ijqEzWpzQD62/jm4K74hPpSP7FF9BnKG6+fg2+62weJYkkBWDJlZt5JO/9hg== + version "18.2.35" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.35.tgz#bacdc6d139a4d6d47e5186e1a96952c65e1f3792" + integrity sha512-LG3xpFZ++rTndV+/XFyX5vUP7NI9yxyk+MQvBDq+CVs8I9DLSc3Ymwb1Vmw5YDoeNeHN4PDZa3HylMKJYT9PNQ== dependencies: "@types/prop-types" "*" "@types/scheduler" "*" @@ -2661,15 +2661,15 @@ "@types/yargs-parser" "*" "@typescript-eslint/eslint-plugin@^6.0.0": - version "6.8.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.8.0.tgz#06abe4265e7c82f20ade2dcc0e3403c32d4f148b" - integrity sha512-GosF4238Tkes2SHPQ1i8f6rMtG6zlKwMEB0abqSJ3Npvos+doIlc/ATG+vX1G9coDF3Ex78zM3heXHLyWEwLUw== + version "6.9.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.9.1.tgz#d8ce497dc0ed42066e195c8ecc40d45c7b1254f4" + integrity sha512-w0tiiRc9I4S5XSXXrMHOWgHgxbrBn1Ro+PmiYhSg2ZVdxrAJtQgzU5o2m1BfP6UOn7Vxcc6152vFjQfmZR4xEg== dependencies: "@eslint-community/regexpp" "^4.5.1" - "@typescript-eslint/scope-manager" "6.8.0" - "@typescript-eslint/type-utils" "6.8.0" - "@typescript-eslint/utils" "6.8.0" - "@typescript-eslint/visitor-keys" "6.8.0" + "@typescript-eslint/scope-manager" "6.9.1" + "@typescript-eslint/type-utils" "6.9.1" + "@typescript-eslint/utils" "6.9.1" + "@typescript-eslint/visitor-keys" "6.9.1" debug "^4.3.4" graphemer "^1.4.0" ignore "^5.2.4" @@ -2678,14 +2678,14 @@ ts-api-utils "^1.0.1" "@typescript-eslint/parser@^6.0.0": - version "6.8.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.8.0.tgz#bb2a969d583db242f1ee64467542f8b05c2e28cb" - integrity sha512-5tNs6Bw0j6BdWuP8Fx+VH4G9fEPDxnVI7yH1IAPkQH5RUtvKwRoqdecAPdQXv4rSOADAaz1LFBZvZG7VbXivSg== + version "6.9.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.9.1.tgz#4f685f672f8b9580beb38d5fb99d52fc3e34f7a3" + integrity sha512-C7AK2wn43GSaCUZ9do6Ksgi2g3mwFkMO3Cis96kzmgudoVaKyt62yNzJOktP0HDLb/iO2O0n2lBOzJgr6Q/cyg== dependencies: - "@typescript-eslint/scope-manager" "6.8.0" - "@typescript-eslint/types" "6.8.0" - "@typescript-eslint/typescript-estree" "6.8.0" - "@typescript-eslint/visitor-keys" "6.8.0" + "@typescript-eslint/scope-manager" "6.9.1" + "@typescript-eslint/types" "6.9.1" + "@typescript-eslint/typescript-estree" "6.9.1" + "@typescript-eslint/visitor-keys" "6.9.1" debug "^4.3.4" "@typescript-eslint/scope-manager@6.8.0": @@ -2696,13 +2696,21 @@ "@typescript-eslint/types" "6.8.0" "@typescript-eslint/visitor-keys" "6.8.0" -"@typescript-eslint/type-utils@6.8.0": - version "6.8.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.8.0.tgz#50365e44918ca0fd159844b5d6ea96789731e11f" - integrity sha512-RYOJdlkTJIXW7GSldUIHqc/Hkto8E+fZN96dMIFhuTJcQwdRoGN2rEWA8U6oXbLo0qufH7NPElUb+MceHtz54g== +"@typescript-eslint/scope-manager@6.9.1": + version "6.9.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.9.1.tgz#e96afeb9a68ad1cd816dba233351f61e13956b75" + integrity sha512-38IxvKB6NAne3g/+MyXMs2Cda/Sz+CEpmm+KLGEM8hx/CvnSRuw51i8ukfwB/B/sESdeTGet1NH1Wj7I0YXswg== dependencies: - "@typescript-eslint/typescript-estree" "6.8.0" - "@typescript-eslint/utils" "6.8.0" + "@typescript-eslint/types" "6.9.1" + "@typescript-eslint/visitor-keys" "6.9.1" + +"@typescript-eslint/type-utils@6.9.1": + version "6.9.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.9.1.tgz#efd5db20ed35a74d3c7d8fba51b830ecba09ce32" + integrity sha512-eh2oHaUKCK58qIeYp19F5V5TbpM52680sB4zNSz29VBQPTWIlE/hCj5P5B1AChxECe/fmZlspAWFuRniep1Skg== + dependencies: + "@typescript-eslint/typescript-estree" "6.9.1" + "@typescript-eslint/utils" "6.9.1" debug "^4.3.4" ts-api-utils "^1.0.1" @@ -2711,6 +2719,11 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.8.0.tgz#1ab5d4fe1d613e3f65f6684026ade6b94f7e3ded" integrity sha512-p5qOxSum7W3k+llc7owEStXlGmSl8FcGvhYt8Vjy7FqEnmkCVlM3P57XQEGj58oqaBWDQXbJDZxwUWMS/EAPNQ== +"@typescript-eslint/types@6.9.1": + version "6.9.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.9.1.tgz#a6cfc20db0fcedcb2f397ea728ef583e0ee72459" + integrity sha512-BUGslGOb14zUHOUmDB2FfT6SI1CcZEJYfF3qFwBeUrU6srJfzANonwRYHDpLBuzbq3HaoF2XL2hcr01c8f8OaQ== + "@typescript-eslint/typescript-estree@6.8.0": version "6.8.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.8.0.tgz#9565f15e0cd12f55cf5aa0dfb130a6cb0d436ba1" @@ -2724,7 +2737,33 @@ semver "^7.5.4" ts-api-utils "^1.0.1" -"@typescript-eslint/utils@6.8.0", "@typescript-eslint/utils@^6.5.0": +"@typescript-eslint/typescript-estree@6.9.1": + version "6.9.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.9.1.tgz#8c77910a49a04f0607ba94d78772da07dab275ad" + integrity sha512-U+mUylTHfcqeO7mLWVQ5W/tMLXqVpRv61wm9ZtfE5egz7gtnmqVIw9ryh0mgIlkKk9rZLY3UHygsBSdB9/ftyw== + dependencies: + "@typescript-eslint/types" "6.9.1" + "@typescript-eslint/visitor-keys" "6.9.1" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + semver "^7.5.4" + ts-api-utils "^1.0.1" + +"@typescript-eslint/utils@6.9.1": + version "6.9.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.9.1.tgz#763da41281ef0d16974517b5f0d02d85897a1c1e" + integrity sha512-L1T0A5nFdQrMVunpZgzqPL6y2wVreSyHhKGZryS6jrEN7bD9NplVAyMryUhXsQ4TWLnZmxc2ekar/lSGIlprCA== + dependencies: + "@eslint-community/eslint-utils" "^4.4.0" + "@types/json-schema" "^7.0.12" + "@types/semver" "^7.5.0" + "@typescript-eslint/scope-manager" "6.9.1" + "@typescript-eslint/types" "6.9.1" + "@typescript-eslint/typescript-estree" "6.9.1" + semver "^7.5.4" + +"@typescript-eslint/utils@^6.5.0": version "6.8.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.8.0.tgz#d42939c2074c6b59844d0982ce26a51d136c4029" integrity sha512-dKs1itdE2qFG4jr0dlYLQVppqTE+Itt7GmIf/vX6CSvsW+3ov8PbWauVKyyfNngokhIO9sKZeRGCUo1+N7U98Q== @@ -2745,6 +2784,14 @@ "@typescript-eslint/types" "6.8.0" eslint-visitor-keys "^3.4.1" +"@typescript-eslint/visitor-keys@6.9.1": + version "6.9.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.9.1.tgz#6753a9225a0ba00459b15d6456b9c2780b66707d" + integrity sha512-MUaPUe/QRLEffARsmNfmpghuQkW436DvESW+h+M52w0coICHRfD6Np9/K6PdACwnrq1HmuLl+cSPZaJmeVPkSw== + dependencies: + "@typescript-eslint/types" "6.9.1" + eslint-visitor-keys "^3.4.1" + "@ungap/structured-clone@^1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" @@ -2948,11 +2995,16 @@ acorn@^6.4.1: resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.2.tgz#35866fd710528e92de10cf06016498e47e39e1e6" integrity sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ== -acorn@^8.0.4, acorn@^8.1.0, acorn@^8.8.1, acorn@^8.8.2, acorn@^8.9.0: +acorn@^8.0.4, acorn@^8.1.0, acorn@^8.8.1, acorn@^8.8.2: version "8.10.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5" integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== +acorn@^8.9.0: + version "8.11.2" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.2.tgz#ca0d78b51895be5390a5903c5b3bdcdaf78ae40b" + integrity sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w== + agent-base@6: version "6.0.2" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" @@ -5658,14 +5710,14 @@ eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4 integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== eslint@^8.41.0: - version "8.52.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.52.0.tgz#d0cd4a1fac06427a61ef9242b9353f36ea7062fc" - integrity sha512-zh/JHnaixqHZsolRB/w9/02akBk9EPrOs9JwcTP2ek7yL5bVvXuRariiaAjjoJ5DvuwQ1WAE/HsMz+w17YgBCg== + version "8.53.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.53.0.tgz#14f2c8244298fcae1f46945459577413ba2697ce" + integrity sha512-N4VuiPjXDUa4xVeV/GC/RV3hQW9Nw+Y463lkWaKKXKYMvmRiRDAtfpuPFLN+E1/6ZhyR8J2ig+eVREnYgUsiag== dependencies: "@eslint-community/eslint-utils" "^4.2.0" "@eslint-community/regexpp" "^4.6.1" - "@eslint/eslintrc" "^2.1.2" - "@eslint/js" "8.52.0" + "@eslint/eslintrc" "^2.1.3" + "@eslint/js" "8.53.0" "@humanwhocodes/config-array" "^0.11.13" "@humanwhocodes/module-importer" "^1.0.1" "@nodelib/fs.walk" "^1.2.8" @@ -11703,7 +11755,6 @@ stringz@^2.1.0: char-regex "^1.0.2" "strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: - name strip-ansi-cjs version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -12395,10 +12446,10 @@ uncontrollable@^7.2.1: invariant "^2.2.4" react-lifecycles-compat "^3.0.4" -undici-types@~5.25.1: - version "5.25.3" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.25.3.tgz#e044115914c85f0bcbb229f346ab739f064998c3" - integrity sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA== +undici-types@~5.26.4: + version "5.26.5" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" + integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== unicode-canonical-property-names-ecmascript@^2.0.0: version "2.0.0"