From 8818763f28e7f020c046be8a25cc9f8c47ffc056 Mon Sep 17 00:00:00 2001 From: Chewbacca Date: Tue, 15 Nov 2022 15:48:54 -0500 Subject: [PATCH] Rename files (12): rand --- app/soapbox/actions/consumer-auth.ts | 2 +- app/soapbox/api/index.ts | 2 +- app/soapbox/{base_polyfills.ts => base-polyfills.ts} | 0 app/soapbox/{build_config.js => build-config.js} | 0 app/soapbox/components/emoji-button-wrapper.tsx | 2 +- app/soapbox/components/error-boundary.tsx | 2 +- app/soapbox/components/extended-video-player.tsx | 2 +- app/soapbox/components/hover-ref-wrapper.tsx | 2 +- app/soapbox/components/hover-status-wrapper.tsx | 2 +- app/soapbox/components/media-gallery.tsx | 2 +- app/soapbox/containers/dropdown-menu-container.ts | 2 +- app/soapbox/containers/soapbox.tsx | 2 +- app/soapbox/custom.ts | 2 +- app/soapbox/{extra_polyfills.ts => extra-polyfills.ts} | 0 .../features/account-gallery/components/media-item.tsx | 2 +- app/soapbox/features/compose/components/compose-form.tsx | 2 +- app/soapbox/features/compose/components/privacy-dropdown.tsx | 2 +- .../features/soapbox-config/components/color-picker.tsx | 2 +- .../features/soapbox-config/components/color-with-picker.tsx | 2 +- app/soapbox/{is_mobile.ts => is-mobile.ts} | 0 app/soapbox/{load_polyfills.ts => load-polyfills.ts} | 4 ++-- app/soapbox/main.tsx | 2 +- app/soapbox/monitoring.ts | 2 +- app/soapbox/performance.ts | 2 +- app/soapbox/reducers/auth.js | 2 +- app/soapbox/reducers/index.ts | 2 +- .../__tests__/comparators.test.ts} | 4 ++-- app/soapbox/utils/state.ts | 2 +- app/soapbox/utils/static.ts | 2 +- 29 files changed, 27 insertions(+), 27 deletions(-) rename app/soapbox/{base_polyfills.ts => base-polyfills.ts} (100%) rename app/soapbox/{build_config.js => build-config.js} (100%) rename app/soapbox/{extra_polyfills.ts => extra-polyfills.ts} (100%) rename app/soapbox/{is_mobile.ts => is-mobile.ts} (100%) rename app/soapbox/{load_polyfills.ts => load-polyfills.ts} (97%) rename app/soapbox/{__tests__/compare_id.test.ts => utils/__tests__/comparators.test.ts} (73%) diff --git a/app/soapbox/actions/consumer-auth.ts b/app/soapbox/actions/consumer-auth.ts index b669c6393..171941577 100644 --- a/app/soapbox/actions/consumer-auth.ts +++ b/app/soapbox/actions/consumer-auth.ts @@ -1,6 +1,6 @@ import axios from 'axios'; -import * as BuildConfig from 'soapbox/build_config'; +import * as BuildConfig from 'soapbox/build-config'; import { isURL } from 'soapbox/utils/auth'; import sourceCode from 'soapbox/utils/code'; import { getFeatures } from 'soapbox/utils/features'; diff --git a/app/soapbox/api/index.ts b/app/soapbox/api/index.ts index fde4a1a24..97d7d25d7 100644 --- a/app/soapbox/api/index.ts +++ b/app/soapbox/api/index.ts @@ -9,7 +9,7 @@ import axios, { AxiosInstance, AxiosResponse } from 'axios'; import LinkHeader from 'http-link-header'; import { createSelector } from 'reselect'; -import * as BuildConfig from 'soapbox/build_config'; +import * as BuildConfig from 'soapbox/build-config'; import { RootState } from 'soapbox/store'; import { getAccessToken, getAppToken, isURL, parseBaseURL } from 'soapbox/utils/auth'; diff --git a/app/soapbox/base_polyfills.ts b/app/soapbox/base-polyfills.ts similarity index 100% rename from app/soapbox/base_polyfills.ts rename to app/soapbox/base-polyfills.ts diff --git a/app/soapbox/build_config.js b/app/soapbox/build-config.js similarity index 100% rename from app/soapbox/build_config.js rename to app/soapbox/build-config.js diff --git a/app/soapbox/components/emoji-button-wrapper.tsx b/app/soapbox/components/emoji-button-wrapper.tsx index 9a71c9e1a..241596612 100644 --- a/app/soapbox/components/emoji-button-wrapper.tsx +++ b/app/soapbox/components/emoji-button-wrapper.tsx @@ -7,7 +7,7 @@ import { simpleEmojiReact } from 'soapbox/actions/emoji_reacts'; import { openModal } from 'soapbox/actions/modals'; import EmojiSelector from 'soapbox/components/ui/emoji-selector/emoji-selector'; import { useAppSelector, useOwnAccount, useSoapboxConfig } from 'soapbox/hooks'; -import { isUserTouching } from 'soapbox/is_mobile'; +import { isUserTouching } from 'soapbox/is-mobile'; import { getReactForStatus } from 'soapbox/utils/emoji-reacts'; interface IEmojiButtonWrapper { diff --git a/app/soapbox/components/error-boundary.tsx b/app/soapbox/components/error-boundary.tsx index b4b6d8235..830f3e679 100644 --- a/app/soapbox/components/error-boundary.tsx +++ b/app/soapbox/components/error-boundary.tsx @@ -3,7 +3,7 @@ import { FormattedMessage } from 'react-intl'; import { connect } from 'react-redux'; import { getSoapboxConfig } from 'soapbox/actions/soapbox'; -import * as BuildConfig from 'soapbox/build_config'; +import * as BuildConfig from 'soapbox/build-config'; import { Text, Stack } from 'soapbox/components/ui'; import { captureException } from 'soapbox/monitoring'; import KVStore from 'soapbox/storage/kv-store'; diff --git a/app/soapbox/components/extended-video-player.tsx b/app/soapbox/components/extended-video-player.tsx index 99a0af01c..ec7e7f3f4 100644 --- a/app/soapbox/components/extended-video-player.tsx +++ b/app/soapbox/components/extended-video-player.tsx @@ -1,6 +1,6 @@ import React, { useEffect, useRef } from 'react'; -import { isIOS } from 'soapbox/is_mobile'; +import { isIOS } from 'soapbox/is-mobile'; interface IExtendedVideoPlayer { src: string, diff --git a/app/soapbox/components/hover-ref-wrapper.tsx b/app/soapbox/components/hover-ref-wrapper.tsx index f509b2efe..c8536fcdf 100644 --- a/app/soapbox/components/hover-ref-wrapper.tsx +++ b/app/soapbox/components/hover-ref-wrapper.tsx @@ -8,7 +8,7 @@ import { closeProfileHoverCard, } from 'soapbox/actions/profile_hover_card'; import { useAppDispatch } from 'soapbox/hooks'; -import { isMobile } from 'soapbox/is_mobile'; +import { isMobile } from 'soapbox/is-mobile'; const showProfileHoverCard = debounce((dispatch, ref, accountId) => { dispatch(openProfileHoverCard(ref, accountId)); diff --git a/app/soapbox/components/hover-status-wrapper.tsx b/app/soapbox/components/hover-status-wrapper.tsx index da962e47c..a90969da2 100644 --- a/app/soapbox/components/hover-status-wrapper.tsx +++ b/app/soapbox/components/hover-status-wrapper.tsx @@ -7,7 +7,7 @@ import { openStatusHoverCard, closeStatusHoverCard, } from 'soapbox/actions/status-hover-card'; -import { isMobile } from 'soapbox/is_mobile'; +import { isMobile } from 'soapbox/is-mobile'; const showStatusHoverCard = debounce((dispatch, ref, statusId) => { dispatch(openStatusHoverCard(ref, statusId)); diff --git a/app/soapbox/components/media-gallery.tsx b/app/soapbox/components/media-gallery.tsx index 4215356d5..42b961dc1 100644 --- a/app/soapbox/components/media-gallery.tsx +++ b/app/soapbox/components/media-gallery.tsx @@ -9,7 +9,7 @@ import { useSettings } from 'soapbox/hooks'; import { Attachment } from 'soapbox/types/entities'; import { truncateFilename } from 'soapbox/utils/media'; -import { isIOS } from '../is_mobile'; +import { isIOS } from '../is-mobile'; import { isPanoramic, isPortrait, isNonConformingRatio, minimumAspectRatio, maximumAspectRatio } from '../utils/media-aspect-ratio'; import type { Property } from 'csstype'; diff --git a/app/soapbox/containers/dropdown-menu-container.ts b/app/soapbox/containers/dropdown-menu-container.ts index c5e0dc8cb..173203e50 100644 --- a/app/soapbox/containers/dropdown-menu-container.ts +++ b/app/soapbox/containers/dropdown-menu-container.ts @@ -3,7 +3,7 @@ import { connect } from 'react-redux'; import { openDropdownMenu, closeDropdownMenu } from '../actions/dropdown_menu'; import { openModal, closeModal } from '../actions/modals'; import DropdownMenu from '../components/dropdown-menu'; -import { isUserTouching } from '../is_mobile'; +import { isUserTouching } from '../is-mobile'; import type { Dispatch } from 'redux'; import type { DropdownPlacement, IDropdown } from 'soapbox/components/dropdown-menu'; diff --git a/app/soapbox/containers/soapbox.tsx b/app/soapbox/containers/soapbox.tsx index b1e6fb719..10d4d3950 100644 --- a/app/soapbox/containers/soapbox.tsx +++ b/app/soapbox/containers/soapbox.tsx @@ -13,7 +13,7 @@ import { loadInstance } from 'soapbox/actions/instance'; import { fetchMe } from 'soapbox/actions/me'; import { loadSoapboxConfig, getSoapboxConfig } from 'soapbox/actions/soapbox'; import { fetchVerificationConfig } from 'soapbox/actions/verification'; -import * as BuildConfig from 'soapbox/build_config'; +import * as BuildConfig from 'soapbox/build-config'; import GdprBanner from 'soapbox/components/gdpr-banner'; import Helmet from 'soapbox/components/helmet'; import LoadingScreen from 'soapbox/components/loading-screen'; diff --git a/app/soapbox/custom.ts b/app/soapbox/custom.ts index 4bccb386d..461f64845 100644 --- a/app/soapbox/custom.ts +++ b/app/soapbox/custom.ts @@ -1,7 +1,7 @@ /** * Functions for dealing with custom build configuration. */ -import * as BuildConfig from 'soapbox/build_config'; +import * as BuildConfig from 'soapbox/build-config'; /** Require a custom JSON file if it exists */ export const custom = (filename: string, fallback: any = {}): any => { diff --git a/app/soapbox/extra_polyfills.ts b/app/soapbox/extra-polyfills.ts similarity index 100% rename from app/soapbox/extra_polyfills.ts rename to app/soapbox/extra-polyfills.ts diff --git a/app/soapbox/features/account-gallery/components/media-item.tsx b/app/soapbox/features/account-gallery/components/media-item.tsx index 3999fb85f..a2a171bfc 100644 --- a/app/soapbox/features/account-gallery/components/media-item.tsx +++ b/app/soapbox/features/account-gallery/components/media-item.tsx @@ -5,7 +5,7 @@ import Blurhash from 'soapbox/components/blurhash'; import Icon from 'soapbox/components/icon'; import StillImage from 'soapbox/components/still-image'; import { useSettings } from 'soapbox/hooks'; -import { isIOS } from 'soapbox/is_mobile'; +import { isIOS } from 'soapbox/is-mobile'; import type { Attachment } from 'soapbox/types/entities'; diff --git a/app/soapbox/features/compose/components/compose-form.tsx b/app/soapbox/features/compose/components/compose-form.tsx index 99bd27474..78a9cd11a 100644 --- a/app/soapbox/features/compose/components/compose-form.tsx +++ b/app/soapbox/features/compose/components/compose-form.tsx @@ -18,7 +18,7 @@ import AutosuggestTextarea from 'soapbox/components/autosuggest-textarea'; import Icon from 'soapbox/components/icon'; import { Button, Stack } from 'soapbox/components/ui'; import { useAppDispatch, useAppSelector, useCompose, useFeatures, usePrevious } from 'soapbox/hooks'; -import { isMobile } from 'soapbox/is_mobile'; +import { isMobile } from 'soapbox/is-mobile'; import QuotedStatusContainer from '../containers/quoted-status-container'; import ReplyIndicatorContainer from '../containers/reply-indicator-container'; diff --git a/app/soapbox/features/compose/components/privacy-dropdown.tsx b/app/soapbox/features/compose/components/privacy-dropdown.tsx index 4873769c3..074e86ec4 100644 --- a/app/soapbox/features/compose/components/privacy-dropdown.tsx +++ b/app/soapbox/features/compose/components/privacy-dropdown.tsx @@ -11,7 +11,7 @@ import { closeModal, openModal } from 'soapbox/actions/modals'; import Icon from 'soapbox/components/icon'; import { IconButton } from 'soapbox/components/ui'; import { useAppDispatch, useCompose } from 'soapbox/hooks'; -import { isUserTouching } from 'soapbox/is_mobile'; +import { isUserTouching } from 'soapbox/is-mobile'; import Motion from '../../ui/util/optional_motion'; diff --git a/app/soapbox/features/soapbox-config/components/color-picker.tsx b/app/soapbox/features/soapbox-config/components/color-picker.tsx index 4ac3943fc..4cba36e6a 100644 --- a/app/soapbox/features/soapbox-config/components/color-picker.tsx +++ b/app/soapbox/features/soapbox-config/components/color-picker.tsx @@ -2,7 +2,7 @@ import { supportsPassiveEvents } from 'detect-passive-events'; import React, { useEffect, useRef } from 'react'; import { SketchPicker, ColorChangeHandler } from 'react-color'; -import { isMobile } from 'soapbox/is_mobile'; +import { isMobile } from 'soapbox/is-mobile'; const listenerOptions = supportsPassiveEvents ? { passive: true } : false; diff --git a/app/soapbox/features/soapbox-config/components/color-with-picker.tsx b/app/soapbox/features/soapbox-config/components/color-with-picker.tsx index c82e1bf11..c1c7dd3cd 100644 --- a/app/soapbox/features/soapbox-config/components/color-with-picker.tsx +++ b/app/soapbox/features/soapbox-config/components/color-with-picker.tsx @@ -2,7 +2,7 @@ import React, { useState, useRef } from 'react'; // @ts-ignore: TODO: upgrade react-overlays. v3.1 and above have TS definitions import Overlay from 'react-overlays/lib/Overlay'; -import { isMobile } from 'soapbox/is_mobile'; +import { isMobile } from 'soapbox/is-mobile'; import ColorPicker from './color-picker'; diff --git a/app/soapbox/is_mobile.ts b/app/soapbox/is-mobile.ts similarity index 100% rename from app/soapbox/is_mobile.ts rename to app/soapbox/is-mobile.ts diff --git a/app/soapbox/load_polyfills.ts b/app/soapbox/load-polyfills.ts similarity index 97% rename from app/soapbox/load_polyfills.ts rename to app/soapbox/load-polyfills.ts index e636098e7..cfd6f741f 100644 --- a/app/soapbox/load_polyfills.ts +++ b/app/soapbox/load-polyfills.ts @@ -5,11 +5,11 @@ // it will execute in the same tick of the event loop (i.e. near-instant). function importBasePolyfills() { - return import(/* webpackChunkName: "base_polyfills" */ './base_polyfills'); + return import(/* webpackChunkName: "base_polyfills" */ './base-polyfills'); } function importExtraPolyfills() { - return import(/* webpackChunkName: "extra_polyfills" */ './extra_polyfills'); + return import(/* webpackChunkName: "extra_polyfills" */ './extra-polyfills'); } function loadPolyfills() { diff --git a/app/soapbox/main.tsx b/app/soapbox/main.tsx index 84ea3739a..b4a0eeaac 100644 --- a/app/soapbox/main.tsx +++ b/app/soapbox/main.tsx @@ -8,7 +8,7 @@ import { defineMessages } from 'react-intl'; import snackbar from 'soapbox/actions/snackbar'; import { setSwUpdating } from 'soapbox/actions/sw'; -import * as BuildConfig from 'soapbox/build_config'; +import * as BuildConfig from 'soapbox/build-config'; import { store } from 'soapbox/store'; import { printConsoleWarning } from 'soapbox/utils/console'; diff --git a/app/soapbox/monitoring.ts b/app/soapbox/monitoring.ts index cfa800bde..da9bf46e7 100644 --- a/app/soapbox/monitoring.ts +++ b/app/soapbox/monitoring.ts @@ -1,4 +1,4 @@ -import * as BuildConfig from 'soapbox/build_config'; +import * as BuildConfig from 'soapbox/build-config'; import type { CaptureContext } from '@sentry/types'; diff --git a/app/soapbox/performance.ts b/app/soapbox/performance.ts index b524b6e15..36f9948a6 100644 --- a/app/soapbox/performance.ts +++ b/app/soapbox/performance.ts @@ -1,6 +1,6 @@ 'use strict'; -import * as BuildConfig from 'soapbox/build_config'; +import * as BuildConfig from 'soapbox/build-config'; // // Tools for performance debugging, only enabled in development mode. diff --git a/app/soapbox/reducers/auth.js b/app/soapbox/reducers/auth.js index 55b9fd3ae..bfe6b9249 100644 --- a/app/soapbox/reducers/auth.js +++ b/app/soapbox/reducers/auth.js @@ -2,7 +2,7 @@ import { Map as ImmutableMap, List as ImmutableList, fromJS } from 'immutable'; import trim from 'lodash/trim'; import { MASTODON_PRELOAD_IMPORT } from 'soapbox/actions/preload'; -import { FE_SUBDIRECTORY } from 'soapbox/build_config'; +import { FE_SUBDIRECTORY } from 'soapbox/build-config'; import KVStore from 'soapbox/storage/kv-store'; import { validId, isURL } from 'soapbox/utils/auth'; diff --git a/app/soapbox/reducers/index.ts b/app/soapbox/reducers/index.ts index 16e7307da..1caa7d976 100644 --- a/app/soapbox/reducers/index.ts +++ b/app/soapbox/reducers/index.ts @@ -2,7 +2,7 @@ import { Record as ImmutableRecord } from 'immutable'; import { combineReducers } from 'redux-immutable'; import { AUTH_LOGGED_OUT } from 'soapbox/actions/auth'; -import * as BuildConfig from 'soapbox/build_config'; +import * as BuildConfig from 'soapbox/build-config'; import account_notes from './account-notes'; import accounts from './accounts'; diff --git a/app/soapbox/__tests__/compare_id.test.ts b/app/soapbox/utils/__tests__/comparators.test.ts similarity index 73% rename from app/soapbox/__tests__/compare_id.test.ts rename to app/soapbox/utils/__tests__/comparators.test.ts index 1afbe0da3..f1cf72634 100644 --- a/app/soapbox/__tests__/compare_id.test.ts +++ b/app/soapbox/utils/__tests__/comparators.test.ts @@ -1,7 +1,7 @@ -import { compareId } from '../utils/comparators'; +import { compareId } from '../comparators'; test('compareId', () => { expect(compareId('3', '3')).toBe(0); expect(compareId('10', '1')).toBe(1); expect(compareId('99', '100')).toBe(-1); -}); +}); \ No newline at end of file diff --git a/app/soapbox/utils/state.ts b/app/soapbox/utils/state.ts index 45e849917..c3cfdb570 100644 --- a/app/soapbox/utils/state.ts +++ b/app/soapbox/utils/state.ts @@ -4,7 +4,7 @@ */ import { getSoapboxConfig } from 'soapbox/actions/soapbox'; -import * as BuildConfig from 'soapbox/build_config'; +import * as BuildConfig from 'soapbox/build-config'; import { isPrerendered } from 'soapbox/precheck'; import { isURL } from 'soapbox/utils/auth'; diff --git a/app/soapbox/utils/static.ts b/app/soapbox/utils/static.ts index 79ba46931..0a8048a32 100644 --- a/app/soapbox/utils/static.ts +++ b/app/soapbox/utils/static.ts @@ -5,7 +5,7 @@ import { join } from 'path'; -import * as BuildConfig from 'soapbox/build_config'; +import * as BuildConfig from 'soapbox/build-config'; /** Gets the path to a file with build configuration being considered. */ export const joinPublicPath = (...paths: string[]): string => {